diff options
author | ffflabs <amenadiel@gmail.com> | 2020-02-26 00:01:06 +0300 |
---|---|---|
committer | ffflabs <amenadiel@gmail.com> | 2020-02-26 00:01:06 +0300 |
commit | d8d7a7e9c8849a8be9dc9a9585c096eb0f7d93d1 (patch) | |
tree | b64893e021ff9f918a0b1641520840215830721d | |
parent | 9f0316a22f4048f52d015e81eac18369ad509d21 (diff) |
fixing return types
-rw-r--r-- | src/classes/ADORecordSet.php | 11 | ||||
-rw-r--r-- | src/lib.inc.php | 4 |
2 files changed, 10 insertions, 5 deletions
diff --git a/src/classes/ADORecordSet.php b/src/classes/ADORecordSet.php index ae22db52..8abcd848 100644 --- a/src/classes/ADORecordSet.php +++ b/src/classes/ADORecordSet.php @@ -1,7 +1,7 @@ <?php /** - * PHPPgAdmin v6.0.0-RC9 + * PHPPgAdmin v6.0.0-RC8 */ namespace PHPPgAdmin; @@ -20,8 +20,13 @@ namespace PHPPgAdmin; */ class ADORecordSet extends \ADORecordSet implements \Countable { - public function count() + /** + * Returns the recordCount. + * + * @return int + */ + public function count(): int { - return $this->recordCount(); + return $this->NumRows(); } } diff --git a/src/lib.inc.php b/src/lib.inc.php index e5063464..630df349 100644 --- a/src/lib.inc.php +++ b/src/lib.inc.php @@ -56,7 +56,7 @@ if (DEBUGMODE) { // Fetch App and DI Container list($container, $app) = \PHPPgAdmin\ContainerUtils::createContainer($conf); - +$subfolder = ''; if ($container instanceof \Psr\Container\ContainerInterface) { if (PHP_SAPI == 'cli-server') { $subfolder = '/index.php'; @@ -66,10 +66,10 @@ if ($container instanceof \Psr\Container\ContainerInterface) { $normalized_php_self = str_replace('/src/views', '', $container->environment->get('PHP_SELF')); $subfolder = str_replace('/' . basename($normalized_php_self), '', $normalized_php_self); } - define('SUBFOLDER', $subfolder); } else { trigger_error("App Container must be an instance of \Psr\Container\ContainerInterface", E_USER_ERROR); } +define('SUBFOLDER', $subfolder); $container['requestobj'] = $container['request']; $container['responseobj'] = $container['response']; |