Passed
Push — master ( ed297f...604ea4 )
by Giuliano
04:39
created
src/Foundation/DirectiveFinder.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
 
30 30
         $files = $this->readFiles();
31 31
 
32
-        foreach($files as $file) {
32
+        foreach ($files as $file) {
33 33
             $directives[] = $this->parser()->parse($file)->toDirective();
34 34
         }
35 35
 
Please login to merge, or discard this patch.
src/Foundation/SyntaxValidator.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
             return false;
63 63
         }
64 64
 
65
-        if (! preg_match($onlyValidChars, $name)) {
65
+        if (!preg_match($onlyValidChars, $name)) {
66 66
             return false;
67 67
         }
68 68
         
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
      */
79 79
     public function type(string $type = null) : bool
80 80
     {   
81
-        if (! $type) {
81
+        if (!$type) {
82 82
             return false;
83 83
         }
84 84
 
Please login to merge, or discard this patch.
src/Foundation/FilenameParser.php 2 patches
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,9 @@
 block discarded – undo
17 17
         $type = $this->parseType($file);
18 18
         $name = $this->parseFullName($file);
19 19
 
20
-        if (! $name || ! $type) return null;
20
+        if (! $name || ! $type) {
21
+            return null;
22
+        }
21 23
 
22 24
         $request = [
23 25
             'name' => $name,
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
         $type = $this->parseType($file);
18 18
         $name = $this->parseFullName($file);
19 19
 
20
-        if (! $name || ! $type) return null;
20
+        if (!$name || !$type) return null;
21 21
 
22 22
         $request = [
23 23
             'name' => $name,
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
         $name   = $this->parseOnlyName($file);
40 40
         $folder = $this->parseFolder($file);
41 41
         
42
-        if (! $name) {
42
+        if (!$name) {
43 43
             return null;
44 44
         }
45 45
         
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
      */
92 92
     private function parserFilename(string $theme, string $path) : string
93 93
     {
94
-        return str_replace($theme . DS, '', $path);
94
+        return str_replace($theme.DS, '', $path);
95 95
     }
96 96
 
97 97
     /**
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
 
133 133
         $name = (count($pieces) > 1) ? implode(DS, $pieces) : $pieces[0];
134 134
 
135
-        return (! strlen($name)) ? null : $name;
135
+        return (!strlen($name)) ? null : $name;
136 136
     }
137 137
 
138 138
     /**
Please login to merge, or discard this patch.
src/Foundation/ThemeSearch.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
      */
42 42
     public function findOrBuild() : Theme
43 43
     {
44
-        if (! $this->exists()) {
44
+        if (!$this->exists()) {
45 45
             return $this->build();
46 46
         }
47 47
 
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
      */
57 57
     public function get() : ?Theme
58 58
     {
59
-        if (! $this->exists()) {
59
+        if (!$this->exists()) {
60 60
             return null;
61 61
         }
62 62
 
Please login to merge, or discard this patch.
src/Console/InitThemeCommand.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
             $author = $this->askAuthor();            
42 42
             $descr  = $this->askDescription();   
43 43
             
44
-            if (! $this->beSure($name, $author, $descr)) {
44
+            if (!$this->beSure($name, $author, $descr)) {
45 45
                 return false;
46 46
             }
47 47
             
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
     {
105 105
         $answer = $this->ask($question->ask);
106 106
 
107
-        return (! $answer || empty($answer)) ? $question->default : $answer;
107
+        return (!$answer || empty($answer)) ? $question->default : $answer;
108 108
     } 
109 109
 
110 110
     /**
Please login to merge, or discard this patch.
src/Entities/Foundation.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
      */
118 118
     protected function config() : ConfigKeeper
119 119
     {
120
-        if (! $this->config) {
120
+        if (!$this->config) {
121 121
             $this->config = new ConfigKeeper();
122 122
         }
123 123
 
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
      */
148 148
     protected function env() : EnvHandler
149 149
     {
150
-        if (! $this->env) {
150
+        if (!$this->env) {
151 151
             $this->env = new EnvHandler();
152 152
         }
153 153
 
Please login to merge, or discard this patch.
src/Entities/Composer.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -54,9 +54,9 @@  discard block
 block discarded – undo
54 54
     /**
55 55
      * {@inheritDoc}
56 56
      */
57
-    public function description(string $desc = null) : string|Composer
57
+    public function description(string $desc = null) : string | Composer
58 58
     {
59
-        if (! $desc) {
59
+        if (!$desc) {
60 60
             return $this->getDescription();
61 61
         }
62 62
 
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
 
101 101
         $json = json_decode($content);        
102 102
 
103
-        if (! $this->isValid($json)) {           
103
+        if (!$this->isValid($json)) {           
104 104
             throw new InvalidComposerFileException($pack);
105 105
         }       
106 106
         
@@ -205,12 +205,12 @@  discard block
 block discarded – undo
205 205
         $keys = ['name', 'description', 'type', 'require', 'authors'];
206 206
 
207 207
         foreach ($keys as $k) {            
208
-            if (! property_exists($json, $k) || $json->$k == null) {
208
+            if (!property_exists($json, $k) || $json->$k == null) {
209 209
                 return false;   
210 210
             }            
211 211
         }
212 212
 
213
-        if (! is_array($json->authors) || empty($json->authors)) {
213
+        if (!is_array($json->authors) || empty($json->authors)) {
214 214
             return false;
215 215
         }
216 216
 
@@ -238,7 +238,7 @@  discard block
 block discarded – undo
238 238
      */
239 239
     private function setPath(string $path) : Composer
240 240
     {
241
-        if (! is_file($path)) {
241
+        if (!is_file($path)) {
242 242
             throw new \Exception('');
243 243
         }
244 244
 
Please login to merge, or discard this patch.
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
 
103 103
         $json = json_decode($content);        
104 104
 
105
-        if (! $this->isValid($json)) {           
105
+        if (! $this->isValid($json)) {
106 106
             throw new InvalidComposerFileException($pack);
107 107
         }       
108 108
         
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
     {
207 207
         $keys = ['name', 'description', 'type', 'require', 'authors'];
208 208
 
209
-        foreach ($keys as $k) {            
209
+        foreach ($keys as $k) {
210 210
             if (! property_exists($json, $k) || $json->$k == null) {
211 211
                 return false;   
212 212
             }            
Please login to merge, or discard this patch.
src/Entities/Directive.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
     /**
141 141
      * {@inheritDoc}
142 142
      */
143
-    public function create() : Component|Includer
143
+    public function create() : Component | Includer
144 144
     {
145 145
         if ($this->exists()) {
146 146
             throw new DirectiveExistsException($this->name(), $this->theme()->package());
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
     /**
157 157
      * {@inheritDoc}
158 158
      */
159
-    public function load() : Component|Includer
159
+    public function load() : Component | Includer
160 160
     {                              
161 161
         $namespace = $this->theme()->namespace();
162 162
         
@@ -276,11 +276,11 @@  discard block
 block discarded – undo
276 276
     {
277 277
         $parsed = $this->parser()->filename($sentence);
278 278
 
279
-        if (! $parsed) {
279
+        if (!$parsed) {
280 280
             throw new InvalidDirectiveNameException($sentence);
281 281
         }
282 282
 
283
-        if (! $this->valid()->directive($parsed->name)) {
283
+        if (!$this->valid()->directive($parsed->name)) {
284 284
             throw new InvalidDirectiveNameException($sentence);
285 285
         }
286 286
 
@@ -297,7 +297,7 @@  discard block
 block discarded – undo
297 297
      */
298 298
     protected function setType(string $type) : Directive
299 299
     {
300
-        if (! $this->valid()->type($type)) {
300
+        if (!$this->valid()->type($type)) {
301 301
             throw new InvalidTypeDirectiveException($type);
302 302
         }
303 303
 
Please login to merge, or discard this patch.
src/Entities/Base.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
     {
16 16
         $themes = [];
17 17
 
18
-        foreach($this->readBase() as $folder) {
18
+        foreach ($this->readBase() as $folder) {
19 19
 
20 20
             $theme = $this->find($folder);
21 21
 
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
 
39 39
         $current = $this->env()->get($key);
40 40
 
41
-        if (! $current) {
41
+        if (!$current) {
42 42
             return null;
43 43
         }
44 44
 
Please login to merge, or discard this patch.