Completed
Pull Request — master (#1317)
by
unknown
02:34
created
database/migrations/2016_01_04_173148_create_admin_tables.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
     {
15 15
         $connection = config('admin.database.connection') ?: config('database.default');
16 16
 
17
-        Schema::connection($connection)->create(config('admin.database.users_table'), function (Blueprint $table) {
17
+        Schema::connection($connection)->create(config('admin.database.users_table'), function(Blueprint $table) {
18 18
             $table->increments('id');
19 19
             $table->string('username', 190)->unique();
20 20
             $table->string('password', 60);
@@ -23,21 +23,21 @@  discard block
 block discarded – undo
23 23
             $table->timestamps();
24 24
         });
25 25
 
26
-        Schema::connection($connection)->create(config('admin.database.roles_table'), function (Blueprint $table) {
26
+        Schema::connection($connection)->create(config('admin.database.roles_table'), function(Blueprint $table) {
27 27
             $table->increments('id');
28 28
             $table->string('name', 50)->unique();
29 29
             $table->string('slug', 50);
30 30
             $table->timestamps();
31 31
         });
32 32
 
33
-        Schema::connection($connection)->create(config('admin.database.permissions_table'), function (Blueprint $table) {
33
+        Schema::connection($connection)->create(config('admin.database.permissions_table'), function(Blueprint $table) {
34 34
             $table->increments('id');
35 35
             $table->string('name', 50)->unique();
36 36
             $table->string('slug', 50);
37 37
             $table->timestamps();
38 38
         });
39 39
 
40
-        Schema::connection($connection)->create(config('admin.database.menu_table'), function (Blueprint $table) {
40
+        Schema::connection($connection)->create(config('admin.database.menu_table'), function(Blueprint $table) {
41 41
             $table->increments('id');
42 42
             $table->integer('parent_id')->default(0);
43 43
             $table->integer('order')->default(0);
@@ -48,35 +48,35 @@  discard block
 block discarded – undo
48 48
             $table->timestamps();
49 49
         });
50 50
 
51
-        Schema::connection($connection)->create(config('admin.database.role_users_table'), function (Blueprint $table) {
51
+        Schema::connection($connection)->create(config('admin.database.role_users_table'), function(Blueprint $table) {
52 52
             $table->integer('role_id');
53 53
             $table->integer('user_id');
54 54
             $table->index(['role_id', 'user_id']);
55 55
             $table->timestamps();
56 56
         });
57 57
 
58
-        Schema::connection($connection)->create(config('admin.database.role_permissions_table'), function (Blueprint $table) {
58
+        Schema::connection($connection)->create(config('admin.database.role_permissions_table'), function(Blueprint $table) {
59 59
             $table->integer('role_id');
60 60
             $table->integer('permission_id');
61 61
             $table->index(['role_id', 'permission_id']);
62 62
             $table->timestamps();
63 63
         });
64 64
 
65
-        Schema::connection($connection)->create(config('admin.database.user_permissions_table'), function (Blueprint $table) {
65
+        Schema::connection($connection)->create(config('admin.database.user_permissions_table'), function(Blueprint $table) {
66 66
             $table->integer('user_id');
67 67
             $table->integer('permission_id');
68 68
             $table->index(['user_id', 'permission_id']);
69 69
             $table->timestamps();
70 70
         });
71 71
 
72
-        Schema::connection($connection)->create(config('admin.database.role_menu_table'), function (Blueprint $table) {
72
+        Schema::connection($connection)->create(config('admin.database.role_menu_table'), function(Blueprint $table) {
73 73
             $table->integer('role_id');
74 74
             $table->integer('menu_id');
75 75
             $table->index(['role_id', 'menu_id']);
76 76
             $table->timestamps();
77 77
         });
78 78
 
79
-        Schema::connection($connection)->create(config('admin.database.operation_log_table'), function (Blueprint $table) {
79
+        Schema::connection($connection)->create(config('admin.database.operation_log_table'), function(Blueprint $table) {
80 80
             $table->increments('id');
81 81
             $table->integer('user_id');
82 82
             $table->string('path');
Please login to merge, or discard this patch.
resources/views/partials/exception.blade.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 @if($errors->hasBag('exception'))
2
-    <?php $error = $errors->getBag('exception');?>
2
+    <?php $error = $errors->getBag('exception'); ?>
3 3
     <div class="alert alert-warning alert-dismissable">
4 4
         <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
5 5
         <h4>
Please login to merge, or discard this patch.
resources/views/partials/error.blade.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 @if(Session::has('error'))
2
-    <?php $error = Session::get('error');?>
2
+    <?php $error = Session::get('error'); ?>
3 3
     <div class="alert alert-danger alert-dismissable">
4 4
         <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
5 5
         <h4><i class="icon fa fa-ban"></i>{{ array_get($error->get('title'), 0) }}</h4>
Please login to merge, or discard this patch.
resources/views/partials/success.blade.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 @if(Session::has('success'))
2
-    <?php $success = Session::get('success');?>
2
+    <?php $success = Session::get('success'); ?>
3 3
     <div class="alert alert-success alert-dismissable">
4 4
         <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
5 5
         <h4><i class="icon fa fa-check"></i>{{ array_get($success->get('title'), 0) }}</h4>
Please login to merge, or discard this patch.
src/Controllers/ModelForm.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
      *
34 34
      * @param int $id
35 35
      *
36
-     * @return \Illuminate\Http\Response
36
+     * @return \Illuminate\Http\JsonResponse
37 37
      */
38 38
     public function destroy($id)
39 39
     {
Please login to merge, or discard this patch.
src/Extension.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
     protected static function routes($callback)
25 25
     {
26 26
         /* @var \Illuminate\Routing\Router $router */
27
-        Route::group(['prefix' => config('admin.route.prefix')], function ($router) use ($callback) {
27
+        Route::group(['prefix' => config('admin.route.prefix')], function($router) use ($callback) {
28 28
             $attributes = array_merge([
29 29
                 'middleware' => config('admin.route.middleware'),
30 30
             ], static::config('route', []));
Please login to merge, or discard this patch.
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -8,6 +8,9 @@
 block discarded – undo
8 8
 
9 9
 abstract class Extension
10 10
 {
11
+    /**
12
+     * @param string $key
13
+     */
11 14
     public static function config($key, $default = null)
12 15
     {
13 16
         $name = array_search(get_called_class(), Admin::$extensions);
Please login to merge, or discard this patch.
src/Auth/Database/Permission.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 
66 66
         $method = $this->http_method;
67 67
 
68
-        $matches = array_map(function ($path) use ($method) {
68
+        $matches = array_map(function($path) use ($method) {
69 69
             $path = trim(config('admin.route.prefix'), '/').$path;
70 70
 
71 71
             if (Str::contains($path, ':')) {
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
             return false;
100 100
         }
101 101
 
102
-        $method = collect($match['method'])->filter()->map(function ($method) {
102
+        $method = collect($match['method'])->filter()->map(function($method) {
103 103
             return strtoupper($method);
104 104
         });
105 105
 
Please login to merge, or discard this patch.
src/Auth/Database/HasPermissions.php 1 patch
Doc Comments   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
     /**
56 56
      * Get all permissions of user.
57 57
      *
58
-     * @return mixed
58
+     * @return Collection
59 59
      */
60 60
     public function allPermissions() : Collection
61 61
     {
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
     /**
98 98
      * Check if user is administrator.
99 99
      *
100
-     * @return mixed
100
+     * @return boolean
101 101
      */
102 102
     public function isAdministrator() : bool
103 103
     {
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
      *
110 110
      * @param string $role
111 111
      *
112
-     * @return mixed
112
+     * @return boolean
113 113
      */
114 114
     public function isRole(string $role) : bool
115 115
     {
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
      *
122 122
      * @param array $roles
123 123
      *
124
-     * @return mixed
124
+     * @return boolean
125 125
      */
126 126
     public function inRoles(array $roles = []) : bool
127 127
     {
Please login to merge, or discard this patch.
src/Form/Field/MultipleFile.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -134,7 +134,7 @@
 block discarded – undo
134 134
     {
135 135
         $this->name = $this->getStoreName($file);
136 136
 
137
-        return tap($this->upload($file), function () {
137
+        return tap($this->upload($file), function() {
138 138
             $this->name = null;
139 139
         });
140 140
     }
Please login to merge, or discard this patch.