Completed
Branch dev (38d68c)
by Pavel
10:56
created
app/src/Controller/CrudController.php 2 patches
Doc Comments   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
      * @param Response $response
16 16
      * @param array    $args
17 17
      *
18
-     * @return mixed
18
+     * @return \Psr\Http\Message\ResponseInterface
19 19
      */
20 20
     public function actionIndex(Request $request, Response $response, $args)
21 21
     {
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
      * @param Response $response
88 88
      * @param array    $args
89 89
      *
90
-     * @return mixed
90
+     * @return \Psr\Http\Message\ResponseInterface
91 91
      * @throws JsonException
92 92
      */
93 93
     public function actionGet(Request $request, Response $response, $args)
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
      * @param Response $response
111 111
      * @param array    $args
112 112
      *
113
-     * @return mixed
113
+     * @return \Psr\Http\Message\ResponseInterface
114 114
      * @throws JsonException
115 115
      */
116 116
     public function actionCreate(Request $request, Response $response, $args)
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
      * @param Response $response
134 134
      * @param array    $args
135 135
      *
136
-     * @return mixed
136
+     * @return \Psr\Http\Message\ResponseInterface
137 137
      * @throws JsonException
138 138
      */
139 139
     public function actionUpdate(Request $request, Response $response, $args)
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
      * @param Response $response
163 163
      * @param array    $args
164 164
      *
165
-     * @return mixed
165
+     * @return \Psr\Http\Message\ResponseInterface
166 166
      * @throws JsonException
167 167
      */
168 168
     public function actionDelete(Request $request, Response $response, $args)
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,9 @@
 block discarded – undo
34 34
                 $filter['operator']  = trim(strtolower($filter['operator']));
35 35
                 $filter['attribute'] = trim($filter['attribute']);
36 36
 
37
-                if (empty($filter['operator']) || empty($filter['attribute']) || empty($filter['value'])) continue;
37
+                if (empty($filter['operator']) || empty($filter['attribute']) || empty($filter['value'])) {
38
+                    continue;
39
+                }
38 40
 
39 41
                 switch ($filter['operator']) {
40 42
                     case 'in':
Please login to merge, or discard this patch.
app/src/Controller/TokenController.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -97,7 +97,7 @@
 block discarded – undo
97 97
      * @param Response $response
98 98
      * @param array    $args
99 99
      *
100
-     * @return mixed
100
+     * @return \Psr\Http\Message\ResponseInterface
101 101
      * @throws JsonException
102 102
      */
103 103
     public function auth(Request $request, Response $response, $args)
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@
 block discarded – undo
45 45
                 return false;
46 46
             }
47 47
             return true;
48
-        } catch (\Exception $e){
48
+        } catch (\Exception $e) {
49 49
             return false;
50 50
         }
51 51
     }
Please login to merge, or discard this patch.
app/src/Controller/UserController.php 2 patches
Doc Comments   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
      * @param Response $response
20 20
      * @param array    $args
21 21
      *
22
-     * @return mixed
22
+     * @return \Psr\Http\Message\ResponseInterface
23 23
      * @throws JsonException
24 24
      */
25 25
     public function actionCreate(Request $request, Response $response, $args)
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
      * @param Response $response
49 49
      * @param array    $args
50 50
      *
51
-     * @return mixed
51
+     * @return \Psr\Http\Message\ResponseInterface
52 52
      * @throws JsonException
53 53
      */
54 54
     public function actionUpdate(Request $request, Response $response, $args)
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
      * @param Response $response
81 81
      * @param array    $args
82 82
      *
83
-     * @return mixed
83
+     * @return \Psr\Http\Message\ResponseInterface
84 84
      * @throws JsonException
85 85
      */
86 86
     public function actionRequestResetPassword(Request $request, Response $response, $args)
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
      * @param Response $response
127 127
      * @param array    $args
128 128
      *
129
-     * @return mixed
129
+     * @return \Psr\Http\Message\ResponseInterface
130 130
      * @throws JsonException
131 131
      */
132 132
     public function actionResetPassword(Request $request, Response $response, $args)
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -141,7 +141,7 @@
 block discarded – undo
141 141
             $user->setPassword($params['data']['attributes']['password']);
142 142
             $user->removePasswordResetToken();
143 143
 
144
-            if($user->save()){
144
+            if($user->save()) {
145 145
                 return $this->renderer->jsonApiRender($response, 204);
146 146
             };
147 147
         }
Please login to merge, or discard this patch.
public/index.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,8 @@
 block discarded – undo
5 5
 }
6 6
 
7 7
 // Super debug func
8
-function prr($value) {
8
+function prr($value)
9
+{
9 10
     if (defined('DEBUG_MODE') && DEBUG_MODE == 1) {
10 11
         echo '<pre>';
11 12
         print_r($value);
Please login to merge, or discard this patch.
app/database/migrations/20160706232752_create_roles_table.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -8,8 +8,7 @@
 block discarded – undo
8 8
      */
9 9
     public function up()
10 10
     {
11
-        Capsule::schema()->create('roles', function($table)
12
-        {
11
+        Capsule::schema()->create('roles', function($table) {
13 12
             $table->increments('id');
14 13
             $table->string('name')->unique();
15 14
             $table->string('description');
Please login to merge, or discard this patch.
app/database/migrations/20160706233448_create_logs_table.php 1 patch
Braces   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,14 +1,14 @@
 block discarded – undo
1 1
 <?php
2 2
 use Illuminate\Database\Capsule\Manager as Capsule;
3 3
 
4
-class CreateLogsTable{
4
+class CreateLogsTable
5
+{
5 6
     /**
6 7
     * Do the migration
7 8
     */
8 9
     public function up()
9 10
     {
10
-        Capsule::schema()->create('logs', function($table)
11
-        {
11
+        Capsule::schema()->create('logs', function($table) {
12 12
             $table->increments('id');
13 13
             $table->string('action');
14 14
             $table->morphs('entity');
Please login to merge, or discard this patch.
app/database/migrations/20160706232835_create_rights_table.php 1 patch
Braces   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,14 +1,14 @@
 block discarded – undo
1 1
 <?php
2 2
 use Illuminate\Database\Capsule\Manager as Capsule;
3 3
 
4
-class CreateRightsTable{
4
+class CreateRightsTable
5
+{
5 6
     /**
6 7
     * Do the migration
7 8
     */
8 9
     public function up()
9 10
     {
10
-        Capsule::schema()->create('rights', function($table)
11
-        {
11
+        Capsule::schema()->create('rights', function($table) {
12 12
             $table->increments('id');
13 13
             $table->string('name')->unique();
14 14
             $table->string('description');
Please login to merge, or discard this patch.
app/database/migrations/20160706231338_create_users_table.php 1 patch
Braces   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,14 +1,14 @@
 block discarded – undo
1 1
 <?php
2 2
 use Illuminate\Database\Capsule\Manager as Capsule;
3 3
 
4
-class CreateUsersTable{
4
+class CreateUsersTable
5
+{
5 6
     /**
6 7
     * Do the migration
7 8
     */
8 9
     public function up()
9 10
     {
10
-        Capsule::schema()->create('users', function($table)
11
-        {
11
+        Capsule::schema()->create('users', function($table) {
12 12
             $table->increments('id');
13 13
             $table->string('email')->unique();
14 14
             $table->string('full_name');
Please login to merge, or discard this patch.
app/database/migrations/20161016143152_create_roles_to_right_table.php 1 patch
Braces   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,14 +1,14 @@
 block discarded – undo
1 1
 <?php
2 2
 use Illuminate\Database\Capsule\Manager as Capsule;
3 3
 
4
-class CreateRolesToRightTable{
4
+class CreateRolesToRightTable
5
+{
5 6
     /**
6 7
     * Do the migration
7 8
     */
8 9
     public function up()
9 10
     {
10
-        Capsule::schema()->create('roles_to_rights', function($table)
11
-        {
11
+        Capsule::schema()->create('roles_to_rights', function($table) {
12 12
             $table->integer('role_id')->unsigned();
13 13
             $table->integer('right_id')->unsigned();
14 14
             $table->primary(['role_id', 'right_id']);
Please login to merge, or discard this patch.