Passed
Push — master ( 7cefde...0f4397 )
by Tobias
03:54
created
src/Models/Logs/ChangeByUser.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -12,8 +12,8 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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()) {
Please login to merge, or discard this patch.
src/Database/MigrationHelper.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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);
Please login to merge, or discard this patch.
src/Support/tmaxham_helpers.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
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
Please login to merge, or discard this patch.
tests/TestCase.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -20,10 +20,10 @@
 block discarded – undo
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
             ]);
Please login to merge, or discard this patch.
src/Http/Middleware/CloudFlare.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
             $request->server->set('HTTPS', 'on');
28 28
         }
29 29
 
30
-        if (! $request->secure() && 'production' === env('APP_ENV')) {
30
+        if (!$request->secure() && 'production' === env('APP_ENV')) {
31 31
             return Redirect::secure($request->getRequestUri());
32 32
         }
33 33
 
Please login to merge, or discard this patch.
src/Http/Middleware/Cors.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
     public function handle(Request $request, Closure $next)
24 24
     {
25 25
         $response = $next($request);
26
-        if (! method_exists($response, 'header')) {
26
+        if (!method_exists($response, 'header')) {
27 27
             return $response;
28 28
         }
29 29
 
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
      */
38 38
     private function addCorsHeaders($response)
39 39
     {
40
-        if (! $response->headers->has('Access-Control-Allow-Origin')) {
40
+        if (!$response->headers->has('Access-Control-Allow-Origin')) {
41 41
             $response = $response->header('Access-Control-Allow-Origin', config('tma-helper.cors.allowedOrigins', 'localhost'))
42 42
                 ->header('Access-Control-Allow-Methods', config('tma-helper.cors.allowedMethods'));
43 43
         }
Please login to merge, or discard this patch.