@@ -27,7 +27,7 @@ |
||
27 | 27 | $request->server->set('HTTPS', 'on'); |
28 | 28 | } |
29 | 29 | |
30 | - if (! $request->secure() && env('APP_ENV') === 'production') { |
|
30 | + if (!$request->secure() && env('APP_ENV') === 'production') { |
|
31 | 31 | return Redirect::secure($request->getRequestUri()); |
32 | 32 | } |
33 | 33 |
@@ -12,8 +12,8 @@ discard block |
||
12 | 12 | */ |
13 | 13 | public static function bootChangeByUser() |
14 | 14 | { |
15 | - static::creating(function ($model) { |
|
16 | - if (App::runningInConsole() || ! Auth::check()) { |
|
15 | + static::creating(function($model) { |
|
16 | + if (App::runningInConsole() || !Auth::check()) { |
|
17 | 17 | return true; |
18 | 18 | } |
19 | 19 | if ($model->getCreatedByColumn()) { |
@@ -26,8 +26,8 @@ discard block |
||
26 | 26 | return true; |
27 | 27 | }); |
28 | 28 | |
29 | - static::updating(function ($model) { |
|
30 | - if (App::runningInConsole() || ! Auth::check()) { |
|
29 | + static::updating(function($model) { |
|
30 | + if (App::runningInConsole() || !Auth::check()) { |
|
31 | 31 | return true; |
32 | 32 | } |
33 | 33 | if ($model->getUpdatedByColumn()) { |
@@ -37,8 +37,8 @@ discard block |
||
37 | 37 | return true; |
38 | 38 | }); |
39 | 39 | |
40 | - static::deleting(function ($model) { |
|
41 | - if (App::runningInConsole() || ! Auth::check()) { |
|
40 | + static::deleting(function($model) { |
|
41 | + if (App::runningInConsole() || !Auth::check()) { |
|
42 | 42 | return true; |
43 | 43 | } |
44 | 44 | if ($model->getDeletedByColumn()) { |
@@ -35,7 +35,7 @@ |
||
35 | 35 | */ |
36 | 36 | private function addCorsHeaders(Response $response) |
37 | 37 | { |
38 | - if (! $response->headers->has('Access-Control-Allow-Origin')) { |
|
38 | + if (!$response->headers->has('Access-Control-Allow-Origin')) { |
|
39 | 39 | $response = $response->header('Access-Control-Allow-Origin', config('tma-helper.cors.allowedOrigins', 'localhost')) |
40 | 40 | ->header('Access-Control-Allow-Methods', config('tma-helper.cors.allowedMethods')); |
41 | 41 | } |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | $table->char('uuid', 36); |
18 | 18 | /** @var \Illuminate\Support\Fluent $fluent */ |
19 | 19 | $fluent = $table->unique('uuid', 'uuid'); |
20 | - if (! is_null($comment)) { |
|
20 | + if (!is_null($comment)) { |
|
21 | 21 | $fluent->comment = $comment; |
22 | 22 | } |
23 | 23 | } |
@@ -36,13 +36,13 @@ discard block |
||
36 | 36 | |
37 | 37 | public static function addChangedByUserFields(Blueprint $table, array $fields = ['created_by', 'updated_by', 'deleted_by'], string $relation = 'users', string $foreign = 'id', string $onDelete = self::REFERENTIAL_ACTION_CASCADE) |
38 | 38 | { |
39 | - if (! isset($fields[0]) || ! is_string($fields[0])) { |
|
39 | + if (!isset($fields[0]) || !is_string($fields[0])) { |
|
40 | 40 | $fields[0] = 'created_by'; |
41 | 41 | } |
42 | - if (! isset($fields[1]) || ! is_string($fields[1])) { |
|
42 | + if (!isset($fields[1]) || !is_string($fields[1])) { |
|
43 | 43 | $fields[1] = 'updated_by'; |
44 | 44 | } |
45 | - if (! isset($fields[2]) || ! is_string($fields[2])) { |
|
45 | + if (!isset($fields[2]) || !is_string($fields[2])) { |
|
46 | 46 | $fields[2] = 'deleted_by'; |
47 | 47 | } |
48 | 48 | self::addCreatedByUser($table, $fields[0], $relation, $foreign, $onDelete); |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -if (! function_exists('_val')) { |
|
3 | +if (!function_exists('_val')) { |
|
4 | 4 | /** |
5 | 5 | * @param mixed $value |
6 | 6 | * @param null|mixed $default |
@@ -20,10 +20,10 @@ |
||
20 | 20 | |
21 | 21 | private function addApiRoutes($router) |
22 | 22 | { |
23 | - $router->group(['middleware' => Cors::class], function () use ($router) { |
|
23 | + $router->group(['middleware' => Cors::class], function() use ($router) { |
|
24 | 24 | $router->get('api/ping', [ |
25 | 25 | 'as' => 'api.ping', |
26 | - 'uses' => function () { |
|
26 | + 'uses' => function() { |
|
27 | 27 | return 'pong'; |
28 | 28 | }, |
29 | 29 | ]); |