@@ -43,7 +43,7 @@ |
||
43 | 43 | |
44 | 44 | public function execute(): bool|int |
45 | 45 | { |
46 | - if (! array_key_exists($this->selected, static::$options)) { |
|
46 | + if (!array_key_exists($this->selected, static::$options)) { |
|
47 | 47 | return 404; |
48 | 48 | } |
49 | 49 |
@@ -93,11 +93,11 @@ |
||
93 | 93 | |
94 | 94 | private function getCanonicalUrl(): ?string |
95 | 95 | { |
96 | - if (! empty($this->matter('canonicalUrl'))) { |
|
96 | + if (!empty($this->matter('canonicalUrl'))) { |
|
97 | 97 | return $this->matter('canonicalUrl'); |
98 | 98 | } |
99 | 99 | |
100 | - if (Hyde::hasSiteUrl() && ! empty($this->identifier)) { |
|
100 | + if (Hyde::hasSiteUrl() && !empty($this->identifier)) { |
|
101 | 101 | return Hyde::url($this->outputPath); |
102 | 102 | } |
103 | 103 |
@@ -65,14 +65,14 @@ |
||
65 | 65 | |
66 | 66 | protected function registerPreProcessor(string $class, bool $when = true): void |
67 | 67 | { |
68 | - if (! in_array($class, $this->preprocessors) && $when) { |
|
68 | + if (!in_array($class, $this->preprocessors) && $when) { |
|
69 | 69 | $this->preprocessors[] = $class; |
70 | 70 | } |
71 | 71 | } |
72 | 72 | |
73 | 73 | protected function registerPostProcessor(string $class, bool $when = true): void |
74 | 74 | { |
75 | - if (! in_array($class, $this->postprocessors) && $when) { |
|
75 | + if (!in_array($class, $this->postprocessors) && $when) { |
|
76 | 76 | $this->postprocessors[] = $class; |
77 | 77 | } |
78 | 78 | } |
@@ -14,7 +14,7 @@ |
||
14 | 14 | */ |
15 | 15 | public static function needsDirectory(string $directory): void |
16 | 16 | { |
17 | - if (! file_exists($directory)) { |
|
17 | + if (!file_exists($directory)) { |
|
18 | 18 | mkdir($directory, recursive: true); |
19 | 19 | } |
20 | 20 | } |
@@ -22,7 +22,7 @@ |
||
22 | 22 | echo "Short version: $shortVersion\n"; |
23 | 23 | $composerJson = json_decode(file_get_contents(__DIR__.'./../../packages/hyde/composer.json'), true); |
24 | 24 | $composerJson['require']['hyde/framework'] = "^0.$shortVersion"; |
25 | -file_put_contents(__DIR__.'./../../packages/hyde/composer.json', json_encode($composerJson, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES)); |
|
25 | +file_put_contents(__DIR__.'./../../packages/hyde/composer.json', json_encode($composerJson, JSON_PRETTY_PRINT|JSON_UNESCAPED_SLASHES)); |
|
26 | 26 | |
27 | 27 | echo "Transforming upcoming release notes... \n"; |
28 | 28 |
@@ -121,14 +121,14 @@ |
||
121 | 121 | |
122 | 122 | protected function validateType(string $pageClass): void |
123 | 123 | { |
124 | - if (! in_array($pageClass, [MarkdownPage::class, BladePage::class, DocumentationPage::class])) { |
|
124 | + if (!in_array($pageClass, [MarkdownPage::class, BladePage::class, DocumentationPage::class])) { |
|
125 | 125 | throw new UnsupportedPageTypeException('The page type must be either "markdown", "blade", or "documentation"'); |
126 | 126 | } |
127 | 127 | } |
128 | 128 | |
129 | 129 | protected function failIfFileCannotBeSaved(string $path): void |
130 | 130 | { |
131 | - if (file_exists($path) && ! $this->force) { |
|
131 | + if (file_exists($path) && !$this->force) { |
|
132 | 132 | throw new FileConflictException($path); |
133 | 133 | } |
134 | 134 | } |
@@ -34,7 +34,7 @@ |
||
34 | 34 | |
35 | 35 | $this->displaySelections($creator); |
36 | 36 | |
37 | - if (! $this->confirm('Do you wish to continue?', true)) { |
|
37 | + if (!$this->confirm('Do you wish to continue?', true)) { |
|
38 | 38 | $this->info('Aborting.'); |
39 | 39 | |
40 | 40 | return 130; |
@@ -53,7 +53,7 @@ |
||
53 | 53 | |
54 | 54 | public function generate(): static |
55 | 55 | { |
56 | - Route::all()->each(function (Route $route): void { |
|
56 | + Route::all()->each(function(Route $route): void { |
|
57 | 57 | $this->addRoute($route); |
58 | 58 | }); |
59 | 59 |
@@ -44,7 +44,7 @@ |
||
44 | 44 | |
45 | 45 | protected function escape(string $string): string |
46 | 46 | { |
47 | - return htmlspecialchars($string, ENT_XML1 | ENT_COMPAT, 'UTF-8'); |
|
47 | + return htmlspecialchars($string, ENT_XML1|ENT_COMPAT, 'UTF-8'); |
|
48 | 48 | } |
49 | 49 | |
50 | 50 | protected function addChild(SimpleXMLElement $element, string $name, string $value): SimpleXMLElement |