Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix phpDoc for getValue function #1015

Open
xoex opened this issue Apr 1, 2023 · 0 comments · May be fixed by #1018
Open

Fix phpDoc for getValue function #1015

xoex opened this issue Apr 1, 2023 · 0 comments · May be fixed by #1018

Comments

@xoex
Copy link

xoex commented Apr 1, 2023

Current phpDoc for getValue is this :

/**
     * A convenient SELECT COLUMN function to get a single column value from one row
     *
     * @param string $tableName The name of the database table to work with.
     * @param string $column    The desired column
     * @param int    $limit     Limit of rows to select. Use null for unlimited..1 by default
     *
     * @return mixed Contains the value of a returned column / array of values
     * @throws Exception
     */
    public function getValue($tableName, $column, $limit = 1)

But $limit can be null to get an array for a single column, so this should change to :

* @param int|null $limit Limit of rows to select. Use null for unlimited..1 by default

RivenSkaye added a commit to RivenSkaye/PHP-MySQLi-Database-Class that referenced this issue Jul 24, 2023
@RivenSkaye RivenSkaye linked a pull request Jul 25, 2023 that will close this issue
stormwalkerec added a commit to stormwalkerec/php-mysqli-database-class that referenced this issue Mar 31, 2024
Fixes ThingEngineer#1016 by setting the defaults to an empty string; This matches nothing without notices about nulls.
Fixes ThingEngineer#1013 by defaulting to false instead of not initializing.
Fixes ThingEngineer#1015 by adding the missing null in the docstring. Re-aligned the other lines and fixed a typo.
Fixes ThingEngineer#1001 by special handling of stdClass objects
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant