CS: PSR1/2

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