@@ -15,7 +15,7 @@ |
||
| 15 | 15 | |
| 16 | 16 | namespace Multidimensional\Subdomains\Routing; |
| 17 | 17 | |
| 18 | -use Cake\Network\Request; |
|
| 18 | +use Cake\Network\Request; |
|
| 19 | 19 | use Cake\Routing\Router; |
| 20 | 20 | use Cake\Core\Configure; |
| 21 | 21 | |
@@ -19,8 +19,7 @@ |
||
| 19 | 19 | use Cake\Routing\Router; |
| 20 | 20 | use Cake\Core\Configure; |
| 21 | 21 | |
| 22 | -trait SubdomainRouteTrait |
|
| 23 | -{ |
|
| 22 | +trait SubdomainRouteTrait { |
|
| 24 | 23 | |
| 25 | 24 | private function _getSubdomains() { |
| 26 | 25 | |
@@ -17,7 +17,6 @@ |
||
| 17 | 17 | |
| 18 | 18 | use Cake\Core\Configure; |
| 19 | 19 | use Cake\Console\Shell; |
| 20 | -use Cake\Console\Helper; |
|
| 21 | 20 | |
| 22 | 21 | class SubdomainsInstallShell extends Shell { |
| 23 | 22 | |
@@ -81,7 +81,7 @@ |
||
| 81 | 81 | $subdomains[] = $subdomain; |
| 82 | 82 | $valid = true; |
| 83 | 83 | $this->out(); |
| 84 | - }else{ |
|
| 84 | + } else{ |
|
| 85 | 85 | $valid = false; |
| 86 | 86 | $this->out(); |
| 87 | 87 | $this->_io->out('<error>Invalid Subdomain.</error>'); |
@@ -28,7 +28,7 @@ |
||
| 28 | 28 | |
| 29 | 29 | foreach ($subdomains AS $prefix) { |
| 30 | 30 | |
| 31 | - Router::scope('/', ['prefix' => $prefix], function($routes) { |
|
| 31 | + Router::scope('/', ['prefix' => $prefix], function($routes) { |
|
| 32 | 32 | $routes->fallbacks('InflectedRoute'); |
| 33 | 33 | }); |
| 34 | 34 | |
@@ -18,7 +18,6 @@ |
||
| 18 | 18 | use Cake\Routing\Route\DashedRoute as CakeDashedRoute; |
| 19 | 19 | use Multidimensional\Subdomains\Routing\SubdomainRouteTrait; |
| 20 | 20 | |
| 21 | -class DashedRoute extends CakeDashedRoute |
|
| 22 | -{ |
|
| 21 | +class DashedRoute extends CakeDashedRoute { |
|
| 23 | 22 | use SubdomainRouteTrait; |
| 24 | 23 | } |
| 25 | 24 | \ No newline at end of file |
@@ -18,7 +18,6 @@ |
||
| 18 | 18 | use Cake\Routing\Route\Route as CakeRoute; |
| 19 | 19 | use Multidimensional\Subdomains\Routing\SubdomainRouteTrait; |
| 20 | 20 | |
| 21 | -class Route extends CakeRoute |
|
| 22 | -{ |
|
| 21 | +class Route extends CakeRoute { |
|
| 23 | 22 | use SubdomainRouteTrait; |
| 24 | 23 | } |
| 25 | 24 | \ No newline at end of file |
@@ -18,7 +18,6 @@ |
||
| 18 | 18 | use Cake\Routing\Route\InflectedRoute as CakeInflectedRoute; |
| 19 | 19 | use Multidimensional\Subdomains\Routing\SubdomainRouteTrait; |
| 20 | 20 | |
| 21 | -class InflectedRoute extends CakeInflectedRoute |
|
| 22 | -{ |
|
| 21 | +class InflectedRoute extends CakeInflectedRoute { |
|
| 23 | 22 | use SubdomainRouteTrait; |
| 24 | 23 | } |
| 25 | 24 | \ No newline at end of file |
@@ -17,10 +17,8 @@ |
||
| 17 | 17 | |
| 18 | 18 | use Cake\Console\Helper; |
| 19 | 19 | |
| 20 | -class HeaderHelper extends Helper |
|
| 21 | -{ |
|
| 22 | - public function output($args = null) |
|
| 23 | - { |
|
| 20 | +class HeaderHelper extends Helper { |
|
| 21 | + public function output($args = null) { |
|
| 24 | 22 | $this->_io->out("\n\n"); |
| 25 | 23 | $this->_io->styles('header', ['text' => 'green']); |
| 26 | 24 | |