Test Failed
Push — master ( 5de213...aa2b1e )
by Justin
02:48
created
db/migrations/20171020191310_add_redirects_table.php 2 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -29,10 +29,10 @@
 block discarded – undo
29 29
     {
30 30
         $table = $this->table('redirects');
31 31
         $table->addColumn('hash', 'string')
32
-              ->addColumn('redirect_to', 'text')
33
-              ->addColumn('count', 'integer', ['default' => 0])
34
-              ->addColumn('created_at', 'datetime')
35
-              ->addColumn('updated_at', 'datetime')
36
-              ->create();
32
+                ->addColumn('redirect_to', 'text')
33
+                ->addColumn('count', 'integer', ['default' => 0])
34
+                ->addColumn('created_at', 'datetime')
35
+                ->addColumn('updated_at', 'datetime')
36
+                ->create();
37 37
     }
38 38
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
         $table = $this->table('redirects');
31 31
         $table->addColumn('hash', 'string')
32 32
               ->addColumn('redirect_to', 'text')
33
-              ->addColumn('count', 'integer', ['default' => 0])
33
+              ->addColumn('count', 'integer', [ 'default' => 0 ])
34 34
               ->addColumn('created_at', 'datetime')
35 35
               ->addColumn('updated_at', 'datetime')
36 36
               ->create();
Please login to merge, or discard this patch.
app/Models/Redirect.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
      */
43 43
     public function getUrlAttribute()
44 44
     {
45
-        return config()['base_url'] . '/' . $this->hash;
45
+        return config()[ 'base_url' ] . '/' . $this->hash;
46 46
     }
47 47
 
48 48
     /**
Please login to merge, or discard this patch.
app/helpers.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@
 block discarded – undo
6 6
  * @param array  $data      array of variables to extract
7 7
  * @return void
8 8
  */
9
-function view($location, $data = [])
9
+function view($location, $data = [ ])
10 10
 {
11 11
     ob_start();
12 12
     extract($data);
Please login to merge, or discard this patch.
app/Middleware/Api.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
     public function isAuthorized()
57 57
     {
58 58
         $auth = substr($this->request->getHeaderLine('Authorization'), 7);
59
-        return $this->request->getAttribute('config')['api_secret'] === $auth;
59
+        return $this->request->getAttribute('config')[ 'api_secret' ] === $auth;
60 60
     }
61 61
 
62 62
     /**
@@ -77,8 +77,8 @@  discard block
 block discarded – undo
77 77
     public function create()
78 78
     {
79 79
         $body = $this->request->getAttribute('body');
80
-        if (isset($body['url'])) {
81
-            return new JsonResponse(Redirect::createUnique($body['url']));
80
+        if (isset($body[ 'url' ])) {
81
+            return new JsonResponse(Redirect::createUnique($body[ 'url' ]));
82 82
         }
83 83
         return new JsonResponse([
84 84
             'message' => 'Request must include json body with url property.'
@@ -99,10 +99,10 @@  discard block
 block discarded – undo
99 99
                 case "POST /redirects":
100 100
                     return $this->create();
101 101
                 default:
102
-                    return new JsonResponse(['status' => 'No such api endpoint'], 404);
102
+                    return new JsonResponse([ 'status' => 'No such api endpoint' ], 404);
103 103
             }
104 104
         }
105
-        return new JsonResponse(['message' => 'Not authorized'], 403);
105
+        return new JsonResponse([ 'message' => 'Not authorized' ], 403);
106 106
     }
107 107
 
108 108
     /**
Please login to merge, or discard this patch.
app/Middleware/Database.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
     public function process(ServerRequestInterface $request, DelegateInterface $delegate)
20 20
     {
21 21
         $capsule = new Manager;
22
-        $capsule->addConnection($request->getAttribute('config')['database']);
22
+        $capsule->addConnection($request->getAttribute('config')[ 'database' ]);
23 23
         $capsule->setAsGlobal();
24 24
         $capsule->bootEloquent();
25 25
         return $delegate->process($request->withAttribute('capsule', $capsule));
Please login to merge, or discard this patch.