Skip to content

Commit

Permalink
Apply StyleCi Fixing and adding phpunit.xml
Browse files Browse the repository at this point in the history
  • Loading branch information
Shipu committed May 23, 2017
1 parent 09f7584 commit 939a5ce
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 17 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
*.DS_Store
/vendor
/.idea
/composer.lock
phpunit.xml
/composer.lock
10 changes: 5 additions & 5 deletions config/theme.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
|
*/
'symlink' => true,

/*
|--------------------------------------------------------------------------
| Theme types where you can set default theme for particular middleware.
Expand All @@ -46,7 +46,7 @@
| 'middlewareName' => 'themeName',
| ]
| ],
|
| For Example route
| Route::get('/', function () {
| return view('welcome');
Expand All @@ -55,10 +55,10 @@
|
*/
'types' => [
'enable' => false,
'middleware' => [
'enable' => false,
'middleware' => [
'example' => 'admin',
]
],
],

/*
Expand Down
12 changes: 4 additions & 8 deletions phpunit.xml.dist → phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,11 @@
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
syntaxCheck="false">
syntaxCheck="false"
>
<testsuites>
<testsuite name="Application Test Suite">
<directory>tests/</directory>
<testsuite name="Package Test Suite">
<directory suffix=".php">./tests/</directory>
</testsuite>
</testsuites>
<filter>
<whitelist>
<directory suffix=".php">src/</directory>
</whitelist>
</filter>
</phpunit>
4 changes: 2 additions & 2 deletions src/Providers/ThemevelServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@ public function register()
}

/**
* Add Theme Types Middleware
* Add Theme Types Middleware.
*
* @return void
*/
public function registerMiddleware()
{
if(config('theme.types.enable')) {
if (config('theme.types.enable')) {
$themeTypes = config('theme.types.middleware');
foreach ($themeTypes as $middleware => $themeName) {
$this->app['router']->aliasMiddleware($middleware, '\Shipu\Themevel\Middleware\RouteMiddleware:'.$themeName);
Expand Down

0 comments on commit 939a5ce

Please sign in to comment.