CS: PSR1/2

parent c6a1e82b
...@@ -63,7 +63,7 @@ class ConfigureDatabase implements SetupScript ...@@ -63,7 +63,7 @@ class ConfigureDatabase implements SetupScript
} }
} }
$this->env->write($driver, $host, $port,$name, $user, $password); $this->env->write($driver, $host, $port, $name, $user, $password);
$command->info('Database successfully configured'); $command->info('Database successfully configured');
} }
...@@ -74,6 +74,7 @@ class ConfigureDatabase implements SetupScript ...@@ -74,6 +74,7 @@ class ConfigureDatabase implements SetupScript
protected function askDatabaseDriver() protected function askDatabaseDriver()
{ {
$driver = $this->command->ask('Enter your database driver (e.g. mysql, pgsql)', 'mysql'); $driver = $this->command->ask('Enter your database driver (e.g. mysql, pgsql)', 'mysql');
return $driver; return $driver;
} }
...@@ -83,6 +84,7 @@ class ConfigureDatabase implements SetupScript ...@@ -83,6 +84,7 @@ class ConfigureDatabase implements SetupScript
protected function askDatabaseHost() protected function askDatabaseHost()
{ {
$host = $this->command->ask('Enter your database host', 'localhost'); $host = $this->command->ask('Enter your database host', 'localhost');
return $host; return $host;
} }
...@@ -91,7 +93,8 @@ class ConfigureDatabase implements SetupScript ...@@ -91,7 +93,8 @@ class ConfigureDatabase implements SetupScript
*/ */
protected function askDatabasePort($driver) protected function askDatabasePort($driver)
{ {
$port = $this->command->ask('Enter your database port', $this->config['database.connections.'.$driver.'.port']); $port = $this->command->ask('Enter your database port', $this->config['database.connections.' . $driver . '.port']);
return $port; return $port;
} }
...@@ -147,11 +150,11 @@ class ConfigureDatabase implements SetupScript ...@@ -147,11 +150,11 @@ class ConfigureDatabase implements SetupScript
protected function setLaravelConfiguration($driver, $host, $port, $name, $user, $password) protected function setLaravelConfiguration($driver, $host, $port, $name, $user, $password)
{ {
$this->config['database.default'] = $driver; $this->config['database.default'] = $driver;
$this->config['database.connections.'.$driver.'.host'] = $host; $this->config['database.connections.' . $driver . '.host'] = $host;
$this->config['database.connections.'.$driver.'.port'] = $port; $this->config['database.connections.' . $driver . '.port'] = $port;
$this->config['database.connections.'.$driver.'.database'] = $name; $this->config['database.connections.' . $driver . '.database'] = $name;
$this->config['database.connections.'.$driver.'.username'] = $user; $this->config['database.connections.' . $driver . '.username'] = $user;
$this->config['database.connections.'.$driver.'.password'] = $password; $this->config['database.connections.' . $driver . '.password'] = $password;
} }
/** /**
......
...@@ -291,7 +291,7 @@ class CoreServiceProvider extends ServiceProvider ...@@ -291,7 +291,7 @@ class CoreServiceProvider extends ServiceProvider
*/ */
private function getCentralisedTranslationPath(Module $module) private function getCentralisedTranslationPath(Module $module)
{ {
$path = config('modules.paths.modules'). '/Translation'; $path = config('modules.paths.modules') . '/Translation';
return $path . "/Resources/lang/{$module->getLowerName()}"; return $path . "/Resources/lang/{$module->getLowerName()}";
} }
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
namespace Modules\Core\Repositories\Eloquent; namespace Modules\Core\Repositories\Eloquent;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Builder; use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Model;
use Modules\Core\Repositories\BaseRepository; use Modules\Core\Repositories\BaseRepository;
/** /**
......
...@@ -2,9 +2,7 @@ ...@@ -2,9 +2,7 @@
namespace Modules\Core\Sidebar; namespace Modules\Core\Sidebar;
use Maatwebsite\Sidebar\Badge;
use Maatwebsite\Sidebar\Group; use Maatwebsite\Sidebar\Group;
use Maatwebsite\Sidebar\Item;
use Maatwebsite\Sidebar\Menu; use Maatwebsite\Sidebar\Menu;
use Modules\User\Contracts\Authentication; use Modules\User\Contracts\Authentication;
......
...@@ -51,7 +51,7 @@ class DashboardServiceProvider extends ServiceProvider ...@@ -51,7 +51,7 @@ class DashboardServiceProvider extends ServiceProvider
$this->publishConfig('dashboard', 'permissions'); $this->publishConfig('dashboard', 'permissions');
$this->publishConfig('dashboard', 'config'); $this->publishConfig('dashboard', 'config');
$this->loadMigrationsFrom(__DIR__.'/../Database/Migrations'); $this->loadMigrationsFrom(__DIR__ . '/../Database/Migrations');
} }
/** /**
......
...@@ -63,7 +63,7 @@ class MediaServiceProvider extends ServiceProvider ...@@ -63,7 +63,7 @@ class MediaServiceProvider extends ServiceProvider
$this->registerThumbnails(); $this->registerThumbnails();
$this->registerBladeTags(); $this->registerBladeTags();
$this->loadMigrationsFrom(__DIR__.'/../Database/Migrations'); $this->loadMigrationsFrom(__DIR__ . '/../Database/Migrations');
} }
/** /**
......
...@@ -13,8 +13,8 @@ use Modules\Menu\Repositories\Eloquent\EloquentMenuItemRepository; ...@@ -13,8 +13,8 @@ use Modules\Menu\Repositories\Eloquent\EloquentMenuItemRepository;
use Modules\Menu\Repositories\Eloquent\EloquentMenuRepository; use Modules\Menu\Repositories\Eloquent\EloquentMenuRepository;
use Modules\Menu\Repositories\MenuItemRepository; use Modules\Menu\Repositories\MenuItemRepository;
use Modules\Menu\Repositories\MenuRepository; use Modules\Menu\Repositories\MenuRepository;
use Nwidart\Menus\MenuBuilder as Builder;
use Nwidart\Menus\Facades\Menu as MenuFacade; use Nwidart\Menus\Facades\Menu as MenuFacade;
use Nwidart\Menus\MenuBuilder as Builder;
use Nwidart\Menus\MenuItem as PingpongMenuItem; use Nwidart\Menus\MenuItem as PingpongMenuItem;
class MenuServiceProvider extends ServiceProvider class MenuServiceProvider extends ServiceProvider
...@@ -50,7 +50,7 @@ class MenuServiceProvider extends ServiceProvider ...@@ -50,7 +50,7 @@ class MenuServiceProvider extends ServiceProvider
$this->registerBladeTags(); $this->registerBladeTags();
$this->publishConfig('menu', 'permissions'); $this->publishConfig('menu', 'permissions');
$this->publishConfig('menu', 'config'); $this->publishConfig('menu', 'config');
$this->loadMigrationsFrom(__DIR__.'/../Database/Migrations'); $this->loadMigrationsFrom(__DIR__ . '/../Database/Migrations');
} }
/** /**
......
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
namespace Modules\Menu\Tests; namespace Modules\Menu\Tests;
use Faker\Factory; use Faker\Factory;
use Illuminate\Contracts\Console\Kernel;
use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Str; use Illuminate\Support\Str;
use Maatwebsite\Sidebar\SidebarServiceProvider; use Maatwebsite\Sidebar\SidebarServiceProvider;
......
...@@ -74,7 +74,6 @@ class MenuItemUriGeneratorTest extends BaseMenuTest ...@@ -74,7 +74,6 @@ class MenuItemUriGeneratorTest extends BaseMenuTest
]; ];
$this->menuItem->create($data); $this->menuItem->create($data);
self::assertEquals('awesome-page/about', $this->menuItemUriGenerator->generateUri(2, '1', 'en')); self::assertEquals('awesome-page/about', $this->menuItemUriGenerator->generateUri(2, '1', 'en'));
} }
......
...@@ -37,7 +37,7 @@ class PageServiceProvider extends ServiceProvider ...@@ -37,7 +37,7 @@ class PageServiceProvider extends ServiceProvider
$this->publishConfig('page', 'permissions'); $this->publishConfig('page', 'permissions');
$this->app[TagManager::class]->registerNamespace(new Page()); $this->app[TagManager::class]->registerNamespace(new Page());
$this->loadMigrationsFrom(__DIR__.'/../Database/Migrations'); $this->loadMigrationsFrom(__DIR__ . '/../Database/Migrations');
} }
/** /**
......
...@@ -51,7 +51,7 @@ class SettingServiceProvider extends ServiceProvider ...@@ -51,7 +51,7 @@ class SettingServiceProvider extends ServiceProvider
$this->publishConfig('setting', 'permissions'); $this->publishConfig('setting', 'permissions');
$this->publishConfig('setting', 'config'); $this->publishConfig('setting', 'config');
$this->registerBladeTags(); $this->registerBladeTags();
$this->loadMigrationsFrom(__DIR__.'/../Database/Migrations'); $this->loadMigrationsFrom(__DIR__ . '/../Database/Migrations');
} }
/** /**
......
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
namespace Modules\Setting\Tests; namespace Modules\Setting\Tests;
use Illuminate\Contracts\Console\Kernel;
use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Model;
use Maatwebsite\Sidebar\SidebarServiceProvider; use Maatwebsite\Sidebar\SidebarServiceProvider;
use Modules\Setting\Providers\SettingServiceProvider; use Modules\Setting\Providers\SettingServiceProvider;
......
...@@ -41,7 +41,7 @@ class TagServiceProvider extends ServiceProvider ...@@ -41,7 +41,7 @@ class TagServiceProvider extends ServiceProvider
$this->publishConfig('tag', 'permissions'); $this->publishConfig('tag', 'permissions');
$this->publishConfig('tag', 'config'); $this->publishConfig('tag', 'config');
$this->registerBladeTags(); $this->registerBladeTags();
$this->loadMigrationsFrom(__DIR__.'/../Database/Migrations'); $this->loadMigrationsFrom(__DIR__ . '/../Database/Migrations');
} }
/** /**
......
...@@ -51,7 +51,7 @@ class TranslationServiceProvider extends ServiceProvider ...@@ -51,7 +51,7 @@ class TranslationServiceProvider extends ServiceProvider
$this->registerCustomTranslator(); $this->registerCustomTranslator();
} }
$this->loadMigrationsFrom(__DIR__.'/../Database/Migrations'); $this->loadMigrationsFrom(__DIR__ . '/../Database/Migrations');
} }
/** /**
......
...@@ -17,7 +17,6 @@ ...@@ -17,7 +17,6 @@
* @copyright (c) 2011-2015, Cartalyst LLC * @copyright (c) 2011-2015, Cartalyst LLC
* @link http://cartalyst.com * @link http://cartalyst.com
*/ */
use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Schema\Blueprint;
......
...@@ -4,8 +4,8 @@ namespace Modules\User\Events\Handlers; ...@@ -4,8 +4,8 @@ namespace Modules\User\Events\Handlers;
use Illuminate\Contracts\Mail\Mailer; use Illuminate\Contracts\Mail\Mailer;
use Modules\User\Contracts\Authentication; use Modules\User\Contracts\Authentication;
use Modules\User\Events\UserHasRegistered;
use Modules\User\Emails\WelcomeEmail; use Modules\User\Emails\WelcomeEmail;
use Modules\User\Events\UserHasRegistered;
class SendRegistrationConfirmationEmail class SendRegistrationConfirmationEmail
{ {
......
...@@ -3,8 +3,6 @@ ...@@ -3,8 +3,6 @@
namespace Modules\User\Events\Handlers; namespace Modules\User\Events\Handlers;
use Illuminate\Contracts\Mail\Mailer; use Illuminate\Contracts\Mail\Mailer;
use Illuminate\Mail\Message;
use Illuminate\Support\Facades\Mail;
use Modules\User\Emails\ResetPasswordEmail; use Modules\User\Emails\ResetPasswordEmail;
use Modules\User\Events\UserHasBegunResetProcess; use Modules\User\Events\UserHasBegunResetProcess;
......
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
namespace Modules\User\Tests; namespace Modules\User\Tests;
use Illuminate\Foundation\Testing\DatabaseMigrations;
use Modules\User\Repositories\RoleRepository; use Modules\User\Repositories\RoleRepository;
use Modules\User\Repositories\UserRepository; use Modules\User\Repositories\UserRepository;
use Modules\User\Services\UserRegistration; use Modules\User\Services\UserRegistration;
......
...@@ -43,7 +43,7 @@ class WorkshopServiceProvider extends ServiceProvider ...@@ -43,7 +43,7 @@ class WorkshopServiceProvider extends ServiceProvider
{ {
$this->publishConfig('workshop', 'permissions'); $this->publishConfig('workshop', 'permissions');
$this->publishConfig('workshop', 'config'); $this->publishConfig('workshop', 'config');
$this->loadMigrationsFrom(__DIR__.'/../Database/Migrations'); $this->loadMigrationsFrom(__DIR__ . '/../Database/Migrations');
} }
/** /**
......
...@@ -36,7 +36,6 @@ class ModuleScaffoldTest extends BaseTestCase ...@@ -36,7 +36,6 @@ class ModuleScaffoldTest extends BaseTestCase
$this->scaffold = $this->app['asgard.module.scaffold']; $this->scaffold = $this->app['asgard.module.scaffold'];
} }
/** /**
* Recursively remove the given directory * Recursively remove the given directory
* @param string $dir * @param string $dir
...@@ -44,10 +43,11 @@ class ModuleScaffoldTest extends BaseTestCase ...@@ -44,10 +43,11 @@ class ModuleScaffoldTest extends BaseTestCase
*/ */
public static function delTree($dir) public static function delTree($dir)
{ {
$files = array_diff(scandir($dir), array('.','..')); $files = array_diff(scandir($dir), array('.', '..'));
foreach ($files as $file) { foreach ($files as $file) {
(is_dir("$dir/$file")) ? self::delTree("$dir/$file") : unlink("$dir/$file"); (is_dir("$dir/$file")) ? self::delTree("$dir/$file") : unlink("$dir/$file");
} }
return rmdir($dir); return rmdir($dir);
} }
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
} }
</style> </style>
<?php $prefix = isset($prefix) ? $prefix."_" : ""; ?> <?php $prefix = isset($prefix) ? $prefix . "_" : ""; ?>
<?php if (count(LaravelLocalization::getSupportedLocales()) > 1): ?> <?php if (count(LaravelLocalization::getSupportedLocales()) > 1): ?>
<ul class="nav nav-tabs"> <ul class="nav nav-tabs">
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<h1>Blog</h1> <h1>Blog</h1>
<?php if (isset($posts)): ?> <?php if (isset($posts)): ?>
<ul> <ul>
<?php foreach($posts as $post): ?> <?php foreach ($posts as $post): ?>
<li> <li>
<span class="date">{{ $post->created_at->format('d-m-Y') }}</span> <span class="date">{{ $post->created_at->format('d-m-Y') }}</span>
<h3><a href="{{ URL::route($currentLocale . '.blog.slug', [$post->slug]) }}">{{ $post->title }}</a></h3> <h3><a href="{{ URL::route($currentLocale . '.blog.slug', [$post->slug]) }}">{{ $post->title }}</a></h3>
......
...@@ -238,7 +238,7 @@ return [ ...@@ -238,7 +238,7 @@ return [
30 => 4, 30 => 4,
40 => 8, 40 => 8,
50 => 16, 50 => 16,
60 => 12 60 => 12,
], ],
], ],
......
...@@ -31,7 +31,7 @@ return [ ...@@ -31,7 +31,7 @@ return [
'driver' => 'file', // redis, file, pdo, custom 'driver' => 'file', // redis, file, pdo, custom
'path' => storage_path('debugbar'), // For file driver 'path' => storage_path('debugbar'), // For file driver
'connection' => null, // Leave null for default connection (Redis/PDO) 'connection' => null, // Leave null for default connection (Redis/PDO)
'provider' => '' // Instance of StorageInterface for custom driver 'provider' => '', // Instance of StorageInterface for custom driver
], ],
/* /*
...@@ -136,22 +136,22 @@ return [ ...@@ -136,22 +136,22 @@ return [
'backtrace' => true, // Use a backtrace to find the origin of the query in your files. 'backtrace' => true, // Use a backtrace to find the origin of the query in your files.
'timeline' => false, // Add the queries to the timeline 'timeline' => false, // Add the queries to the timeline
'explain' => [ // Show EXPLAIN output on queries 'explain' => [ // Show EXPLAIN output on queries
'enabled' => false, 'enabled' => true,
'types' => ['SELECT'], // ['SELECT', 'INSERT', 'UPDATE', 'DELETE']; for MySQL 5.6.3+ 'types' => ['SELECT'], // ['SELECT', 'INSERT', 'UPDATE', 'DELETE']; for MySQL 5.6.3+
], ],
'hints' => true, // Show hints for common mistakes 'hints' => true, // Show hints for common mistakes
], ],
'mail' => [ 'mail' => [
'full_log' => false 'full_log' => false,
], ],
'views' => [ 'views' => [
'data' => false, //Note: Can slow down the application, because the data can be quite large.. 'data' => false, //Note: Can slow down the application, because the data can be quite large..
], ],
'route' => [ 'route' => [
'label' => true // show complete route on bar 'label' => true, // show complete route on bar
], ],
'logs' => [ 'logs' => [
'file' => null 'file' => null,
], ],
], ],
......
...@@ -54,7 +54,7 @@ return [ ...@@ -54,7 +54,7 @@ return [
'dir' => [ 'dir' => [
'public' => 0777, 'public' => 0777,
'private' => 0700, 'private' => 0700,
] ],
], ],
'url' => env('APP_URL'), 'url' => env('APP_URL'),
'visibility' => 'public', 'visibility' => 'public',
......
...@@ -14,6 +14,6 @@ return [ ...@@ -14,6 +14,6 @@ return [
*/ */
'cache' => [ 'cache' => [
'method' => null, 'method' => null,
'duration' => 1440 'duration' => 1440,
] ],
]; ];
...@@ -13,6 +13,6 @@ return [ ...@@ -13,6 +13,6 @@ return [
* Specify the name of the theme that you wish to activate. This should be the same * Specify the name of the theme that you wish to activate. This should be the same
* as the theme name that is defined within that theme's json file. * as the theme name that is defined within that theme's json file.
*/ */
'activate' => null 'activate' => null,
] ],
]; ];
...@@ -17,7 +17,6 @@ ...@@ -17,7 +17,6 @@
* @copyright (c) 2011-2015, Cartalyst LLC * @copyright (c) 2011-2015, Cartalyst LLC
* @link http://cartalyst.com * @link http://cartalyst.com
*/ */
use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Schema\Blueprint;
......
<?php <?php
use Illuminate\Http\Request; use Illuminate\Http\Request;
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| API Routes | API Routes
......
<?php <?php
use Illuminate\Foundation\Inspiring; use Illuminate\Foundation\Inspiring;
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Console Routes | Console Routes
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment