ThingEngineer / PHP-MySQLi-Database-Class

Wrapper for a PHP MySQL class, which utilizes MySQLi and prepared statements.
Other
3.3k stars 1.34k forks source link

Fix phpDoc for getValue function #1015

Closed xoex closed 4 months ago

xoex commented 1 year ago

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