Passed
Push — master ( 6cfcd5...2a5655 )
by Caen
04:18 queued 40s
created
packages/publications/src/Pages/PublicationListPage.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,6 +35,6 @@
 block discarded – undo
35 35
 
36 36
     public function showInNavigation(): bool
37 37
     {
38
-        return ! in_array($this->type->getDirectory(), Config::getArray('hyde.navigation.exclude', []));
38
+        return !in_array($this->type->getDirectory(), Config::getArray('hyde.navigation.exclude', []));
39 39
     }
40 40
 }
Please login to merge, or discard this patch.
packages/framework/src/Framework/Factories/NavigationDataFactory.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
 
128 128
     private function isNonDocumentationPageInHiddenSubdirectory(): bool
129 129
     {
130
-        return ! $this->isInstanceOf(DocumentationPage::class)
130
+        return !$this->isInstanceOf(DocumentationPage::class)
131 131
             && $this->pageIsInSubdirectory()
132 132
             && $this->getSubdirectoryConfiguration() === 'hidden'
133 133
             && basename($this->identifier) !== 'index';
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
         $pageKey = $this->{$pageKeyName};
189 189
 
190 190
         // Check if the config entry is a flat array or a keyed array.
191
-        if (! array_key_exists($pageKey, $config)) {
191
+        if (!array_key_exists($pageKey, $config)) {
192 192
             // Adding an offset makes so that pages with a front matter priority, or
193 193
             // explicit keyed priority selection that is lower can be shown first.
194 194
             // This is all to make it easier to mix ways of adding priorities.
@@ -236,7 +236,7 @@  discard block
 block discarded – undo
236 236
 
237 237
     protected function invert(?bool $value): ?bool
238 238
     {
239
-        return $value === null ? null : ! $value;
239
+        return $value === null ? null : !$value;
240 240
     }
241 241
 
242 242
     protected function offset(?int $value, int $offset): ?int
Please login to merge, or discard this patch.
packages/realtime-compiler/tests/ConsoleOutputTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -8,13 +8,13 @@  discard block
 block discarded – undo
8 8
 
9 9
 uses(\Hyde\Testing\UnitTestCase::class);
10 10
 
11
-beforeEach(function () {
11
+beforeEach(function() {
12 12
     renderUsing($this->output = new BufferedOutput());
13 13
 
14 14
     $this::mockConfig();
15 15
 });
16 16
 
17
-afterEach(function () {
17
+afterEach(function() {
18 18
     renderUsing(null);
19 19
 
20 20
     Styles::flush();
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
     HydeKernel::setInstance(new HydeKernel());
23 23
 });
24 24
 
25
-test('printStartMessage method', function () {
25
+test('printStartMessage method', function() {
26 26
     HydeKernel::setInstance(new class extends HydeKernel
27 27
     {
28 28
         public static function version(): string
Please login to merge, or discard this patch.
packages/realtime-compiler/src/ConsoleOutput.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
 
41 41
         $lineLength = max(array_map('strlen', array_map('strip_tags', $lines)));
42 42
 
43
-        $lines = array_map(function (string $line) use ($lineLength): string {
43
+        $lines = array_map(function(string $line) use ($lineLength): string {
44 44
             return sprintf('&nbsp;│&nbsp;<span class="text-white">%s</span>%s│',
45 45
                 $line, str_repeat('&nbsp;', ($lineLength - strlen(strip_tags($line))) + 1)
46 46
             );
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 
57 57
     public function getFormatter(): Closure
58 58
     {
59
-        return function (string $type, string $line): void {
59
+        return function(string $type, string $line): void {
60 60
             $this->handleOutput($line);
61 61
         };
62 62
     }
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
 
70 70
     protected function handleOutput(string $buffer): void
71 71
     {
72
-        str($buffer)->trim()->explode("\n")->each(function (string $line): void {
72
+        str($buffer)->trim()->explode("\n")->each(function(string $line): void {
73 73
             $this->renderLine($this->formatLineForOutput($line));
74 74
         });
75 75
     }
Please login to merge, or discard this patch.
packages/realtime-compiler/src/Http/BaseController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -62,12 +62,12 @@
 block discarded – undo
62 62
 
63 63
     protected function authorizePostRequest(): void
64 64
     {
65
-        if (! $this->isRequestMadeFromLocalhost()) {
65
+        if (!$this->isRequestMadeFromLocalhost()) {
66 66
             throw new HttpException(403, "Refusing to serve request from address {$_SERVER['REMOTE_ADDR']} (must be on localhost)");
67 67
         }
68 68
 
69 69
         if ($this->withSession) {
70
-            if (! $this->validateCSRFToken($this->request->get('_token'))) {
70
+            if (!$this->validateCSRFToken($this->request->get('_token'))) {
71 71
                 throw new HttpException(403, 'Invalid CSRF token');
72 72
             }
73 73
         }
Please login to merge, or discard this patch.
packages/realtime-compiler/src/Http/LiveEditController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -46,11 +46,11 @@
 block discarded – undo
46 46
 
47 47
         $page = Hyde::pages()->getPage($pagePath);
48 48
 
49
-        if (! $page instanceof BaseMarkdownPage) {
49
+        if (!$page instanceof BaseMarkdownPage) {
50 50
             $this->abort(400, 'Page is not a markdown page');
51 51
         }
52 52
 
53
-        if (! $force && hash('sha256', $page->markdown()->body()) !== $currentContentHash) {
53
+        if (!$force && hash('sha256', $page->markdown()->body()) !== $currentContentHash) {
54 54
             $this->abort(409, 'Content has changed in another window');
55 55
         }
56 56
 
Please login to merge, or discard this patch.
packages/framework/src/Console/Commands/ServeCommand.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
     protected function getEnvironmentVariables(): array
82 82
     {
83 83
         return Arr::whereNotNull([
84
-            'HYDE_SERVER_REQUEST_OUTPUT' => ! $this->option('no-ansi'),
84
+            'HYDE_SERVER_REQUEST_OUTPUT' => !$this->option('no-ansi'),
85 85
             'HYDE_SERVER_SAVE_PREVIEW' => $this->parseEnvironmentOption('save-preview'),
86 86
             'HYDE_SERVER_DASHBOARD' => $this->parseEnvironmentOption('dashboard'),
87 87
             'HYDE_PRETTY_URLS' => $this->parseEnvironmentOption('pretty-urls'),
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
 
92 92
     protected function configureOutput(): void
93 93
     {
94
-        if (! $this->useBasicOutput()) {
94
+        if (!$this->useBasicOutput()) {
95 95
             $this->console = new ConsoleOutput($this->output->isVerbose());
96 96
         }
97 97
     }
@@ -105,14 +105,14 @@  discard block
 block discarded – undo
105 105
 
106 106
     protected function getOutputHandler(): Closure
107 107
     {
108
-        return $this->useBasicOutput() ? function (string $type, string $line): void {
108
+        return $this->useBasicOutput() ? function(string $type, string $line): void {
109 109
             $this->output->write($line);
110 110
         } : $this->console->getFormatter();
111 111
     }
112 112
 
113 113
     protected function useBasicOutput(): bool
114 114
     {
115
-        return $this->option('no-ansi') || ! class_exists(ConsoleOutput::class);
115
+        return $this->option('no-ansi') || !class_exists(ConsoleOutput::class);
116 116
     }
117 117
 
118 118
     protected function parseEnvironmentOption(string $name): ?string
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
 
154 154
         $process = $command ? Process::command(sprintf('%s http://%s:%d', $command, $this->getHostSelection(), $this->getPortSelection()))->run() : null;
155 155
 
156
-        if (! $process || $process->failed()) {
156
+        if (!$process || $process->failed()) {
157 157
             $this->warn('Unable to open the site preview in the browser on your system:');
158 158
             $this->line(sprintf('  %s', str_replace("\n", "\n  ", $process ? $process->errorOutput() : "Missing suitable 'open' binary.")));
159 159
             $this->newLine();
Please login to merge, or discard this patch.
src/Markdown/Contracts/FrontMatter/SubSchemas/NavigationSchema.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -14,8 +14,8 @@
 block discarded – undo
14 14
 {
15 15
     public const NAVIGATION_SCHEMA = [
16 16
         'label' => 'string', // The text to display
17
-        'priority' => 'int',  // Order is also supported
18
-        'hidden' => 'bool',  // Visible is also supported (but obviously invert the value)
17
+        'priority' => 'int', // Order is also supported
18
+        'hidden' => 'bool', // Visible is also supported (but obviously invert the value)
19 19
         'group' => 'string', // Category is also supported
20 20
     ];
21 21
 }
Please login to merge, or discard this patch.
packages/framework/src/Support/Includes.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
     {
54 54
         $path = static::path($filename);
55 55
 
56
-        if (! file_exists($path)) {
56
+        if (!file_exists($path)) {
57 57
             return $default;
58 58
         }
59 59
 
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
     {
72 72
         $path = static::path(basename($filename, '.html').'.html');
73 73
 
74
-        if (! file_exists($path)) {
74
+        if (!file_exists($path)) {
75 75
             return $default === null ? null : $default;
76 76
         }
77 77
 
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
     {
90 90
         $path = static::path(basename($filename, '.md').'.md');
91 91
 
92
-        if (! file_exists($path)) {
92
+        if (!file_exists($path)) {
93 93
             return $default === null ? null : Markdown::render($default);
94 94
         }
95 95
 
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
     {
108 108
         $path = static::path(basename($filename, '.blade.php').'.blade.php');
109 109
 
110
-        if (! file_exists($path)) {
110
+        if (!file_exists($path)) {
111 111
             return $default === null ? null : Blade::render($default);
112 112
         }
113 113
 
Please login to merge, or discard this patch.