Skip to content

Commit d8d7a7e

Browse files
committed
fixing return types
1 parent 9f0316a commit d8d7a7e

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

src/classes/ADORecordSet.php

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33
/**
4-
* PHPPgAdmin v6.0.0-RC9
4+
* PHPPgAdmin v6.0.0-RC8
55
*/
66

77
namespace PHPPgAdmin;
@@ -20,8 +20,13 @@
2020
*/
2121
class ADORecordSet extends \ADORecordSet implements \Countable
2222
{
23-
public function count()
23+
/**
24+
* Returns the recordCount.
25+
*
26+
* @return int
27+
*/
28+
public function count(): int
2429
{
25-
return $this->recordCount();
30+
return $this->NumRows();
2631
}
2732
}

src/lib.inc.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656

5757
// Fetch App and DI Container
5858
list($container, $app) = \PHPPgAdmin\ContainerUtils::createContainer($conf);
59-
59+
$subfolder = '';
6060
if ($container instanceof \Psr\Container\ContainerInterface) {
6161
if (PHP_SAPI == 'cli-server') {
6262
$subfolder = '/index.php';
@@ -66,10 +66,10 @@
6666
$normalized_php_self = str_replace('/src/views', '', $container->environment->get('PHP_SELF'));
6767
$subfolder = str_replace('/' . basename($normalized_php_self), '', $normalized_php_self);
6868
}
69-
define('SUBFOLDER', $subfolder);
7069
} else {
7170
trigger_error("App Container must be an instance of \Psr\Container\ContainerInterface", E_USER_ERROR);
7271
}
72+
define('SUBFOLDER', $subfolder);
7373

7474
$container['requestobj'] = $container['request'];
7575
$container['responseobj'] = $container['response'];

0 commit comments

Comments
 (0)