Completed
Push — dev ( a62e57...4efd8c )
by Yan
02:03
created
src/Lincable/Parsers/Parser.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
             // Now that we have verified the option is dynamic and has 
87 87
             // matches, we get the Option object from the implemented
88 88
             // method to deal with the matches.  
89
-            $parameter =  $this->parseMatches($this->getMatches($option));
89
+            $parameter = $this->parseMatches($this->getMatches($option));
90 90
 
91 91
             // Return the content of the option executed.
92 92
             return $this->runForParameter($parameter);
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
      */
104 104
     public function addFormatters($formatters)
105 105
     {
106
-        array_walk($formatters, function ($formatter, $name) {
106
+        array_walk($formatters, function($formatter, $name) {
107 107
             $this->addFormatter($formatter, is_int($name) ? null : $name);
108 108
         });
109 109
 
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
      * @param  array $params
212 212
      * @return mixed
213 213
      */
214
-    protected function callFormatter($formatter, array $params = [])
214
+    protected function callFormatter($formatter, array $params = [ ])
215 215
     {
216 216
         return $this->getContainer()->call($formatter, $params);
217 217
     }
@@ -236,7 +236,7 @@  discard block
 block discarded – undo
236 236
             $formatter = $this->getContainer()->make($formatter);
237 237
         }
238 238
 
239
-        return [$formatter, 'format'];
239
+        return [ $formatter, 'format' ];
240 240
     }
241 241
 
242 242
     /**
Please login to merge, or discard this patch.
src/Lincable/Parsers/Options.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,6 +42,6 @@
 block discarded – undo
42 42
      */
43 43
     public function getParams(): array
44 44
     {
45
-       return $this->params; 
45
+        return $this->params; 
46 46
     }
47 47
 }
48 48
\ No newline at end of file
Please login to merge, or discard this patch.
src/Lincable/Eloquent/Lincable.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
      */
12 12
     public static function bootLincable()
13 13
     {
14
-        static::creating(function ($model) {
14
+        static::creating(function($model) {
15 15
             $model->addLincableFields();
16 16
         });
17 17
     }
Please login to merge, or discard this patch.
src/Lincable/UrlConf.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
      *
16 16
      * @var array
17 17
      */
18
-    protected $configuration = [];
18
+    protected $configuration = [ ];
19 19
 
20 20
     /**
21 21
      * The base namespace for the models.
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
      */
44 44
     public function has($key)
45 45
     {
46
-        return isset($this->configuration[$key]);
46
+        return isset($this->configuration[ $key ]);
47 47
     }
48 48
 
49 49
     /**
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
      */
56 56
     public function get($key, $default = null)
57 57
     {
58
-        return $this->has($key) ? $this->configuration[$key] : $default;
58
+        return $this->has($key) ? $this->configuration[ $key ] : $default;
59 59
     }
60 60
 
61 61
     /**
@@ -130,12 +130,12 @@  discard block
 block discarded – undo
130 130
     {
131 131
         $model = $key;
132 132
 
133
-        if (str_contains($key, '.') || ! str_contains($key, '\\')) {
133
+        if (str_contains($key, '.') || !str_contains($key, '\\')) {
134 134
             
135 135
             // Build the class namespace using the base model namespace
136 136
             // and the parts of the key splitted by dots.
137
-            $model =  $this->buildNamespace(array_merge(
138
-                [$this->modelsNamespace],
137
+            $model = $this->buildNamespace(array_merge(
138
+                [ $this->modelsNamespace ],
139 139
                 array_map('ucfirst', explode('.', $key))
140 140
             ));
141 141
         }
Please login to merge, or discard this patch.
src/Lincable/Concerns/BuildClassnames.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@
 block discarded – undo
39 39
     protected function buildNamespace(array $classes)
40 40
     {
41 41
         // Transform all class names.
42
-        array_walk($classes, function (&$class, $key) {
42
+        array_walk($classes, function(&$class, $key) {
43 43
 
44 44
             // Determine wheter class starts with backslash.
45 45
             $appends = starts_with($class, '\\');
Please login to merge, or discard this patch.
src/Lincable/UrlCompiler.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -35,14 +35,14 @@
 block discarded – undo
35 35
     {
36 36
         $parameters = $this->parseUrlFragments($url);
37 37
 
38
-        $dynamicParameters = array_filter($parameters, function ($parameter) {
38
+        $dynamicParameters = array_filter($parameters, function($parameter) {
39 39
 
40 40
             // Determine wheter the parameter is dynamic on parser
41 41
             // and should be kept.
42 42
             return $this->parser->isParameterDynamic($parameter);
43 43
         });
44 44
 
45
-        return array_flatten(array_map(function ($parameter) {
45
+        return array_flatten(array_map(function($parameter) {
46 46
 
47 47
             // Return the matches for the dynamic parameter.
48 48
             return $this->parser->getMatches($parameter);
Please login to merge, or discard this patch.