Skip to content

Commit 1e9294a

Browse files
committed
Upgrade coding standard
1 parent fc6e938 commit 1e9294a

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
},
3939
"require-dev": {
4040
"ext-xdebug": "*",
41-
"aplus/coding-standard": "^2.1",
41+
"aplus/coding-standard": "^2.8",
4242
"ergebnis/composer-normalize": "^2.25",
4343
"jetbrains/phpstorm-attributes": "^1.0",
4444
"phpmd/phpmd": "^2.13",

src/Autoloader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ protected function loadDebug(string $class) : bool
387387
return $loaded;
388388
}
389389

390-
public function setDebugCollector(AutoloadCollector $debugCollector = null, string $name = 'default') : static
390+
public function setDebugCollector(?AutoloadCollector $debugCollector = null, string $name = 'default') : static
391391
{
392392
if ($debugCollector) {
393393
$this->debugCollector = $debugCollector;

src/Debug/AutoloadCollector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ protected function renderPreload() : string
242242
/**
243243
* @return array<string,mixed>|null
244244
*/
245-
protected function getOpcacheConfiguration() : array | null
245+
protected function getOpcacheConfiguration() : ?array
246246
{
247247
return \function_exists('opcache_get_configuration')
248248
? (array) \opcache_get_configuration()

src/Preloader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ class Preloader
5353
* null to disable packages loading
5454
*/
5555
public function __construct(
56-
Autoloader $autoloader = null,
56+
?Autoloader $autoloader = null,
5757
?string $packagesDir = __DIR__ . '/../../'
5858
) {
5959
$this->loadPackages = $packagesDir !== null;

tests/Debug/AutoloadCollectorTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ public function testLoad() : void
103103
public function testPreload() : void
104104
{
105105
$collector = new class() extends AutoloadCollector {
106-
protected function getOpcacheConfiguration() : array | null
106+
protected function getOpcacheConfiguration() : ?array
107107
{
108108
return [
109109
'directives' => [
@@ -122,7 +122,7 @@ protected function getOpcacheConfiguration() : array | null
122122
public function testPreloadNotAvailable() : void
123123
{
124124
$collector = new class() extends AutoloadCollector {
125-
protected function getOpcacheConfiguration() : array | null
125+
protected function getOpcacheConfiguration() : ?array
126126
{
127127
return null;
128128
}
@@ -137,7 +137,7 @@ protected function getOpcacheConfiguration() : array | null
137137
public function testPreloadNotSet() : void
138138
{
139139
$collector = new class() extends AutoloadCollector {
140-
protected function getOpcacheConfiguration() : array | null
140+
protected function getOpcacheConfiguration() : ?array
141141
{
142142
return [];
143143
}

0 commit comments

Comments
 (0)