Skip to content

Commit

Permalink
Merge pull request #322 from nextcloud/dependabot/composer/nextcloud/…
Browse files Browse the repository at this point in the history
…coding-standard-1.2.1

chore(deps-dev): Bump nextcloud/coding-standard from 1.1.1 to 1.2.1
  • Loading branch information
nickvergessen authored Feb 5, 2024
2 parents 59924f5 + 72fdf49 commit f92de5c
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 17 deletions.
24 changes: 12 additions & 12 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/DataCollector/EventLoggerDataProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()] = [
Expand Down
2 changes: 1 addition & 1 deletion lib/DataCollector/HttpDataCollector.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions lib/DataCollector/MemoryDataCollector.php
Original file line number Diff line number Diff line change
Expand Up @@ -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')),
Expand All @@ -39,7 +39,7 @@ public function getMemoryLimit() {
* @return int|float
*/
private function convertToBytes(string $memoryLimit) {
if ('-1' === $memoryLimit) {
if ($memoryLimit === '-1') {
return -1;
}

Expand Down
2 changes: 1 addition & 1 deletion tests/stubs/oc_core_command_base.php
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit f92de5c

Please sign in to comment.