Passed
Push — master ( 10105b...1efe78 )
by Caen
03:18 queued 12s
created
packages/framework/src/Framework/Concerns/ValidatesExistence.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
         $filepath = $model::sourceDirectory().'/'.
24 24
             $slug.$model::fileExtension();
25 25
 
26
-        if (! file_exists(Hyde::path($filepath))) {
26
+        if (!file_exists(Hyde::path($filepath))) {
27 27
             throw new FileNotFoundException($filepath);
28 28
         }
29 29
     }
Please login to merge, or discard this patch.
framework/src/Framework/Concerns/Internal/SetsUpMarkdownConverter.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -65,14 +65,14 @@
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
packages/framework/src/Framework/Concerns/InteractsWithDirectories.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
packages/framework/src/Framework/Concerns/InteractsWithFrontMatter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,6 +42,6 @@
 block discarded – undo
42 42
      */
43 43
     public function has(string $key): bool
44 44
     {
45
-        return ! blank($this->get($key));
45
+        return !blank($this->get($key));
46 46
     }
47 47
 }
Please login to merge, or discard this patch.
packages/framework/src/Foundation/RouteCollection.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 {
36 36
     public function getRoutes(?string $pageClass = null): self
37 37
     {
38
-        return ! $pageClass ? $this : $this->filter(function (Route $route) use ($pageClass) {
38
+        return !$pageClass ? $this : $this->filter(function(Route $route) use ($pageClass) {
39 39
             return $route->getPage() instanceof $pageClass;
40 40
         });
41 41
     }
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
 
62 62
     protected function runDiscovery(): self
63 63
     {
64
-        $this->kernel->pages()->each(function (HydePage $page) {
64
+        $this->kernel->pages()->each(function(HydePage $page) {
65 65
             $this->discover($page);
66 66
         });
67 67
 
Please login to merge, or discard this patch.
packages/testing/src/helpers.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@  discard block
 block discarded – undo
2 2
 
3 3
 use Illuminate\Support\Facades\File;
4 4
 
5
-if (! function_exists('unlinkIfExists')) {
5
+if (!function_exists('unlinkIfExists')) {
6 6
     function unlinkIfExists(string $filepath): void
7 7
     {
8 8
         if (file_exists($filepath)) {
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
     }
12 12
 }
13 13
 
14
-if (! function_exists('backupDirectory')) {
14
+if (!function_exists('backupDirectory')) {
15 15
     function backupDirectory(string $directory): void
16 16
     {
17 17
         if (file_exists($directory)) {
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
     }
21 21
 }
22 22
 
23
-if (! function_exists('restoreDirectory')) {
23
+if (!function_exists('restoreDirectory')) {
24 24
     function restoreDirectory(string $directory): void
25 25
     {
26 26
         if (file_exists($directory.'-bak')) {
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
     }
31 31
 }
32 32
 
33
-if (! function_exists('deleteDirectory')) {
33
+if (!function_exists('deleteDirectory')) {
34 34
     function deleteDirectory(string $directory): void
35 35
     {
36 36
         if (file_exists($directory)) {
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
     }
40 40
 }
41 41
 
42
-if (! function_exists('unlinkUnlessDefault')) {
42
+if (!function_exists('unlinkUnlessDefault')) {
43 43
     function unlinkUnlessDefault(string $filepath): void
44 44
     {
45 45
         $protected = [
@@ -49,13 +49,13 @@  discard block
 block discarded – undo
49 49
             '.gitkeep',
50 50
         ];
51 51
 
52
-        if (! in_array(basename($filepath), $protected)) {
52
+        if (!in_array(basename($filepath), $protected)) {
53 53
             unlink($filepath);
54 54
         }
55 55
     }
56 56
 }
57 57
 
58
-if (! function_exists('strip_newlines')) {
58
+if (!function_exists('strip_newlines')) {
59 59
     function strip_newlines(string $string, bool $keepUnixEndings = false): string
60 60
     {
61 61
         if ($keepUnixEndings) {
Please login to merge, or discard this patch.
monorepo/release.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
packages/framework/src/Console/Commands/MakePostCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@
 block discarded – undo
54 54
         }
55 55
         $this->line("Identifier: {$creator->getIdentifier()}");
56 56
 
57
-        if (! $this->confirm('Do you wish to continue?', true)) {
57
+        if (!$this->confirm('Do you wish to continue?', true)) {
58 58
             $this->info('Aborting.');
59 59
 
60 60
             return 130;
Please login to merge, or discard this patch.
packages/framework/src/Framework/Actions/CreatesNewPageSourceFile.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -121,14 +121,14 @@
 block discarded – undo
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
     }
Please login to merge, or discard this patch.