diff --git a/composer.lock b/composer.lock index e32f8df..fbc13f1 100644 --- a/composer.lock +++ b/composer.lock @@ -819,16 +819,16 @@ }, { "name": "nextcloud/coding-standard", - "version": "v1.1.1", + "version": "v1.2.1", "source": { "type": "git", "url": "https://github.com/nextcloud/coding-standard.git", - "reference": "55def702fb9a37a219511e1d8c6fe8e37164c1fb" + "reference": "cf5f18d989ec62fb4cdc7fc92a36baf34b3d829e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nextcloud/coding-standard/zipball/55def702fb9a37a219511e1d8c6fe8e37164c1fb", - "reference": "55def702fb9a37a219511e1d8c6fe8e37164c1fb", + "url": "https://api.github.com/repos/nextcloud/coding-standard/zipball/cf5f18d989ec62fb4cdc7fc92a36baf34b3d829e", + "reference": "cf5f18d989ec62fb4cdc7fc92a36baf34b3d829e", "shasum": "" }, "require": { @@ -854,9 +854,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.1.1" + "source": "https://github.com/nextcloud/coding-standard/tree/v1.2.1" }, - "time": "2023-06-01T12:05:01+00:00" + "time": "2024-02-01T14:54:37+00:00" }, { "name": "nextcloud/ocp", @@ -1072,16 +1072,16 @@ }, { "name": "php-cs-fixer/shim", - "version": "v3.40.0", + "version": "v3.49.0", "source": { "type": "git", "url": "https://github.com/PHP-CS-Fixer/shim.git", - "reference": "4c063eff281b1e3a73c33c0d5c39e8e2b766464e" + "reference": "f7d3219cac46632f12362c9aa7c2ac0d2fe92c52" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHP-CS-Fixer/shim/zipball/4c063eff281b1e3a73c33c0d5c39e8e2b766464e", - "reference": "4c063eff281b1e3a73c33c0d5c39e8e2b766464e", + "url": "https://api.github.com/repos/PHP-CS-Fixer/shim/zipball/f7d3219cac46632f12362c9aa7c2ac0d2fe92c52", + "reference": "f7d3219cac46632f12362c9aa7c2ac0d2fe92c52", "shasum": "" }, "require": { @@ -1118,9 +1118,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.40.0" + "source": "https://github.com/PHP-CS-Fixer/shim/tree/v3.49.0" }, - "time": "2023-11-26T09:26:25+00:00" + "time": "2024-02-02T00:42:09+00:00" }, { "name": "phpdocumentor/reflection-common", diff --git a/lib/DataCollector/EventLoggerDataProvider.php b/lib/DataCollector/EventLoggerDataProvider.php index 3c11b9c..371b63f 100644 --- a/lib/DataCollector/EventLoggerDataProvider.php +++ b/lib/DataCollector/EventLoggerDataProvider.php @@ -19,7 +19,7 @@ public function __construct(IEventLogger $eventLogger) { $this->eventLogger = $eventLogger; } - public function collect(Request $request, Response $response, \Throwable $exception = null): void { + public function collect(Request $request, Response $response, ?\Throwable $exception = null): void { $this->data = []; foreach ($this->eventLogger->getEvents() as $event) { $this->data[$event->getId()] = [ diff --git a/lib/DataCollector/HttpDataCollector.php b/lib/DataCollector/HttpDataCollector.php index 73763b5..39d08c5 100644 --- a/lib/DataCollector/HttpDataCollector.php +++ b/lib/DataCollector/HttpDataCollector.php @@ -16,7 +16,7 @@ public function getName(): string { return 'http'; } - public function collect(Request $request, Response $response, \Throwable $exception = null): void { + public function collect(Request $request, Response $response, ?\Throwable $exception = null): void { try { $content = $request->getParams(); } catch (\THrowable $ex) { diff --git a/lib/DataCollector/MemoryDataCollector.php b/lib/DataCollector/MemoryDataCollector.php index d2aaeb0..f59a5c9 100644 --- a/lib/DataCollector/MemoryDataCollector.php +++ b/lib/DataCollector/MemoryDataCollector.php @@ -17,7 +17,7 @@ public function getName(): string { return 'memory'; } - public function collect(Request $request, Response $response, \Throwable $exception = null): void { + public function collect(Request $request, Response $response, ?\Throwable $exception = null): void { $this->data = [ 'memory' => memory_get_peak_usage(true), 'memory_limit' => $this->convertToBytes(ini_get('memory_limit')), @@ -39,7 +39,7 @@ public function getMemoryLimit() { * @return int|float */ private function convertToBytes(string $memoryLimit) { - if ('-1' === $memoryLimit) { + if ($memoryLimit === '-1') { return -1; } diff --git a/tests/stubs/oc_core_command_base.php b/tests/stubs/oc_core_command_base.php index 3fc248f..d6b6e0d 100644 --- a/tests/stubs/oc_core_command_base.php +++ b/tests/stubs/oc_core_command_base.php @@ -15,7 +15,7 @@ class Base { protected string $defaultOutputFormat = self::OUTPUT_FORMAT_PLAIN; - public function __construct(string $name = null) { + public function __construct(?string $name = null) { } protected function configure() {