@@ -17,7 +17,7 @@ |
||
17 | 17 | return [ |
18 | 18 | 'full_name' => $user->full_name, |
19 | 19 | 'email' => $user->email, |
20 | - 'role_id' => (int) $user->role_id, |
|
20 | + 'role_id' => (int)$user->role_id, |
|
21 | 21 | 'created_at' => Carbon::parse($user->created_at)->setTimezone('UTC')->format(Carbon::ISO8601), |
22 | 22 | 'updated_at' => Carbon::parse($user->updated_at)->setTimezone('UTC')->format(Carbon::ISO8601), |
23 | 23 | 'created_by' => $user->created_by, |
@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | public function creating(BaseModel $model) |
16 | 16 | { |
17 | 17 | $user = Auth::getUser(); |
18 | - if(!is_null($user)){ |
|
18 | + if (!is_null($user)) { |
|
19 | 19 | $model->created_by = $user->id; |
20 | 20 | } |
21 | 21 | } |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | public function updating(BaseModel $model) |
31 | 31 | { |
32 | 32 | $user = Auth::getUser(); |
33 | - if(!is_null($user)){ |
|
33 | + if (!is_null($user)) { |
|
34 | 34 | $model->updated_by = $user->id; |
35 | 35 | } |
36 | 36 | } |
@@ -96,5 +96,5 @@ |
||
96 | 96 | | of "email". This simply helps us make messages a little cleaner. |
97 | 97 | | |
98 | 98 | */ |
99 | - 'attributes' => [ ], |
|
99 | + 'attributes' => [], |
|
100 | 100 | ]; |
101 | 101 | \ No newline at end of file |
@@ -12,8 +12,8 @@ |
||
12 | 12 | |
13 | 13 | public function actionIndex() |
14 | 14 | { |
15 | - echo 'This is sample console command.' . PHP_EOL; |
|
16 | - echo 'Actions: ' . PHP_EOL; |
|
17 | - echo 'partisan sample index' . PHP_EOL; |
|
15 | + echo 'This is sample console command.'.PHP_EOL; |
|
16 | + echo 'Actions: '.PHP_EOL; |
|
17 | + echo 'partisan sample index'.PHP_EOL; |
|
18 | 18 | } |
19 | 19 | } |
@@ -96,5 +96,5 @@ |
||
96 | 96 | | of "email". This simply helps us make messages a little cleaner. |
97 | 97 | | |
98 | 98 | */ |
99 | - 'attributes' => [ ], |
|
99 | + 'attributes' => [], |
|
100 | 100 | ]; |
101 | 101 | \ No newline at end of file |
@@ -8,13 +8,13 @@ discard block |
||
8 | 8 | // monolog settings |
9 | 9 | 'logger' => [ |
10 | 10 | 'name' => 'app', |
11 | - 'path' => __DIR__ . '/../log/app.log', |
|
11 | + 'path' => __DIR__.'/../log/app.log', |
|
12 | 12 | ], |
13 | 13 | |
14 | - 'mailTemplate' => __DIR__ . '/../mail', |
|
14 | + 'mailTemplate' => __DIR__.'/../mail', |
|
15 | 15 | |
16 | 16 | // DB |
17 | - 'database' => require(__DIR__ . '/../config/db.php'), |
|
17 | + 'database' => require(__DIR__.'/../config/db.php'), |
|
18 | 18 | |
19 | 19 | // ACL |
20 | 20 | 'acl' => |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | * specified here so can be used in the code if needs be |
31 | 31 | * Example: ['user' => null] |
32 | 32 | */ |
33 | - 'resources' => [ ], |
|
33 | + 'resources' => [], |
|
34 | 34 | // where we specify the guarding! |
35 | 35 | 'guards' => [ |
36 | 36 | /* |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | * if included all resources default to deny unless specified. |
40 | 40 | * Example: ['user', ['admin']] |
41 | 41 | */ |
42 | - 'resources' => [ ], |
|
42 | + 'resources' => [], |
|
43 | 43 | /* |
44 | 44 | * list of literal routes for guarding. |
45 | 45 | * optional |
@@ -48,8 +48,8 @@ discard block |
||
48 | 48 | * ['route', ['roles'], ['methods',' methods1']] |
49 | 49 | */ |
50 | 50 | 'routes' => [ |
51 | - ['/api/token', ['guest'], ['post']], |
|
52 | - ['/api/user', ['user'], ['get']], |
|
51 | + ['/api/token', ['guest'], ['post']], |
|
52 | + ['/api/user', ['user'], ['get']], |
|
53 | 53 | ], |
54 | 54 | /* |
55 | 55 | * list of callables to resolve against |
@@ -59,27 +59,27 @@ discard block |
||
59 | 59 | * ['callable', ['roles']] |
60 | 60 | */ |
61 | 61 | 'callables' => [ |
62 | - ['App\Controller\CrudController', ['user']], |
|
63 | - ['App\Controller\CrudController:actionIndex', ['user']], |
|
64 | - ['App\Controller\CrudController:actionGet', ['user']], |
|
65 | - ['App\Controller\CrudController:actionCreate', ['user']], |
|
66 | - ['App\Controller\CrudController:actionUpdate', ['user']], |
|
67 | - ['App\Controller\CrudController:actionDelete', ['user']], |
|
62 | + ['App\Controller\CrudController', ['user']], |
|
63 | + ['App\Controller\CrudController:actionIndex', ['user']], |
|
64 | + ['App\Controller\CrudController:actionGet', ['user']], |
|
65 | + ['App\Controller\CrudController:actionCreate', ['user']], |
|
66 | + ['App\Controller\CrudController:actionUpdate', ['user']], |
|
67 | + ['App\Controller\CrudController:actionDelete', ['user']], |
|
68 | 68 | |
69 | - ['App\Controller\UserController:actionIndex', ['admin']], |
|
70 | - ['App\Controller\UserController:actionGet', ['admin']], |
|
69 | + ['App\Controller\UserController:actionIndex', ['admin']], |
|
70 | + ['App\Controller\UserController:actionGet', ['admin']], |
|
71 | 71 | ['App\Controller\UserController:actionCreate', ['admin']], |
72 | 72 | ['App\Controller\UserController:actionUpdate', ['admin']], |
73 | - ['App\Controller\UserController:actionDelete', ['user']], |
|
73 | + ['App\Controller\UserController:actionDelete', ['user']], |
|
74 | 74 | ] |
75 | 75 | ] |
76 | 76 | ], |
77 | 77 | |
78 | 78 | 'translate' => [ |
79 | - 'path' => __DIR__ . '/../lang', |
|
79 | + 'path' => __DIR__.'/../lang', |
|
80 | 80 | 'locale' => 'ru', |
81 | 81 | ], |
82 | 82 | |
83 | - 'params' => require(__DIR__ . '/../config/params.php'), |
|
83 | + 'params' => require(__DIR__.'/../config/params.php'), |
|
84 | 84 | ], |
85 | 85 | ]; |
@@ -56,7 +56,7 @@ |
||
56 | 56 | |
57 | 57 | $container['notAllowedHandler'] = function($c) { |
58 | 58 | return function($request, $response, $methods) use ($c) { |
59 | - throw new JsonException(null, 405, 'Method Not Allowed', 'Method must be one of: ' . implode(', ', $methods)); |
|
59 | + throw new JsonException(null, 405, 'Method Not Allowed', 'Method must be one of: '.implode(', ', $methods)); |
|
60 | 60 | }; |
61 | 61 | }; |
62 | 62 |