@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | 'env_file' => '.env.testing', |
| 57 | 57 | 'publishable' => 'themes', |
| 58 | 58 | 'description' => 'A new awsome theme is comming!', |
| 59 | - 'template_path' => __DIR__ . '/../stubs/', |
|
| 59 | + 'template_path' => __DIR__.'/../stubs/', |
|
| 60 | 60 | |
| 61 | 61 | 'species' => [ |
| 62 | 62 | 'component', 'include' |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | 'themes' => [ |
| 66 | 66 | 'files' => 'src', |
| 67 | 67 | 'assets' => 'assets', |
| 68 | - 'folder' => __DIR__ . '/../sandbox', |
|
| 68 | + 'folder' => __DIR__.'/../sandbox', |
|
| 69 | 69 | ], |
| 70 | 70 | |
| 71 | 71 | 'author' => [ |
@@ -6,7 +6,7 @@ |
||
| 6 | 6 | 'env_file' => '.env.', |
| 7 | 7 | 'publishable' => 'themes', |
| 8 | 8 | 'description' => 'A new awsome theme is comming!', |
| 9 | - 'template_path' => __DIR__ . '/../../stubs/', |
|
| 9 | + 'template_path' => __DIR__.'/../../stubs/', |
|
| 10 | 10 | |
| 11 | 11 | 'species' => [ |
| 12 | 12 | 'component', 'include' |
@@ -31,7 +31,7 @@ |
||
| 31 | 31 | private function registerFacade() |
| 32 | 32 | { |
| 33 | 33 | $this->app->bind( |
| 34 | - 'samurai', function () { |
|
| 34 | + 'samurai', function() { |
|
| 35 | 35 | return new Samurai(); |
| 36 | 36 | } |
| 37 | 37 | ); |
@@ -68,9 +68,9 @@ discard block |
||
| 68 | 68 | /** |
| 69 | 69 | * {@inheritDoc} |
| 70 | 70 | */ |
| 71 | - public function author(string $author = null) : Author|Theme |
|
| 71 | + public function author(string $author = null) : Author | Theme |
|
| 72 | 72 | { |
| 73 | - if (! $author) { |
|
| 73 | + if (!$author) { |
|
| 74 | 74 | return $this->getAuthor(); |
| 75 | 75 | } |
| 76 | 76 | |
@@ -130,7 +130,7 @@ discard block |
||
| 130 | 130 | */ |
| 131 | 131 | public function find() : ?Theme |
| 132 | 132 | { |
| 133 | - if (! $this->exists()) { |
|
| 133 | + if (!$this->exists()) { |
|
| 134 | 134 | return null; |
| 135 | 135 | } |
| 136 | 136 | |
@@ -140,9 +140,9 @@ discard block |
||
| 140 | 140 | /** |
| 141 | 141 | * {@inheritDoc} |
| 142 | 142 | */ |
| 143 | - public function description(string $description = null) : Theme|string |
|
| 143 | + public function description(string $description = null) : Theme | string |
|
| 144 | 144 | { |
| 145 | - if (! $description) { |
|
| 145 | + if (!$description) { |
|
| 146 | 146 | return $this->composer()->description(); |
| 147 | 147 | } |
| 148 | 148 | |
@@ -172,7 +172,7 @@ discard block |
||
| 172 | 172 | */ |
| 173 | 173 | public function findOrCreate() : Theme |
| 174 | 174 | { |
| 175 | - if (! $this->exists()) { |
|
| 175 | + if (!$this->exists()) { |
|
| 176 | 176 | return $this->make(); |
| 177 | 177 | } |
| 178 | 178 | |
@@ -232,7 +232,7 @@ discard block |
||
| 232 | 232 | */ |
| 233 | 233 | public function publish() : bool |
| 234 | 234 | { |
| 235 | - if (! $this->exists()) { |
|
| 235 | + if (!$this->exists()) { |
|
| 236 | 236 | throw new ThemeNotFoundException($this->package()); |
| 237 | 237 | } |
| 238 | 238 | |
@@ -253,7 +253,7 @@ discard block |
||
| 253 | 253 | $public = $this->config()->publishable(); |
| 254 | 254 | $package = $this->package(); |
| 255 | 255 | |
| 256 | - $file = '/' . $file ?? ''; |
|
| 256 | + $file = '/'.$file ?? ''; |
|
| 257 | 257 | $file = str_replace("'", "", $file); |
| 258 | 258 | |
| 259 | 259 | return sprintf('%s/%s/%s%s', $domain, $public, $package, $file); |
@@ -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 | |
@@ -84,7 +84,7 @@ |
||
| 84 | 84 | |
| 85 | 85 | $preview = $theme->preview(); |
| 86 | 86 | |
| 87 | - $question = 'Confirm? '. PHP_EOL . $preview; |
|
| 87 | + $question = 'Confirm? '.PHP_EOL.$preview; |
|
| 88 | 88 | |
| 89 | 89 | return $this->question($question, false); |
| 90 | 90 | } |
@@ -17,7 +17,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 | /** |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | */ |
| 50 | 50 | public function indicative(string $path) : string |
| 51 | 51 | { |
| 52 | - $base = base_path() . DS; |
|
| 52 | + $base = base_path().DS; |
|
| 53 | 53 | |
| 54 | 54 | return str_replace($base, '', $path); |
| 55 | 55 | } |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | { |
| 65 | 65 | $assets = config('samurai.themes.assets'); |
| 66 | 66 | |
| 67 | - return $this->theme($vendor, $name) . DS . $assets; |
|
| 67 | + return $this->theme($vendor, $name).DS.$assets; |
|
| 68 | 68 | } |
| 69 | 69 | |
| 70 | 70 | /** |
@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | */ |
| 77 | 77 | public function public(string $vendor, string $name) : string |
| 78 | 78 | { |
| 79 | - return public_path('themes'. DS . $vendor . DS . $name); |
|
| 79 | + return public_path('themes'.DS.$vendor.DS.$name); |
|
| 80 | 80 | } |
| 81 | 81 | |
| 82 | 82 | /** |
@@ -92,7 +92,7 @@ discard block |
||
| 92 | 92 | |
| 93 | 93 | $pieces = explode(DS, $dir); |
| 94 | 94 | |
| 95 | - return ($path == true ) ? $dir : end($pieces); |
|
| 95 | + return ($path == true) ? $dir : end($pieces); |
|
| 96 | 96 | } |
| 97 | 97 | |
| 98 | 98 | /** |
@@ -105,7 +105,7 @@ discard block |
||
| 105 | 105 | { |
| 106 | 106 | $files = config('samurai.themes.files'); |
| 107 | 107 | |
| 108 | - return $this->theme($vendor, $name) . DS . $files . DS; |
|
| 108 | + return $this->theme($vendor, $name).DS.$files.DS; |
|
| 109 | 109 | } |
| 110 | 110 | |
| 111 | 111 | /** |
@@ -135,7 +135,7 @@ discard block |
||
| 135 | 135 | { |
| 136 | 136 | $name = strtolower($name); |
| 137 | 137 | |
| 138 | - $path = $base . $vendor . DS . $name; |
|
| 138 | + $path = $base.$vendor.DS.$name; |
|
| 139 | 139 | |
| 140 | 140 | return $path; |
| 141 | 141 | } |
@@ -20,7 +20,7 @@ discard block |
||
| 20 | 20 | */ |
| 21 | 21 | public function directive(string $name, string $type) : string |
| 22 | 22 | { |
| 23 | - return $name . '-' .$type; |
|
| 23 | + return $name.'-'.$type; |
|
| 24 | 24 | } |
| 25 | 25 | |
| 26 | 26 | /** |
@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | */ |
| 34 | 34 | public function filename(string $name, string $type) : string |
| 35 | 35 | { |
| 36 | - return $this->directive($name, $type) . $this->extension(); |
|
| 36 | + return $this->directive($name, $type).$this->extension(); |
|
| 37 | 37 | } |
| 38 | 38 | |
| 39 | 39 | /** |