@@ -55,7 +55,7 @@ |
||
55 | 55 | */ |
56 | 56 | public function getQualifiedName() |
57 | 57 | { |
58 | - return $this->getTable().'.'.$this->getName(); |
|
58 | + return $this->getTable() . '.' . $this->getName(); |
|
59 | 59 | } |
60 | 60 | |
61 | 61 | /** |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | */ |
51 | 51 | public function getQualifiedNames() |
52 | 52 | { |
53 | - return array_map(function ($column) { |
|
53 | + return array_map(function($column) { |
|
54 | 54 | return $column->getQualifiedName(); |
55 | 55 | }, $this->columns); |
56 | 56 | } |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | */ |
63 | 63 | public function getTables() |
64 | 64 | { |
65 | - return array_unique(array_map(function ($column) { |
|
65 | + return array_unique(array_map(function($column) { |
|
66 | 66 | return $column->getTable(); |
67 | 67 | }, $this->columns)); |
68 | 68 | } |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | */ |
91 | 91 | public function getMappings() |
92 | 92 | { |
93 | - return array_map(function ($column) { |
|
93 | + return array_map(function($column) { |
|
94 | 94 | return $column->getMapping(); |
95 | 95 | }, $this->columns); |
96 | 96 | } |
@@ -117,7 +117,7 @@ |
||
117 | 117 | { |
118 | 118 | $token = $this->wildcard; |
119 | 119 | |
120 | - return array_map(function ($word) use ($token) { |
|
120 | + return array_map(function($word) use ($token) { |
|
121 | 121 | return preg_replace('/\*+/', '*', "{$token}{$word}{$token}"); |
122 | 122 | }, $words); |
123 | 123 | } |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | */ |
40 | 40 | protected function registerMutator() |
41 | 41 | { |
42 | - $this->app->singleton('eloquence.mutator', function () { |
|
42 | + $this->app->singleton('eloquence.mutator', function() { |
|
43 | 43 | return new Mutator; |
44 | 44 | }); |
45 | 45 | |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | */ |
54 | 54 | protected function registerJoiner() |
55 | 55 | { |
56 | - $this->app->singleton('eloquence.joiner', function () { |
|
56 | + $this->app->singleton('eloquence.joiner', function() { |
|
57 | 57 | return new JoinerFactory; |
58 | 58 | }); |
59 | 59 | |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | */ |
68 | 68 | protected function registerParser() |
69 | 69 | { |
70 | - $this->app->singleton('eloquence.parser', function () { |
|
70 | + $this->app->singleton('eloquence.parser', function() { |
|
71 | 71 | return new ParserFactory; |
72 | 72 | }); |
73 | 73 |
@@ -66,12 +66,12 @@ |
||
66 | 66 | */ |
67 | 67 | public function getValue() |
68 | 68 | { |
69 | - $sql = '('.$this->query->toSql().')'; |
|
69 | + $sql = '(' . $this->query->toSql() . ')'; |
|
70 | 70 | |
71 | 71 | if ($this->alias) { |
72 | 72 | $alias = $this->query->getGrammar()->wrapTable($this->alias); |
73 | 73 | |
74 | - $sql .= ' as '.$alias; |
|
74 | + $sql .= ' as ' . $alias; |
|
75 | 75 | } |
76 | 76 | |
77 | 77 | return $sql; |
@@ -27,12 +27,12 @@ discard block |
||
27 | 27 | // We want to update each unique rule so it ignores this model's row |
28 | 28 | // during unique check in order to avoid faulty non-unique errors |
29 | 29 | // in accordance to the linked Laravel Validator documentation. |
30 | - array_walk($rules, function (&$fieldRules, $field) use ($id, $primaryKey) { |
|
30 | + array_walk($rules, function(&$fieldRules, $field) use ($id, $primaryKey) { |
|
31 | 31 | if (is_string($fieldRules)) { |
32 | 32 | $fieldRules = explode('|', $fieldRules); |
33 | 33 | } |
34 | 34 | |
35 | - array_walk($fieldRules, function (&$rule) use ($field, $id, $primaryKey) { |
|
35 | + array_walk($fieldRules, function(&$rule) use ($field, $id, $primaryKey) { |
|
36 | 36 | if (strpos($rule, 'unique') === false) { |
37 | 37 | return; |
38 | 38 | } |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | $args[2] = $id; |
46 | 46 | $args[3] = $primaryKey; |
47 | 47 | |
48 | - $rule = 'unique:'.implode(',', $args); |
|
48 | + $rule = 'unique:' . implode(',', $args); |
|
49 | 49 | }); |
50 | 50 | }); |
51 | 51 |
@@ -129,7 +129,7 @@ |
||
129 | 129 | */ |
130 | 130 | public function toArray() |
131 | 131 | { |
132 | - return array_filter(array_map(function ($attribute) { |
|
132 | + return array_filter(array_map(function($attribute) { |
|
133 | 133 | return $attribute->getValue(); |
134 | 134 | }, $this->items)); |
135 | 135 | } |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | */ |
20 | 20 | public function queryHook() |
21 | 21 | { |
22 | - return function ($next, $query, $bag) { |
|
22 | + return function($next, $query, $bag) { |
|
23 | 23 | $method = $bag->get('method'); |
24 | 24 | $args = $bag->get('args'); |
25 | 25 | $column = $args->get('column'); |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | */ |
46 | 46 | public function save() |
47 | 47 | { |
48 | - return function ($next, $value, $args) { |
|
48 | + return function($next, $value, $args) { |
|
49 | 49 | $this->saveMapped(); |
50 | 50 | |
51 | 51 | return $next($value, $args); |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | */ |
62 | 62 | public function __issetHook() |
63 | 63 | { |
64 | - return function ($next, $isset, $args) { |
|
64 | + return function($next, $isset, $args) { |
|
65 | 65 | $key = $args->get('key'); |
66 | 66 | |
67 | 67 | if (!$isset && $this->hasMapping($key)) { |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | */ |
82 | 82 | public function __unsetHook() |
83 | 83 | { |
84 | - return function ($next, $value, $args) { |
|
84 | + return function($next, $value, $args) { |
|
85 | 85 | $key = $args->get('key'); |
86 | 86 | |
87 | 87 | if ($this->hasMapping($key)) { |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | */ |
102 | 102 | public function getAttribute() |
103 | 103 | { |
104 | - return function ($next, $value, $args) { |
|
104 | + return function($next, $value, $args) { |
|
105 | 105 | $key = $args->get('key'); |
106 | 106 | |
107 | 107 | if ($this->hasMapping($key)) { |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | */ |
122 | 122 | public function setAttribute() |
123 | 123 | { |
124 | - return function ($next, $value, $args) { |
|
124 | + return function($next, $value, $args) { |
|
125 | 125 | $key = $args->get('key'); |
126 | 126 | |
127 | 127 | if ($this->hasMapping($key)) { |
@@ -134,8 +134,8 @@ discard block |
||
134 | 134 | |
135 | 135 | public function __call($method, $params) |
136 | 136 | { |
137 | - if (strpos($method, '__') === 0 && method_exists($this, $method.'Hook')) { |
|
138 | - return call_user_func_array([$this, $method.'Hook'], $params); |
|
137 | + if (strpos($method, '__') === 0 && method_exists($this, $method . 'Hook')) { |
|
138 | + return call_user_func_array([$this, $method . 'Hook'], $params); |
|
139 | 139 | } |
140 | 140 | |
141 | 141 | throw new BadMethodCallException("Method [{$method}] doesn't exist on this object."); |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | */ |
148 | 148 | public function toArray() |
149 | 149 | { |
150 | - return function ($next, $attributes) { |
|
150 | + return function($next, $attributes) { |
|
151 | 151 | $mappedAttributes = []; |
152 | 152 | foreach ($attributes as $column => $value) { |
153 | 153 | if ($key = $this->isMapping($column)) { |