@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | */ |
89 | 89 | private function extending() |
90 | 90 | { |
91 | - $this->factory->extend('has_parent', function ($attribute, $value) { |
|
91 | + $this->factory->extend('has_parent', function($attribute, $value) { |
|
92 | 92 | if ($attribute == 'object' && $value->getDepth() > 1 && $value->getParent() === null) { |
93 | 93 | return false; |
94 | 94 | } |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | protected function getRules() |
129 | 129 | { |
130 | 130 | return [ |
131 | - 'name' => 'required|min:' . $this->minNameLength . '|max:' . $this->maxNameLength, |
|
131 | + 'name' => 'required|min:'.$this->minNameLength.'|max:'.$this->maxNameLength, |
|
132 | 132 | 'object' => 'has_parent' |
133 | 133 | ]; |
134 | 134 | } |
@@ -281,7 +281,7 @@ discard block |
||
281 | 281 | */ |
282 | 282 | public function makeKey($siteKey, $name) |
283 | 283 | { |
284 | - return $siteKey . ':' . $name; |
|
284 | + return $siteKey.':'.$name; |
|
285 | 285 | } |
286 | 286 | |
287 | 287 | /** |
@@ -292,6 +292,6 @@ discard block |
||
292 | 292 | */ |
293 | 293 | protected function getCacheKey($head) |
294 | 294 | { |
295 | - return $this->prefix . '@' . $head; |
|
295 | + return $this->prefix.'@'.$head; |
|
296 | 296 | } |
297 | 297 | } |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | $row = $this->conn->table($this->table)->where('siteKey', $siteKey)->where('name', $name)->first(); |
66 | 66 | |
67 | 67 | if ($row !== null) { |
68 | - return $this->createModel((array)$row); |
|
68 | + return $this->createModel((array) $row); |
|
69 | 69 | } |
70 | 70 | |
71 | 71 | return null; |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | |
89 | 89 | $items = []; |
90 | 90 | foreach ($rows as $row) { |
91 | - $items[] = $this->createModel((array)$row); |
|
91 | + $items[] = $this->createModel((array) $row); |
|
92 | 92 | } |
93 | 93 | |
94 | 94 | return $items; |
@@ -106,12 +106,12 @@ discard block |
||
106 | 106 | { |
107 | 107 | $rows = $this->conn->table($this->table) |
108 | 108 | ->where('siteKey', $siteKey) |
109 | - ->where('name', 'like', $name . '.%') |
|
109 | + ->where('name', 'like', $name.'.%') |
|
110 | 110 | ->where('name', '<>', $name)->get(); |
111 | 111 | |
112 | 112 | $items = []; |
113 | 113 | foreach ($rows as $row) { |
114 | - $items[] = $this->createModel((array)$row); |
|
114 | + $items[] = $this->createModel((array) $row); |
|
115 | 115 | } |
116 | 116 | |
117 | 117 | return $items; |
@@ -146,11 +146,11 @@ discard block |
||
146 | 146 | { |
147 | 147 | $query = $this->conn->table($this->table) |
148 | 148 | ->where('siteKey', $config->siteKey) |
149 | - ->where('name', 'like', $config->name . '%') |
|
149 | + ->where('name', 'like', $config->name.'%') |
|
150 | 150 | ->where('name', '<>', $config->name); |
151 | 151 | |
152 | 152 | foreach ($excepts as $except) { |
153 | - $query->where('name', 'not like', $except . '%'); |
|
153 | + $query->where('name', 'not like', $except.'%'); |
|
154 | 154 | } |
155 | 155 | |
156 | 156 | $query->update( |
@@ -170,8 +170,8 @@ discard block |
||
170 | 170 | { |
171 | 171 | $this->conn->table($this->table) |
172 | 172 | ->where('siteKey', $siteKey) |
173 | - ->where(function ($query) use ($name) { |
|
174 | - $query->where('name', 'like', $name . '.%') |
|
173 | + ->where(function($query) use ($name) { |
|
174 | + $query->where('name', 'like', $name.'.%') |
|
175 | 175 | ->orWhere('name', $name); |
176 | 176 | })->delete(); |
177 | 177 | } |
@@ -223,9 +223,9 @@ discard block |
||
223 | 223 | { |
224 | 224 | $query = $this->conn->table($this->table) |
225 | 225 | ->where('siteKey', $config->siteKey) |
226 | - ->where(function ($query) use ($config) { |
|
226 | + ->where(function($query) use ($config) { |
|
227 | 227 | $query->where('name', $config->name) |
228 | - ->orWhere('name', 'like', $config->name . '.%'); |
|
228 | + ->orWhere('name', 'like', $config->name.'.%'); |
|
229 | 229 | }); |
230 | 230 | |
231 | 231 | $arr = explode('.', $config->name); |
@@ -252,9 +252,9 @@ discard block |
||
252 | 252 | if ($to !== null) { |
253 | 253 | $this->conn->table($this->table) |
254 | 254 | ->where('siteKey', $config->siteKey) |
255 | - ->where(function ($query) use ($config) { |
|
255 | + ->where(function($query) use ($config) { |
|
256 | 256 | $query->where('name', $config->name) |
257 | - ->orWhere('name', 'like', $config->name . '.%'); |
|
257 | + ->orWhere('name', 'like', $config->name.'.%'); |
|
258 | 258 | }) |
259 | 259 | ->update(['name' => $this->conn->raw("concat('{$to}', '.', `name`)")]); |
260 | 260 | } |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | $sorted = static::$sorter->sort(array_diff(array_keys($list), static::$unloaded)); |
68 | 68 | |
69 | 69 | array_map( |
70 | - function ($file) use ($list, &$output, $minified) { |
|
70 | + function($file) use ($list, &$output, $minified) { |
|
71 | 71 | $fileObj = $list[$file]; |
72 | 72 | $output .= $fileObj->render($file, $minified); |
73 | 73 | }, |
@@ -160,7 +160,7 @@ discard block |
||
160 | 160 | } |
161 | 161 | |
162 | 162 | $prev = null; |
163 | - foreach ((array)$this->files as $file) { |
|
163 | + foreach ((array) $this->files as $file) { |
|
164 | 164 | |
165 | 165 | static::$fileList[$file] = $this; |
166 | 166 |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | */ |
61 | 61 | public static function output() |
62 | 62 | { |
63 | - $output = '<script type="text/javascript">' . PHP_EOL; |
|
63 | + $output = '<script type="text/javascript">'.PHP_EOL; |
|
64 | 64 | |
65 | 65 | $list = static::$ruleList; |
66 | 66 | |
@@ -92,11 +92,11 @@ discard block |
||
92 | 92 | */ |
93 | 93 | public function __construct($ruleName, $rules) |
94 | 94 | { |
95 | - if (isset(self::$ruleList[$ruleName]) === true) { |
|
95 | + if (isset(self::$ruleList[$ruleName]) === true) { |
|
96 | 96 | $rules = array_merge($rules, self::$ruleList[$ruleName]->getRules()); |
97 | 97 | } |
98 | - $this->ruleName = $ruleName; |
|
99 | - $this->rules = $rules; |
|
98 | + $this->ruleName = $ruleName; |
|
99 | + $this->rules = $rules; |
|
100 | 100 | self::$ruleList[$ruleName] = $this; |
101 | 101 | |
102 | 102 | // Rule 을 사용할 때 validator 를 사용하게 되므로 valiator 다국어 추가 |
@@ -130,7 +130,7 @@ discard block |
||
130 | 130 | 'System.import(\'xecore:/common/js/modules/validator\').then(function(validator) { validator.setRules("%s", %s); });', |
131 | 131 | $this->ruleName, |
132 | 132 | json_enc($this->rules) |
133 | - ) . PHP_EOL; |
|
133 | + ).PHP_EOL; |
|
134 | 134 | |
135 | 135 | return $rule; |
136 | 136 | } |
@@ -83,7 +83,7 @@ |
||
83 | 83 | $sorted = static::$sorter->sort(array_diff(array_keys($list), static::$unloaded)); |
84 | 84 | |
85 | 85 | array_map( |
86 | - function ($alias) use ($list, &$output) { |
|
86 | + function($alias) use ($list, &$output) { |
|
87 | 87 | $htmlObj = $list[$alias]; |
88 | 88 | $output .= $htmlObj->render(); |
89 | 89 | }, |
@@ -72,7 +72,7 @@ |
||
72 | 72 | $sorted = static::$sorter->sort(array_diff(array_keys($list), static::$unloaded)); |
73 | 73 | |
74 | 74 | array_map( |
75 | - function ($file) use ($list, &$output, $minified) { |
|
75 | + function($file) use ($list, &$output, $minified) { |
|
76 | 76 | $fileObj = $list[$file]; |
77 | 77 | $output .= $fileObj->render($file, $minified); |
78 | 78 | }, |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | { |
79 | 79 | $user = $this->query()->whereHas( |
80 | 80 | 'emails', |
81 | - function ($q) use ($address) { |
|
81 | + function($q) use ($address) { |
|
82 | 82 | $q->where('address', $address); |
83 | 83 | } |
84 | 84 | )->first(); |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | { |
99 | 99 | $users = $this->query()->whereHas( |
100 | 100 | 'emails', |
101 | - function ($q) use ($emailPrefix) { |
|
101 | + function($q) use ($emailPrefix) { |
|
102 | 102 | $q->where('address', 'like', $emailPrefix.'@%'); |
103 | 103 | } |
104 | 104 | )->get(); |
@@ -130,7 +130,7 @@ |
||
130 | 130 | { |
131 | 131 | $this->frontend->js('https://www.google.com/recaptcha/api.js')->appendTo('head')->load(); |
132 | 132 | |
133 | - return '<div class="g-recaptcha" data-sitekey="' . $this->siteKey . '"></div>'; |
|
133 | + return '<div class="g-recaptcha" data-sitekey="'.$this->siteKey.'"></div>'; |
|
134 | 134 | } |
135 | 135 | |
136 | 136 | /** |