diff --git a/composer.lock b/composer.lock index 38ec2095..3324b422 100644 --- a/composer.lock +++ b/composer.lock @@ -172,16 +172,16 @@ }, { "name": "nextcloud/coding-standard", - "version": "v1.2.1", + "version": "v1.2.3", "source": { "type": "git", "url": "https://github.com/nextcloud/coding-standard.git", - "reference": "cf5f18d989ec62fb4cdc7fc92a36baf34b3d829e" + "reference": "bc9c53a5306114b60c4363057aff9c2ed10a54da" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nextcloud/coding-standard/zipball/cf5f18d989ec62fb4cdc7fc92a36baf34b3d829e", - "reference": "cf5f18d989ec62fb4cdc7fc92a36baf34b3d829e", + "url": "https://api.github.com/repos/nextcloud/coding-standard/zipball/bc9c53a5306114b60c4363057aff9c2ed10a54da", + "reference": "bc9c53a5306114b60c4363057aff9c2ed10a54da", "shasum": "" }, "require": { @@ -207,9 +207,9 @@ "description": "Nextcloud coding standards for the php cs fixer", "support": { "issues": "https://github.com/nextcloud/coding-standard/issues", - "source": "https://github.com/nextcloud/coding-standard/tree/v1.2.1" + "source": "https://github.com/nextcloud/coding-standard/tree/v1.2.3" }, - "time": "2024-02-01T14:54:37+00:00" + "time": "2024-08-23T14:32:32+00:00" }, { "name": "nextcloud/ocp", @@ -434,16 +434,16 @@ }, { "name": "php-cs-fixer/shim", - "version": "v3.49.0", + "version": "v3.62.0", "source": { "type": "git", "url": "https://github.com/PHP-CS-Fixer/shim.git", - "reference": "f7d3219cac46632f12362c9aa7c2ac0d2fe92c52" + "reference": "7a91d5ce45c486f5b445d95901228507a02f60ae" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHP-CS-Fixer/shim/zipball/f7d3219cac46632f12362c9aa7c2ac0d2fe92c52", - "reference": "f7d3219cac46632f12362c9aa7c2ac0d2fe92c52", + "url": "https://api.github.com/repos/PHP-CS-Fixer/shim/zipball/7a91d5ce45c486f5b445d95901228507a02f60ae", + "reference": "7a91d5ce45c486f5b445d95901228507a02f60ae", "shasum": "" }, "require": { @@ -480,9 +480,9 @@ "description": "A tool to automatically fix PHP code style", "support": { "issues": "https://github.com/PHP-CS-Fixer/shim/issues", - "source": "https://github.com/PHP-CS-Fixer/shim/tree/v3.49.0" + "source": "https://github.com/PHP-CS-Fixer/shim/tree/v3.62.0" }, - "time": "2024-02-02T00:42:09+00:00" + "time": "2024-08-07T17:03:46+00:00" }, { "name": "phpunit/php-code-coverage", diff --git a/lib/DatabaseStatistics.php b/lib/DatabaseStatistics.php index d7c6ea00..3a8b896f 100644 --- a/lib/DatabaseStatistics.php +++ b/lib/DatabaseStatistics.php @@ -130,7 +130,7 @@ protected function databaseSize(): string { $result->closeCursor(); break; } - return ($database_size !== false) ? (string) $database_size : 'N/A'; + return ($database_size !== false) ? (string)$database_size : 'N/A'; } /** diff --git a/lib/OperatingSystems/FreeBSD.php b/lib/OperatingSystems/FreeBSD.php index 44013840..70aecc2d 100644 --- a/lib/OperatingSystems/FreeBSD.php +++ b/lib/OperatingSystems/FreeBSD.php @@ -107,7 +107,7 @@ public function getNetworkInfo(): array { $netstat = $this->executeCommand('netstat -rn'); preg_match_all("/(?<=^default)\s*[0-9a-fA-f\.:]+/m", $netstat, $gw); if (count($gw[0]) > 0) { - $result['gateway'] = implode(", ", array_map("trim", $gw[0])); + $result['gateway'] = implode(', ', array_map('trim', $gw[0])); } } catch (RuntimeException) { // okay @@ -148,7 +148,7 @@ public function getNetworkInterfaces(): array { continue; } - preg_match("/(?<=ether ).*/m", $details, $mac); + preg_match('/(?<=ether ).*/m', $details, $mac); if (isset($mac[0])) { $netInterface->setMAC($mac[0]); } diff --git a/lib/Settings/AdminSection.php b/lib/Settings/AdminSection.php index a6dd5404..41c446a2 100644 --- a/lib/Settings/AdminSection.php +++ b/lib/Settings/AdminSection.php @@ -40,8 +40,8 @@ public function getName(): string { /** * @return int whether the form should be rather on the top or bottom of - * the settings navigation. The sections are arranged in ascending order of - * the priority values. It is required to return a value between 0 and 99. + * the settings navigation. The sections are arranged in ascending order of + * the priority values. It is required to return a value between 0 and 99. * * keep the server setting at the top, right after "overview" and "basic settings" */ diff --git a/lib/Settings/AdminSettings.php b/lib/Settings/AdminSettings.php index edc4de89..d4c57c4d 100644 --- a/lib/Settings/AdminSettings.php +++ b/lib/Settings/AdminSettings.php @@ -90,8 +90,8 @@ public function getSection(): string { /** * @return int whether the form should be rather on the top or bottom of - * the admin section. The forms are arranged in ascending order of the - * priority values. It is required to return a value between 0 and 100. + * the admin section. The forms are arranged in ascending order of the + * priority values. It is required to return a value between 0 and 100. * * keep the server setting at the top, right after "server settings" */ diff --git a/lib/ShareStatistics.php b/lib/ShareStatistics.php index 6afb3115..e1c344d3 100644 --- a/lib/ShareStatistics.php +++ b/lib/ShareStatistics.php @@ -62,7 +62,7 @@ protected function countEntries(string $tableName): int { $row = $result->fetch(); $result->closeCursor(); - return (int) $row['num_entries']; + return (int)$row['num_entries']; } /** @@ -84,6 +84,6 @@ protected function countShares(int $type, bool $noPassword = false): int { $row = $result->fetch(); $result->closeCursor(); - return (int) $row['num_entries']; + return (int)$row['num_entries']; } } diff --git a/lib/StorageStatistics.php b/lib/StorageStatistics.php index 7de12a7f..81d37fce 100644 --- a/lib/StorageStatistics.php +++ b/lib/StorageStatistics.php @@ -44,7 +44,7 @@ protected function countUserEntries(): int { $result = $query->executeQuery(); $row = $result->fetch(); $result->closeCursor(); - return (int) $row['num_entries']; + return (int)$row['num_entries']; } protected function getCountOf(string $table): int { @@ -92,6 +92,6 @@ protected function countStorages(string $type): int { $result = $query->executeQuery(); $row = $result->fetch(); $result->closeCursor(); - return (int) $row['num_entries']; + return (int)$row['num_entries']; } } diff --git a/lib/SystemStatistics.php b/lib/SystemStatistics.php index cd67491c..1b0a3982 100644 --- a/lib/SystemStatistics.php +++ b/lib/SystemStatistics.php @@ -76,7 +76,7 @@ public function getSystemStatistics(bool $skipApps = false, bool $skipUpdate = t */ protected function getServerUpdateInfo(): array { $updateInfo = [ - 'lastupdatedat' => (int) $this->config->getAppValue('core', 'lastupdatedat'), + 'lastupdatedat' => (int)$this->config->getAppValue('core', 'lastupdatedat'), 'available' => false, ]; diff --git a/tests/lib/ApiControllerTest.php b/tests/lib/ApiControllerTest.php index 5cef3c51..72b471c2 100644 --- a/tests/lib/ApiControllerTest.php +++ b/tests/lib/ApiControllerTest.php @@ -28,10 +28,10 @@ class ApiControllerTest extends \Test\TestCase { /** @var Os|\PHPUnit\Framework\MockObject\MockObject */ private $os; - /** @var IRequest|\PHPUnit\Framework\MockObject\MockObject */ + /** @var IRequest|\PHPUnit\Framework\MockObject\MockObject */ private $request; - /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */ + /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */ private $config; /** @var IGroupManager|\PHPUnit\Framework\MockObject\MockObject */ @@ -142,9 +142,9 @@ public function testAuthFailureWithToken() { ->willReturn('invalidtoken'); $this->config->expects($this->once()) - ->method('getAppValue') - ->with('serverinfo', 'token', null) - ->willReturn('megatoken'); + ->method('getAppValue') + ->with('serverinfo', 'token', null) + ->willReturn('megatoken'); $response = $this->getController(null)->info(); $this->assertEquals(['message' => 'Unauthorized'], $response->getData()); @@ -158,9 +158,9 @@ public function testAuthSuccessWithToken() { ->willReturn('megatoken'); $this->config->expects($this->once()) - ->method('getAppValue') - ->with('serverinfo', 'token', null) - ->willReturn('megatoken'); + ->method('getAppValue') + ->with('serverinfo', 'token', null) + ->willReturn('megatoken'); $response = $this->getController(null)->info(); $this->assertEquals(Http::STATUS_OK, $response->getStatus()); @@ -173,9 +173,9 @@ public function testIn() { ->willReturn('megatoken'); $this->config->expects($this->once()) - ->method('getAppValue') - ->with('serverinfo', 'token', null) - ->willReturn('megatoken'); + ->method('getAppValue') + ->with('serverinfo', 'token', null) + ->willReturn('megatoken'); $response = $this->getController(null)->info(); $this->assertEquals(Http::STATUS_OK, $response->getStatus()); diff --git a/tests/lib/SessionStatisticsTest.php b/tests/lib/SessionStatisticsTest.php index d77ec27f..0eb2d958 100644 --- a/tests/lib/SessionStatisticsTest.php +++ b/tests/lib/SessionStatisticsTest.php @@ -22,13 +22,13 @@ * @package OCA\ServerInfo\Tests */ class SessionStatisticsTest extends TestCase { - /** @var ITimeFactory | \PHPUnit_Framework_MockObject_MockObject */ + /** @var ITimeFactory | \PHPUnit_Framework_MockObject_MockObject */ private $timeFactory; - /** @var IDBConnection */ + /** @var IDBConnection */ private $connection; - /** @var SessionStatistics */ + /** @var SessionStatistics */ private $instance; private $table = 'authtoken';