Passed
Push — master ( d5b24d...398022 )
by Caen
04:06 queued 13s
created
packages/framework/src/Foundation/ConsoleKernel.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
         // the default LoadConfiguration bootstrapper class with our implementation.
29 29
         // We do this by swapping out the LoadConfiguration class with our own.
30 30
 
31
-        return array_values((array) tap(array_combine($bootstrappers, $bootstrappers), function (array &$array): void {
31
+        return array_values((array) tap(array_combine($bootstrappers, $bootstrappers), function(array &$array): void {
32 32
             $array[\LaravelZero\Framework\Bootstrap\LoadConfiguration::class] = \Hyde\Foundation\Internal\LoadConfiguration::class;
33 33
         }));
34 34
     }
Please login to merge, or discard this patch.
packages/framework/src/Framework/Services/AssetService.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@
 block discarded – undo
67 67
 
68 68
     public function injectTailwindConfig(): string
69 69
     {
70
-        if (! file_exists(Hyde::path('tailwind.config.js'))) {
70
+        if (!file_exists(Hyde::path('tailwind.config.js'))) {
71 71
             return '';
72 72
         }
73 73
 
Please login to merge, or discard this patch.
packages/realtime-compiler/tests/RealtimeCompilerTest.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -11,13 +11,13 @@  discard block
 block discarded – undo
11 11
 
12 12
 define('BASE_PATH', realpath(__DIR__.'/../../../'));
13 13
 
14
-if (BASE_PATH === false || ! file_exists(BASE_PATH.'/hyde')) {
14
+if (BASE_PATH === false || !file_exists(BASE_PATH.'/hyde')) {
15 15
     throw new InvalidArgumentException('This test suite must be run from the root of the hydephp/develop monorepo.');
16 16
 }
17 17
 
18 18
 ob_start();
19 19
 
20
-test('handle routes index page', function () {
20
+test('handle routes index page', function() {
21 21
     putenv('SERVER_DASHBOARD=false');
22 22
     mockRoute('');
23 23
 
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
     Filesystem::unlink('_site/index.html');
37 37
 });
38 38
 
39
-test('handle routes custom pages', function () {
39
+test('handle routes custom pages', function() {
40 40
     mockRoute('foo');
41 41
 
42 42
     Filesystem::put('_pages/foo.md', '# Hello World!');
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
     Filesystem::unlink('_site/foo.html');
55 55
 });
56 56
 
57
-test('handle routes pages with .html extension', function () {
57
+test('handle routes pages with .html extension', function() {
58 58
     mockRoute('foo.html');
59 59
 
60 60
     Filesystem::put('_pages/foo.md', '# Hello World!');
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
     Filesystem::unlink('_site/foo.html');
73 73
 });
74 74
 
75
-test('handle routes static assets', function () {
75
+test('handle routes static assets', function() {
76 76
     mockRoute('media/app.css');
77 77
 
78 78
     $kernel = new HttpKernel();
@@ -85,14 +85,14 @@  discard block
 block discarded – undo
85 85
     expect($response->body)->toBe(file_get_contents(\Hyde\Hyde::path('_media/app.css')));
86 86
 });
87 87
 
88
-test('handle throws route not found exception for missing route', function () {
88
+test('handle throws route not found exception for missing route', function() {
89 89
     mockRoute('missing');
90 90
 
91 91
     $kernel = new HttpKernel();
92 92
     $kernel->handle(new Request());
93 93
 })->throws(RouteNotFoundException::class, 'Route [missing] not found');
94 94
 
95
-test('handle sends 404 error response for missing asset', function () {
95
+test('handle sends 404 error response for missing asset', function() {
96 96
     mockRoute('missing.css');
97 97
 
98 98
     $kernel = new HttpKernel();
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
 //    Filesystem::unlink('_site/foo.html');
124 124
 //})->skip('Underlying framework does not buffer headers (yet)');
125 125
 
126
-test('trailing slashes are normalized from route', function () {
126
+test('trailing slashes are normalized from route', function() {
127 127
     mockRoute('foo/');
128 128
 
129 129
     Filesystem::put('_pages/foo.md', '# Hello World!');
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
     Filesystem::unlink('_site/foo.html');
142 142
 });
143 143
 
144
-test('docs uri path is rerouted to docs/index', function () {
144
+test('docs uri path is rerouted to docs/index', function() {
145 145
     mockRoute('docs');
146 146
 
147 147
     Filesystem::put('_docs/index.md', '# Hello World!');
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
     Filesystem::unlink('_site/docs/index.html');
160 160
 });
161 161
 
162
-test('docs/search renders search page', function () {
162
+test('docs/search renders search page', function() {
163 163
     mockRoute('docs/search');
164 164
 
165 165
     $kernel = new HttpKernel();
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
     Filesystem::unlink('_site/docs/search.html');
175 175
 });
176 176
 
177
-test('ping route returns ping response', function () {
177
+test('ping route returns ping response', function() {
178 178
     mockRoute('ping');
179 179
 
180 180
     $kernel = new HttpKernel();
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
         ->and($response->statusMessage)->toBe('OK');
186 186
 });
187 187
 
188
-test('exception handling', function () {
188
+test('exception handling', function() {
189 189
     $exception = new Exception('foo');
190 190
     $response = ExceptionHandler::handle($exception);
191 191
 
Please login to merge, or discard this patch.
packages/publications/src/Models/PublicationType.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -233,14 +233,14 @@
 block discarded – undo
233 233
 
234 234
     protected function parseFieldData(array $fields): Collection
235 235
     {
236
-        return Collection::make($fields)->map(function (array $data): PublicationFieldDefinition {
236
+        return Collection::make($fields)->map(function(array $data): PublicationFieldDefinition {
237 237
             return new PublicationFieldDefinition(...$data);
238 238
         });
239 239
     }
240 240
 
241 241
     protected function withoutNullValues(array $array): array
242 242
     {
243
-        return array_filter($array, fn (mixed $value): bool => ! is_null($value));
243
+        return array_filter($array, fn (mixed $value): bool => !is_null($value));
244 244
     }
245 245
 
246 246
     /**
Please login to merge, or discard this patch.
packages/publications/src/Views/Components/RelatedPublicationsComponent.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -42,14 +42,14 @@
 block discarded – undo
42 42
         $currentHydePage = Hyde::currentRoute()->getPage();
43 43
 
44 44
         // If not a publication page, exit early
45
-        if (! $currentHydePage instanceof PublicationPage) {
45
+        if (!$currentHydePage instanceof PublicationPage) {
46 46
             return [];
47 47
         }
48 48
 
49 49
         $publicationType = $currentHydePage->getType();
50 50
 
51 51
         // Get the tag fields for the current publicationType or exit early if there aren't any
52
-        $publicationTypeTagFields = $publicationType->getFields()->filter(function (PublicationFieldDefinition $field): bool {
52
+        $publicationTypeTagFields = $publicationType->getFields()->filter(function(PublicationFieldDefinition $field): bool {
53 53
             return $field->type === PublicationFieldTypes::Tag;
54 54
         });
55 55
         if ($publicationTypeTagFields->isEmpty()) {
Please login to merge, or discard this patch.
packages/publications/src/Providers/TranslationServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
     {
17 17
         parent::register();
18 18
 
19
-        if (! is_dir(lang_path())) {
19
+        if (!is_dir(lang_path())) {
20 20
             $this->app->useLangPath(__DIR__.'/../../resources/lang');
21 21
         }
22 22
 
Please login to merge, or discard this patch.
packages/publications/src/PublicationsExtension.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
     /** @return \Illuminate\Support\Collection<string, \Hyde\Publications\Models\PublicationType> */
34 34
     public function getTypes(): Collection
35 35
     {
36
-        if (! isset($this->types)) {
36
+        if (!isset($this->types)) {
37 37
             $this->types = $this->parsePublicationTypes();
38 38
         }
39 39
 
@@ -53,8 +53,8 @@  discard block
 block discarded – undo
53 53
     {
54 54
         $this->types = $this->parsePublicationTypes();
55 55
 
56
-        $this->types->each(function (PublicationType $type) use ($collection): void {
57
-            Collection::make($this->getPublicationFilesForType($type))->map(function (string $filepath) use ($collection): void {
56
+        $this->types->each(function(PublicationType $type) use ($collection): void {
57
+            Collection::make($this->getPublicationFilesForType($type))->map(function(string $filepath) use ($collection): void {
58 58
                 $collection->put(Hyde::pathToRelative($filepath), SourceFile::make($filepath, PublicationPage::class));
59 59
             });
60 60
         });
@@ -71,11 +71,11 @@  discard block
 block discarded – undo
71 71
 
72 72
     protected function discoverPublicationPages(PageCollection $instance): void
73 73
     {
74
-        Files::getFiles(PublicationPage::class)->each(function (SourceFile $file) use ($instance): void {
74
+        Files::getFiles(PublicationPage::class)->each(function(SourceFile $file) use ($instance): void {
75 75
             $instance->addPage(PublicationPage::parse(Str::before($file->getPath(), PublicationPage::fileExtension())));
76 76
         });
77 77
 
78
-        $this->types->each(function (PublicationType $type) use ($instance): void {
78
+        $this->types->each(function(PublicationType $type) use ($instance): void {
79 79
             $this->generatePublicationListingPageForType($type, $instance);
80 80
         });
81 81
     }
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
     /** @return Collection<string, \Hyde\Publications\Pages\PublicationPage> */
117 117
     protected function parsePublicationTypes(): Collection
118 118
     {
119
-        return Collection::make($this->getSchemaFiles())->mapWithKeys(function (string $schemaFile): array {
119
+        return Collection::make($this->getSchemaFiles())->mapWithKeys(function(string $schemaFile): array {
120 120
             $type = PublicationType::fromFile(Hyde::pathToRelative($schemaFile));
121 121
 
122 122
             return [$type->getDirectory() => $type];
Please login to merge, or discard this patch.
packages/publications/src/Actions/PublicationSchemaValidator.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
     /** @return array<array-key, array<array-key, string>> */
94 94
     protected function evaluateFieldValidators(): array
95 95
     {
96
-        return collect($this->fieldValidators)->map(function (Validator $validator): array {
96
+        return collect($this->fieldValidators)->map(function(Validator $validator): array {
97 97
             return $validator->errors()->all();
98 98
         })->all();
99 99
     }
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
 
113 113
     protected function mapRulesInput(array $rules, stdClass $input): array
114 114
     {
115
-        return collect($rules)->mapWithKeys(function (string $rule, string $key) use ($input): array {
115
+        return collect($rules)->mapWithKeys(function(string $rule, string $key) use ($input): array {
116 116
             return [$key => $input->{$key} ?? null];
117 117
         })->all();
118 118
     }
Please login to merge, or discard this patch.
packages/publications/src/Actions/SeedsPublicationFiles.php 1 patch
Spacing   +47 added lines, -47 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
             $this->getCanonicalFieldName($field);
68 68
         }
69 69
 
70
-        if (! $this->canonicalValue) {
70
+        if (!$this->canonicalValue) {
71 71
             $this->canonicalValue = $this->fakeSentence(3);
72 72
         }
73 73
     }
@@ -139,52 +139,52 @@  discard block
 block discarded – undo
139 139
     }
140 140
 
141 141
     private const WORDS = [
142
-        'lorem',        'ipsum',       'dolor',        'sit',
143
-        'amet',         'consectetur', 'adipiscing',   'elit',
144
-        'a',            'ac',          'accumsan',     'ad',
145
-        'aenean',       'aliquam',     'aliquet',      'ante',
146
-        'aptent',       'arcu',        'at',           'auctor',
147
-        'augue',        'bibendum',    'blandit',      'class',
148
-        'commodo',      'condimentum', 'congue',       'consequat',
149
-        'conubia',      'convallis',   'cras',         'cubilia',
150
-        'cum',          'curabitur',   'curae',        'cursus',
151
-        'dapibus',      'diam',        'dictum',       'dictumst',
152
-        'dignissim',    'dis',         'donec',        'dui',
153
-        'duis',         'egestas',     'eget',         'eleifend',
154
-        'elementum',    'enim',        'erat',         'eros',
155
-        'est',          'et',          'etiam',        'eu',
156
-        'euismod',      'facilisi',    'facilisis',    'fames',
157
-        'faucibus',     'felis',       'fermentum',    'feugiat',
158
-        'fringilla',    'fusce',       'gravida',      'habitant',
159
-        'habitasse',    'hac',         'hendrerit',    'himenaeos',
160
-        'iaculis',      'id',          'imperdiet',    'in',
161
-        'inceptos',     'integer',     'interdum',     'justo',
162
-        'lacinia',      'lacus',       'laoreet',      'lectus',
163
-        'leo',          'libero',      'ligula',       'litora',
164
-        'lobortis',     'luctus',      'maecenas',     'magna',
165
-        'magnis',       'malesuada',   'massa',        'mattis',
166
-        'mauris',       'metus',       'mi',           'molestie',
167
-        'mollis',       'montes',      'morbi',        'mus',
168
-        'nam',          'nascetur',    'natoque',      'nec',
169
-        'neque',        'netus',       'nibh',         'nisi',
170
-        'nisl',         'non',         'nostra',       'nulla',
171
-        'nullam',       'nunc',        'odio',         'orci',
172
-        'ornare',       'parturient',  'pellentesque', 'penatibus',
173
-        'per',          'pharetra',    'phasellus',    'placerat',
174
-        'platea',       'porta',       'porttitor',    'posuere',
175
-        'potenti',      'praesent',    'pretium',      'primis',
176
-        'proin',        'pulvinar',    'purus',        'quam',
177
-        'quis',         'quisque',     'rhoncus',      'ridiculus',
178
-        'risus',        'rutrum',      'sagittis',     'sapien',
179
-        'scelerisque',  'sed',         'sem',          'semper',
180
-        'senectus',     'sociis',      'sociosqu',     'sodales',
181
-        'sollicitudin', 'suscipit',    'suspendisse',  'taciti',
182
-        'tellus',       'tempor',      'tempus',       'tincidunt',
183
-        'torquent',     'tortor',      'tristique',    'turpis',
184
-        'ullamcorper',  'ultrices',    'ultricies',    'urna',
185
-        'ut',           'varius',      'vehicula',     'vel',
186
-        'velit',        'venenatis',   'vestibulum',   'vitae',
187
-        'vivamus',      'viverra',     'volutpat',     'vulputate',
142
+        'lorem', 'ipsum', 'dolor', 'sit',
143
+        'amet', 'consectetur', 'adipiscing', 'elit',
144
+        'a', 'ac', 'accumsan', 'ad',
145
+        'aenean', 'aliquam', 'aliquet', 'ante',
146
+        'aptent', 'arcu', 'at', 'auctor',
147
+        'augue', 'bibendum', 'blandit', 'class',
148
+        'commodo', 'condimentum', 'congue', 'consequat',
149
+        'conubia', 'convallis', 'cras', 'cubilia',
150
+        'cum', 'curabitur', 'curae', 'cursus',
151
+        'dapibus', 'diam', 'dictum', 'dictumst',
152
+        'dignissim', 'dis', 'donec', 'dui',
153
+        'duis', 'egestas', 'eget', 'eleifend',
154
+        'elementum', 'enim', 'erat', 'eros',
155
+        'est', 'et', 'etiam', 'eu',
156
+        'euismod', 'facilisi', 'facilisis', 'fames',
157
+        'faucibus', 'felis', 'fermentum', 'feugiat',
158
+        'fringilla', 'fusce', 'gravida', 'habitant',
159
+        'habitasse', 'hac', 'hendrerit', 'himenaeos',
160
+        'iaculis', 'id', 'imperdiet', 'in',
161
+        'inceptos', 'integer', 'interdum', 'justo',
162
+        'lacinia', 'lacus', 'laoreet', 'lectus',
163
+        'leo', 'libero', 'ligula', 'litora',
164
+        'lobortis', 'luctus', 'maecenas', 'magna',
165
+        'magnis', 'malesuada', 'massa', 'mattis',
166
+        'mauris', 'metus', 'mi', 'molestie',
167
+        'mollis', 'montes', 'morbi', 'mus',
168
+        'nam', 'nascetur', 'natoque', 'nec',
169
+        'neque', 'netus', 'nibh', 'nisi',
170
+        'nisl', 'non', 'nostra', 'nulla',
171
+        'nullam', 'nunc', 'odio', 'orci',
172
+        'ornare', 'parturient', 'pellentesque', 'penatibus',
173
+        'per', 'pharetra', 'phasellus', 'placerat',
174
+        'platea', 'porta', 'porttitor', 'posuere',
175
+        'potenti', 'praesent', 'pretium', 'primis',
176
+        'proin', 'pulvinar', 'purus', 'quam',
177
+        'quis', 'quisque', 'rhoncus', 'ridiculus',
178
+        'risus', 'rutrum', 'sagittis', 'sapien',
179
+        'scelerisque', 'sed', 'sem', 'semper',
180
+        'senectus', 'sociis', 'sociosqu', 'sodales',
181
+        'sollicitudin', 'suscipit', 'suspendisse', 'taciti',
182
+        'tellus', 'tempor', 'tempus', 'tincidunt',
183
+        'torquent', 'tortor', 'tristique', 'turpis',
184
+        'ullamcorper', 'ultrices', 'ultricies', 'urna',
185
+        'ut', 'varius', 'vehicula', 'vel',
186
+        'velit', 'venenatis', 'vestibulum', 'vitae',
187
+        'vivamus', 'viverra', 'volutpat', 'vulputate',
188 188
     ];
189 189
 
190 190
     private function fakeSentence(int $words): string
Please login to merge, or discard this patch.