Passed
Push — master ( 638d34...c14ede )
by Ferry
04:41
created
src/controllers/FileController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
         $fullStoragePath = storage_path('app/'.$fullFilePath);
35 35
         $lifetime = 31556926; // One year in seconds
36 36
 
37
-        if (! Storage::exists($fullFilePath)) {
37
+        if (!Storage::exists($fullFilePath)) {
38 38
             abort(404);
39 39
         }
40 40
 
@@ -55,10 +55,10 @@  discard block
 block discarded – undo
55 55
                 $h = Request::get('h') ?: $w;
56 56
             }
57 57
 
58
-            $imgRaw = Image::cache(function ($image) use ($fullStoragePath, $w, $h) {
58
+            $imgRaw = Image::cache(function($image) use ($fullStoragePath, $w, $h) {
59 59
                 $im = $image->make($fullStoragePath);
60 60
                 if ($w) {
61
-                    if (! $h) {
61
+                    if (!$h) {
62 62
                         $im->fit($w);
63 63
                     } else {
64 64
                         $im->fit($w, $h);
Please login to merge, or discard this patch.
src/helpers/MailHelper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
     }
42 42
 
43 43
     public function send() {
44
-        Mail::send("crudbooster::emails.blank", ['content' => $this->content], function ($message) {
44
+        Mail::send("crudbooster::emails.blank", ['content' => $this->content], function($message) {
45 45
             $message->priority(1);
46 46
             $message->to($this->to_email);
47 47
             $message->from($this->sender_email, $this->sender_name);
Please login to merge, or discard this patch.
src/types/checkbox/CheckboxHelper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
 class CheckboxHelper
12 12
 {
13 13
     public static function parseValuesToArray($values) {
14
-        $data = explode(";",$values);
14
+        $data = explode(";", $values);
15 15
         return $data;
16 16
     }
17 17
     
Please login to merge, or discard this patch.
src/validations/validation.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,12 +1,12 @@
 block discarded – undo
1 1
 <?php 
2 2
 
3
-\Validator::extend('alpha_spaces', function ($attribute, $value) {
3
+\Validator::extend('alpha_spaces', function($attribute, $value) {
4 4
     // This will only accept alpha and spaces. 
5 5
     // If you want to accept hyphens use: /^[\pL\s-]+$/u.
6 6
     return preg_match('/^[\pL\s]+$/u', $value); 
7 7
 },'The :attribute should be letters and spaces only');
8 8
 
9
-\Validator::extend('alpha_num_spaces', function ($attribute, $value) {
9
+\Validator::extend('alpha_num_spaces', function($attribute, $value) {
10 10
     // This will only accept alphanumeric and spaces. 
11 11
     return preg_match('/^[a-zA-Z0-9\s]+$/', $value); 
12 12
 },'The :attribute should be alphanumeric characters and spaces only');
13 13
\ No newline at end of file
Please login to merge, or discard this patch.
src/database/migrations/2016_08_07_152421_add_role_users.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
      */
13 13
     public function up()
14 14
     {
15
-        Schema::table('users', function (Blueprint $table) {
15
+        Schema::table('users', function(Blueprint $table) {
16 16
             $table->string('photo')->nullable();
17 17
             $table->integer('cb_roles_id');
18 18
         });
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
      */
26 26
     public function down()
27 27
     {
28
-        Schema::table('users', function (Blueprint $table) {
28
+        Schema::table('users', function(Blueprint $table) {
29 29
             $table->dropColumn('cb_roles_id');
30 30
             $table->dropColumn('photo');
31 31
         });
Please login to merge, or discard this patch.
src/database/migrations/2016_08_07_152421_table_role_privileges.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
      */
13 13
     public function up()
14 14
     {
15
-        Schema::create('cb_role_privileges', function (Blueprint $table) {
15
+        Schema::create('cb_role_privileges', function(Blueprint $table) {
16 16
             $table->increments("id");
17 17
             $table->integer("cb_roles_id");
18 18
             $table->integer("cb_menus_id");
Please login to merge, or discard this patch.
src/database/migrations/2016_08_07_152421_table_roles.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
      */
13 13
     public function up()
14 14
     {
15
-        Schema::create('cb_roles', function (Blueprint $table) {
15
+        Schema::create('cb_roles', function(Blueprint $table) {
16 16
             $table->increments("id");
17 17
             $table->string('name');
18 18
         });
Please login to merge, or discard this patch.
src/database/migrations/2016_08_07_152421_table_modules.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
      */
13 13
     public function up()
14 14
     {
15
-        Schema::create('cb_modules', function (Blueprint $table) {
15
+        Schema::create('cb_modules', function(Blueprint $table) {
16 16
             $table->increments("id");
17 17
             $table->string('name');
18 18
             $table->string("icon");
Please login to merge, or discard this patch.
src/routes.php 2 patches
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@
 block discarded – undo
51 51
     if (Request::is(cbConfig('ADMIN_PATH'))) {
52 52
         if($dashboard = cbConfig("ADMIN_DASHBOARD_CONTROLLER")) {
53 53
             cb()->routeGet("/", $dashboard);
54
-        }else{
54
+        } else{
55 55
             cb()->routeGet("/", "\crocodicstudio\crudbooster\controllers\AdminDashboardController@getIndex");
56 56
         }
57 57
     }
Please login to merge, or discard this patch.
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -1,41 +1,41 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 // Developer Backend Middleware
4
-Route::group(['middleware' => ['web',\crocodicstudio\crudbooster\middlewares\CBDeveloper::class],
4
+Route::group(['middleware' => ['web', \crocodicstudio\crudbooster\middlewares\CBDeveloper::class],
5 5
     'prefix'=>"developer/".getSetting('developer_path'),
6
-    'namespace' => 'crocodicstudio\crudbooster\controllers'], function () {
6
+    'namespace' => 'crocodicstudio\crudbooster\controllers'], function() {
7 7
     cb()->routeController("modules", "\crocodicstudio\crudbooster\controllers\DeveloperModulesController");
8 8
     cb()->routeController("menus", "\crocodicstudio\crudbooster\controllers\DeveloperMenusController");
9
-    cb()->routeController("roles","\crocodicstudio\crudbooster\controllers\DeveloperRolesController");
10
-    cb()->routeController("users","\crocodicstudio\crudbooster\controllers\DeveloperUsersController");
11
-    cb()->routeController("plugins","\crocodicstudio\crudbooster\controllers\DeveloperPluginStoreController");
12
-    cb()->routePost("skip-tutorial","DeveloperDashboardController@postSkipTutorial");
13
-    cb()->routeGet("/","DeveloperDashboardController@getIndex");
9
+    cb()->routeController("roles", "\crocodicstudio\crudbooster\controllers\DeveloperRolesController");
10
+    cb()->routeController("users", "\crocodicstudio\crudbooster\controllers\DeveloperUsersController");
11
+    cb()->routeController("plugins", "\crocodicstudio\crudbooster\controllers\DeveloperPluginStoreController");
12
+    cb()->routePost("skip-tutorial", "DeveloperDashboardController@postSkipTutorial");
13
+    cb()->routeGet("/", "DeveloperDashboardController@getIndex");
14 14
 });
15 15
 
16 16
 // Developer Auth Middleware
17 17
 Route::group(['middleware' => ['web'],
18 18
     'prefix'=>"developer/".getSetting('developer_path'),
19
-    'namespace' => 'crocodicstudio\crudbooster\controllers'], function () {
20
-    cb()->routePost("login","AdminAuthController@postLoginDeveloper");
21
-    cb()->routeGet("login","AdminAuthController@getLoginDeveloper");
22
-    cb()->routeGet("logout","AdminAuthController@getLogoutDeveloper");
19
+    'namespace' => 'crocodicstudio\crudbooster\controllers'], function() {
20
+    cb()->routePost("login", "AdminAuthController@postLoginDeveloper");
21
+    cb()->routeGet("login", "AdminAuthController@getLoginDeveloper");
22
+    cb()->routeGet("logout", "AdminAuthController@getLogoutDeveloper");
23 23
 });
24 24
 
25 25
 // Routing without any middleware
26
-Route::group(['middleware' => ['web'], 'namespace' => '\crocodicstudio\crudbooster\controllers'], function () {
26
+Route::group(['middleware' => ['web'], 'namespace' => '\crocodicstudio\crudbooster\controllers'], function() {
27 27
     cb()->routeGet('uploads/{one?}/{two?}/{three?}/{four?}/{five?}', "FileController@getPreview");
28 28
 });
29 29
 
30 30
 // Routing without any middleware with admin prefix
31
-Route::group(['middleware' => ['web'], 'prefix' => cbConfig('ADMIN_PATH'), 'namespace' => 'crocodicstudio\crudbooster\controllers'], function () {
31
+Route::group(['middleware' => ['web'], 'prefix' => cbConfig('ADMIN_PATH'), 'namespace' => 'crocodicstudio\crudbooster\controllers'], function() {
32 32
     cb()->routeGet('logout', "AdminAuthController@getLogout");
33 33
     cb()->routePost('login', "AdminAuthController@postLogin");
34 34
     cb()->routeGet('login', "AdminAuthController@getLogin");
35 35
 });
36 36
 
37 37
 // Routing package controllers
38
-cb()->routeGroupBackend(function () {
38
+cb()->routeGroupBackend(function() {
39 39
     cb()->routeController('profile', '\crocodicstudio\crudbooster\controllers\AdminProfileController');
40 40
 });
41 41
 
@@ -44,24 +44,24 @@  discard block
 block discarded – undo
44 44
     'middleware' => ['web', \crocodicstudio\crudbooster\middlewares\CBBackend::class],
45 45
     'prefix' => cbConfig('ADMIN_PATH'),
46 46
     'namespace' => 'App\Http\Controllers',
47
-], function () {
47
+], function() {
48 48
 
49 49
     if (Request::is(cbConfig('ADMIN_PATH'))) {
50
-        if($dashboard = cbConfig("ADMIN_DASHBOARD_CONTROLLER")) {
50
+        if ($dashboard = cbConfig("ADMIN_DASHBOARD_CONTROLLER")) {
51 51
             cb()->routeGet("/", $dashboard);
52
-        }else{
52
+        } else {
53 53
             cb()->routeGet("/", "\crocodicstudio\crudbooster\controllers\AdminDashboardController@getIndex");
54 54
         }
55 55
     }
56 56
 
57 57
     $controllers = glob(app_path('Http/Controllers/Admin*Controller.php'));
58 58
 
59
-    foreach($controllers as $controller) {
59
+    foreach ($controllers as $controller) {
60 60
         $controllerName = basename($controller);
61
-        $controllerName = rtrim($controllerName,".php");
61
+        $controllerName = rtrim($controllerName, ".php");
62 62
         $className = '\App\Http\Controllers\\'.$controllerName;
63 63
         $controllerClass = new $className();
64
-        if(method_exists($controllerClass, 'cbInit')) {
64
+        if (method_exists($controllerClass, 'cbInit')) {
65 65
             cb()->routeController($controllerClass->getData('permalink'), $controllerName);
66 66
         }
67 67
     }
Please login to merge, or discard this patch.