@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | */ |
69 | 69 | public function namespace() : string |
70 | 70 | { |
71 | - return ucfirst($this->distributor) ."/". ucfirst($this->name); |
|
71 | + return ucfirst($this->distributor) . "/" . ucfirst($this->name); |
|
72 | 72 | } |
73 | 73 | |
74 | 74 | /** |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | */ |
80 | 80 | private function setPackage(string $package) : Vendor |
81 | 81 | { |
82 | - if (! $this->valid()->vendor($package)) { |
|
82 | + if (!$this->valid()->vendor($package)) { |
|
83 | 83 | throw new InvalidThemeNameException($package); |
84 | 84 | } |
85 | 85 | |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | */ |
96 | 96 | private function parsePackage(): Vendor |
97 | 97 | { |
98 | - if (! $this->package) { |
|
98 | + if (!$this->package) { |
|
99 | 99 | throw new InvalidThemeNameException($this->package); |
100 | 100 | } |
101 | 101 | |
@@ -144,7 +144,7 @@ discard block |
||
144 | 144 | */ |
145 | 145 | private function setName(string $name) : Vendor |
146 | 146 | { |
147 | - if (! $this->valid()->theme($name)) { |
|
147 | + if (!$this->valid()->theme($name)) { |
|
148 | 148 | throw new InvalidThemeNameException($name); |
149 | 149 | } |
150 | 150 | |
@@ -160,7 +160,7 @@ discard block |
||
160 | 160 | */ |
161 | 161 | private function setDist(string $dist) : Vendor |
162 | 162 | { |
163 | - if (! $this->valid()->theme($dist)) { |
|
163 | + if (!$this->valid()->theme($dist)) { |
|
164 | 164 | throw new InvalidThemeNameException($dist); |
165 | 165 | } |
166 | 166 |
@@ -54,9 +54,9 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
@@ -49,20 +49,20 @@ discard block |
||
49 | 49 | */ |
50 | 50 | protected string $path; |
51 | 51 | |
52 | - /** |
|
53 | - * Apelido pelo qual é chamado dentro do projeto, |
|
54 | - * como camel-case |
|
55 | - * |
|
56 | - * @var string |
|
57 | - */ |
|
52 | + /** |
|
53 | + * Apelido pelo qual é chamado dentro do projeto, |
|
54 | + * como camel-case |
|
55 | + * |
|
56 | + * @var string |
|
57 | + */ |
|
58 | 58 | protected string $camelAlias; |
59 | 59 | |
60 | 60 | /** |
61 | - * Apelido pelo qual é chamado dentro do projeto, |
|
62 | - * como camel-case |
|
63 | - * |
|
64 | - * @var string |
|
65 | - */ |
|
61 | + * Apelido pelo qual é chamado dentro do projeto, |
|
62 | + * como camel-case |
|
63 | + * |
|
64 | + * @var string |
|
65 | + */ |
|
66 | 66 | protected string $kebabAlias; |
67 | 67 | |
68 | 68 | /** |
@@ -201,13 +201,13 @@ discard block |
||
201 | 201 | } |
202 | 202 | |
203 | 203 | /** |
204 | - * Carrega a diretiva (include/component) dentro do projeto como kabe-case. |
|
205 | - * Padrão utilizado no Blade UI. |
|
206 | - * |
|
207 | - * @param string $file |
|
208 | - * @param string $alias |
|
209 | - * @return Directive |
|
210 | - */ |
|
204 | + * Carrega a diretiva (include/component) dentro do projeto como kabe-case. |
|
205 | + * Padrão utilizado no Blade UI. |
|
206 | + * |
|
207 | + * @param string $file |
|
208 | + * @param string $alias |
|
209 | + * @return Directive |
|
210 | + */ |
|
211 | 211 | private function loadKebabAlias(string $file, string $alias) : Directive |
212 | 212 | { |
213 | 213 | Blade::component($file, $alias); |
@@ -140,7 +140,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
@@ -15,7 +15,7 @@ discard block |
||
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 |
||
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 |
@@ -15,7 +15,7 @@ |
||
15 | 15 | */ |
16 | 16 | public function __construct(string $name) |
17 | 17 | { |
18 | - $this->initialize( $name); |
|
18 | + $this->initialize($name); |
|
19 | 19 | } |
20 | 20 | |
21 | 21 | /** |
@@ -45,9 +45,9 @@ discard block |
||
45 | 45 | * @param string $name |
46 | 46 | * @return Author|string |
47 | 47 | */ |
48 | - public function name(string $name = null) : Author|string |
|
48 | + public function name(string $name = null) : Author | string |
|
49 | 49 | { |
50 | - if (! $name) { |
|
50 | + if (!$name) { |
|
51 | 51 | return $this->getName(); |
52 | 52 | } |
53 | 53 | |
@@ -62,9 +62,9 @@ discard block |
||
62 | 62 | * @param string $email |
63 | 63 | * @return Author|string |
64 | 64 | */ |
65 | - public function email(string $email = null) : Author|string |
|
65 | + public function email(string $email = null) : Author | string |
|
66 | 66 | { |
67 | - if (! $email) { |
|
67 | + if (!$email) { |
|
68 | 68 | return $this->getEmail(); |
69 | 69 | } |
70 | 70 | |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | */ |
93 | 93 | public function set(string $author) : Author |
94 | 94 | { |
95 | - if (! $this->valid()->author($author)) { |
|
95 | + if (!$this->valid()->author($author)) { |
|
96 | 96 | throw new InvalidAuthorException($author); |
97 | 97 | } |
98 | 98 |