CS: PSR1/2

parent c4e9f5bd
...@@ -62,7 +62,6 @@ abstract class EloquentBaseRepository implements BaseRepository ...@@ -62,7 +62,6 @@ abstract class EloquentBaseRepository implements BaseRepository
return $this->model; return $this->model;
} }
/** /**
* @inheritdoc * @inheritdoc
*/ */
......
...@@ -3,9 +3,9 @@ ...@@ -3,9 +3,9 @@
namespace Modules\Core\Sidebar; namespace Modules\Core\Sidebar;
use Maatwebsite\Sidebar\Menu; use Maatwebsite\Sidebar\Menu;
use Maatwebsite\Sidebar\SidebarExtender;
use Modules\Core\Events\BuildingSidebar; use Modules\Core\Events\BuildingSidebar;
use Modules\User\Contracts\Authentication; use Modules\User\Contracts\Authentication;
use Maatwebsite\Sidebar\SidebarExtender;
abstract class AbstractAdminSidebar implements SidebarExtender abstract class AbstractAdminSidebar implements SidebarExtender
{ {
......
...@@ -50,6 +50,7 @@ class MediaController extends Controller ...@@ -50,6 +50,7 @@ class MediaController extends Controller
if ($file->isImage()) { if ($file->isImage()) {
return '<img src="' . Imagy::getThumbnail($file->path, 'smallThumb') . '"/>'; return '<img src="' . Imagy::getThumbnail($file->path, 'smallThumb') . '"/>';
} }
return '<i class="fa ' . FileHelper::getFaIcon($file->media_type) . '" style="font-size: 20px;"></i>'; return '<i class="fa ' . FileHelper::getFaIcon($file->media_type) . '" style="font-size: 20px;"></i>';
}) })
->rawColumns(['thumbnail']) ->rawColumns(['thumbnail'])
......
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
namespace Modules\Media\Providers; namespace Modules\Media\Providers;
use Illuminate\Contracts\Events\Dispatcher as DispatcherContract; use Illuminate\Contracts\Events\Dispatcher as DispatcherContract;
use Illuminate\Support\Facades\Validator;
use Illuminate\Support\ServiceProvider; use Illuminate\Support\ServiceProvider;
use Modules\Core\Events\BuildingSidebar; use Modules\Core\Events\BuildingSidebar;
use Modules\Core\Traits\CanGetSidebarClassForModule; use Modules\Core\Traits\CanGetSidebarClassForModule;
......
...@@ -11,9 +11,9 @@ namespace Modules\Media\Tests; ...@@ -11,9 +11,9 @@ namespace Modules\Media\Tests;
use Illuminate\Container\Container; use Illuminate\Container\Container;
use Illuminate\Filesystem\Filesystem; use Illuminate\Filesystem\Filesystem;
use Illuminate\Http\UploadedFile; use Illuminate\Http\UploadedFile;
use Illuminate\Validation\Factory as Validator;
use Illuminate\Translation\FileLoader; use Illuminate\Translation\FileLoader;
use Illuminate\Translation\Translator; use Illuminate\Translation\Translator;
use Illuminate\Validation\Factory as Validator;
use Modules\Media\Validators\MaxFolderSizeRule; use Modules\Media\Validators\MaxFolderSizeRule;
final class MaxFolderSizeRuleTest extends MediaTestCase final class MaxFolderSizeRuleTest extends MediaTestCase
...@@ -50,6 +50,7 @@ final class MaxFolderSizeRuleTest extends MediaTestCase ...@@ -50,6 +50,7 @@ final class MaxFolderSizeRuleTest extends MediaTestCase
$validator = (new Validator($translator))->make(['file' => $directorySize], [ $validator = (new Validator($translator))->make(['file' => $directorySize], [
'file' => ['required', new MaxFolderSizeRule()], 'file' => ['required', new MaxFolderSizeRule()],
]); ]);
return $validator; return $validator;
} }
} }
...@@ -2,13 +2,12 @@ ...@@ -2,13 +2,12 @@
namespace Modules\Translation\Http\Controllers\Api; namespace Modules\Translation\Http\Controllers\Api;
use Cartalyst\Sentinel\Laravel\Facades\Sentinel;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use Illuminate\Routing\Controller; use Illuminate\Routing\Controller;
use Illuminate\Database\Eloquent\Collection;
use Cartalyst\Sentinel\Laravel\Facades\Sentinel;
use Modules\User\Traits\CanFindUserWithBearerToken;
use Modules\Translation\Services\TranslationRevisions;
use Modules\Translation\Repositories\TranslationRepository; use Modules\Translation\Repositories\TranslationRepository;
use Modules\Translation\Services\TranslationRevisions;
use Modules\User\Traits\CanFindUserWithBearerToken;
class TranslationController extends Controller class TranslationController extends Controller
{ {
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
namespace Modules\Translation\Repositories\File; namespace Modules\Translation\Repositories\File;
use Illuminate\Filesystem\Filesystem;
use Illuminate\Contracts\Translation\Loader; use Illuminate\Contracts\Translation\Loader;
use Illuminate\Filesystem\Filesystem;
use Modules\Translation\Repositories\FileTranslationRepository as FileTranslationRepositoryInterface; use Modules\Translation\Repositories\FileTranslationRepository as FileTranslationRepositoryInterface;
class FileTranslationRepository implements FileTranslationRepositoryInterface class FileTranslationRepository implements FileTranslationRepositoryInterface
......
...@@ -71,7 +71,6 @@ class EloquentTranslationRepositoryTest extends BaseTranslationTest ...@@ -71,7 +71,6 @@ class EloquentTranslationRepositoryTest extends BaseTranslationTest
], ],
]; ];
$this->assertEquals($expected, $this->translation->allFormatted()); $this->assertEquals($expected, $this->translation->allFormatted());
} }
......
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
namespace Modules\User\Entities\Sentinel; namespace Modules\User\Entities\Sentinel;
use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract;
use Illuminate\Auth\Authenticatable;
use Cartalyst\Sentinel\Laravel\Facades\Activation; use Cartalyst\Sentinel\Laravel\Facades\Activation;
use Cartalyst\Sentinel\Users\EloquentUser; use Cartalyst\Sentinel\Users\EloquentUser;
use Illuminate\Auth\Authenticatable;
use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract;
use Laracasts\Presenter\PresentableTrait; use Laracasts\Presenter\PresentableTrait;
use Modules\User\Entities\UserInterface; use Modules\User\Entities\UserInterface;
use Modules\User\Entities\UserToken; use Modules\User\Entities\UserToken;
...@@ -114,7 +114,7 @@ class User extends EloquentUser implements UserInterface, AuthenticatableContrac ...@@ -114,7 +114,7 @@ class User extends EloquentUser implements UserInterface, AuthenticatableContrac
if (config()->has($config)) { if (config()->has($config)) {
$function = config()->get($config); $function = config()->get($config);
$bound = $function->bindTo($this); $bound = $function->bindTo($this);
return $bound(); return $bound();
} }
......
...@@ -17,6 +17,7 @@ class Sentinel implements LaravelGuard ...@@ -17,6 +17,7 @@ class Sentinel implements LaravelGuard
if (SentinelFacade::check()) { if (SentinelFacade::check()) {
return true; return true;
} }
return false; return false;
} }
...@@ -47,6 +48,7 @@ class Sentinel implements LaravelGuard ...@@ -47,6 +48,7 @@ class Sentinel implements LaravelGuard
if ($user = SentinelFacade::check()) { if ($user = SentinelFacade::check()) {
return $user->id; return $user->id;
} }
return null; return null;
} }
......
...@@ -11,6 +11,7 @@ use Modules\Core\Traits\CanPublishConfiguration; ...@@ -11,6 +11,7 @@ use Modules\Core\Traits\CanPublishConfiguration;
use Modules\User\Contracts\Authentication; use Modules\User\Contracts\Authentication;
use Modules\User\Entities\UserToken; use Modules\User\Entities\UserToken;
use Modules\User\Events\Handlers\RegisterUserSidebar; use Modules\User\Events\Handlers\RegisterUserSidebar;
use Modules\User\Guards\Sentinel;
use Modules\User\Http\Middleware\AuthorisedApiToken; use Modules\User\Http\Middleware\AuthorisedApiToken;
use Modules\User\Http\Middleware\AuthorisedApiTokenAdmin; use Modules\User\Http\Middleware\AuthorisedApiTokenAdmin;
use Modules\User\Http\Middleware\GuestMiddleware; use Modules\User\Http\Middleware\GuestMiddleware;
...@@ -21,7 +22,6 @@ use Modules\User\Repositories\Eloquent\EloquentUserTokenRepository; ...@@ -21,7 +22,6 @@ use Modules\User\Repositories\Eloquent\EloquentUserTokenRepository;
use Modules\User\Repositories\RoleRepository; use Modules\User\Repositories\RoleRepository;
use Modules\User\Repositories\UserRepository; use Modules\User\Repositories\UserRepository;
use Modules\User\Repositories\UserTokenRepository; use Modules\User\Repositories\UserTokenRepository;
use Modules\User\Guards\Sentinel;
class UserServiceProvider extends ServiceProvider class UserServiceProvider extends ServiceProvider
{ {
......
...@@ -108,7 +108,7 @@ class EntityGenerator extends Generator ...@@ -108,7 +108,7 @@ class EntityGenerator extends Generator
$this->getContentForStub('admin-controller.stub', $entity) $this->getContentForStub('admin-controller.stub', $entity)
); );
} }
/** /**
* Generate the requests for the given entity * Generate the requests for the given entity
* *
......
...@@ -583,4 +583,4 @@ class ModuleScaffoldTest extends BaseTestCase ...@@ -583,4 +583,4 @@ class ModuleScaffoldTest extends BaseTestCase
return $controllerFile; return $controllerFile;
} }
} }
\ No newline at end of file
...@@ -6,6 +6,7 @@ if (! function_exists('module_version')) { ...@@ -6,6 +6,7 @@ if (! function_exists('module_version')) {
if (is_core_module($module->name) === true) { if (is_core_module($module->name) === true) {
return \Modules\Core\Foundation\AsgardCms::VERSION; return \Modules\Core\Foundation\AsgardCms::VERSION;
} }
return $module->version; return $module->version;
} }
} }
<?php <?php
return [ return [
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
......
...@@ -55,7 +55,7 @@ return [ ...@@ -55,7 +55,7 @@ return [
'public' => [ 'public' => [
'driver' => 'local', 'driver' => 'local',
'root' => storage_path('app/public'), 'root' => storage_path('app/public'),
'url' => env('APP_URL').'/storage', 'url' => env('APP_URL') . '/storage',
'visibility' => 'public', 'visibility' => 'public',
], ],
......
<?php <?php
return [ return [
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
......
...@@ -124,7 +124,7 @@ return [ ...@@ -124,7 +124,7 @@ return [
'cookie' => env( 'cookie' => env(
'SESSION_COOKIE', 'SESSION_COOKIE',
str_slug(env('APP_NAME', 'laravel'), '_').'_session' str_slug(env('APP_NAME', 'laravel'), '_') . '_session'
), ),
/* /*
......
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