|
@@ -38,14 +38,14 @@ discard block |
|
|
block discarded – undo |
|
38
|
38
|
throw new BadMethodCallException('Cannot register an extension after the Kernel has been booted.'); |
|
39
|
39
|
} |
|
40
|
40
|
|
|
41
|
|
- if (! is_subclass_of($extension, HydeExtension::class)) { |
|
|
41
|
+ if (!is_subclass_of($extension, HydeExtension::class)) { |
|
42
|
42
|
// We want to make sure that the extension class extends the HydeExtension class, |
|
43
|
43
|
// so that we won't have to check the methods we need to call exist later on. |
|
44
|
44
|
|
|
45
|
45
|
throw new InvalidArgumentException('The specified class must extend the HydeExtension class.'); |
|
46
|
46
|
} |
|
47
|
47
|
|
|
48
|
|
- if (! in_array($extension, $this->extensions, true)) { |
|
|
48
|
+ if (!in_array($extension, $this->extensions, true)) { |
|
49
|
49
|
$this->extensions[] = $extension; |
|
50
|
50
|
} |
|
51
|
51
|
} |
|
@@ -59,7 +59,7 @@ discard block |
|
|
block discarded – undo |
|
59
|
59
|
/** @return array<class-string<\Hyde\Pages\Concerns\HydePage>> */ |
|
60
|
60
|
public function getRegisteredPageClasses(): array |
|
61
|
61
|
{ |
|
62
|
|
- return array_unique(array_merge(...array_map(function (string $extension): array { |
|
|
62
|
+ return array_unique(array_merge(...array_map(function(string $extension): array { |
|
63
|
63
|
/** @var <class-string<\Hyde\Foundation\Concerns\HydeExtension>> $extension */ |
|
64
|
64
|
return $extension::getPageClasses(); |
|
65
|
65
|
}, $this->getRegisteredExtensions()))); |
Please login to merge, or discard this patch.