@@ -68,11 +68,11 @@ |
||
| 68 | 68 | string $listedAs = null, |
| 69 | 69 | Closure $userExe = null |
| 70 | 70 | ) : void { |
| 71 | - $this->rsWatching(function (array $rows) use ($table, $bindKey, $srcKey, $listedAs, $userExe) { |
|
| 71 | + $this->rsWatching(function(array $rows) use ($table, $bindKey, $srcKey, $listedAs, $userExe) { |
|
| 72 | 72 | |
| 73 | 73 | $srcIds = []; |
| 74 | 74 | |
| 75 | - array_walk($rows, function (array $row) use ($srcKey, &$srcIds) { |
|
| 75 | + array_walk($rows, function(array $row) use ($srcKey, &$srcIds) { |
|
| 76 | 76 | if (isset($row[$srcKey])) { |
| 77 | 77 | $srcIds[] = $row[$srcKey]; |
| 78 | 78 | } |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | */ |
| 28 | 28 | $rows = yield $this->exec($this->sql(Action::SELECT)); |
| 29 | 29 | if ($rows->count() > 0) { |
| 30 | - return (yield $this->rsTrigger((array)$rows))[0]; |
|
| 30 | + return (yield $this->rsTrigger((array) $rows))[0]; |
|
| 31 | 31 | } |
| 32 | 32 | |
| 33 | 33 | return []; |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | */ |
| 46 | 46 | $rows = yield $this->exec($this->sql(Action::SELECT)); |
| 47 | 47 | if ($rows->count() > 0) { |
| 48 | - return yield $this->rsTrigger((array)$rows); |
|
| 48 | + return yield $this->rsTrigger((array) $rows); |
|
| 49 | 49 | } |
| 50 | 50 | |
| 51 | 51 | return []; |
@@ -38,7 +38,7 @@ |
||
| 38 | 38 | } else { |
| 39 | 39 | // select(f1, f2) |
| 40 | 40 | $selects = []; |
| 41 | - array_walk($fields, function (string $val) use (&$selects) { |
|
| 41 | + array_walk($fields, function(string $val) use (&$selects) { |
|
| 42 | 42 | $selects[] = is_numeric(strpos($val, ' ')) ? $val : sprintf('`%s`', $val); |
| 43 | 43 | }); |
| 44 | 44 | $this->bSelect = implode(',', $selects); |
@@ -28,7 +28,7 @@ |
||
| 28 | 28 | protected function gData() : string |
| 29 | 29 | { |
| 30 | 30 | $dMaps = []; |
| 31 | - array_walk($this->bDataM, function ($v, $k) use (&$dMaps) { |
|
| 31 | + array_walk($this->bDataM, function($v, $k) use (&$dMaps) { |
|
| 32 | 32 | $dMaps[] = sprintf('`%s` = ?%d', $k, $this->stash($v)); |
| 33 | 33 | }); |
| 34 | 34 | |
@@ -165,7 +165,7 @@ discard block |
||
| 165 | 165 | */ |
| 166 | 166 | private function jWStack(Closure $builder, string $group) : Builder |
| 167 | 167 | { |
| 168 | - $this->bWGDepth ++; |
|
| 168 | + $this->bWGDepth++; |
|
| 169 | 169 | |
| 170 | 170 | $this->bWGrouped[$this->bWGDepth] = $group; |
| 171 | 171 | $this->bWGroupSTA[$this->bWGDepth] = []; |
@@ -177,7 +177,7 @@ discard block |
||
| 177 | 177 | unset($this->bWGrouped[$this->bWGDepth]); |
| 178 | 178 | unset($this->bWGroupSTA[$this->bWGDepth]); |
| 179 | 179 | |
| 180 | - $this->bWGDepth --; |
|
| 180 | + $this->bWGDepth--; |
|
| 181 | 181 | |
| 182 | 182 | $this->addWSta(sprintf('# %s (%s)', $group, $stage)); |
| 183 | 183 | |
@@ -208,7 +208,7 @@ discard block |
||
| 208 | 208 | |
| 209 | 209 | switch ($expr) { |
| 210 | 210 | case 'IN': |
| 211 | - is_array($val) && $val = sprintf('(%s)', implode(',', array_map(function ($id) { |
|
| 211 | + is_array($val) && $val = sprintf('(%s)', implode(',', array_map(function($id) { |
|
| 212 | 212 | return (int) $id; |
| 213 | 213 | }, $val))); |
| 214 | 214 | break; |
@@ -35,6 +35,6 @@ |
||
| 35 | 35 | protected function stash(string $v) : int |
| 36 | 36 | { |
| 37 | 37 | $this->vars[$this->pid] = $v; |
| 38 | - return $this->pid ++; |
|
| 38 | + return $this->pid++; |
|
| 39 | 39 | } |
| 40 | 40 | } |
@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | return [ |
| 25 | 25 | [ |
| 26 | 26 | Action::INSERT, |
| 27 | - function (Builder $builder) use ($createdF, $updatedF) { |
|
| 27 | + function(Builder $builder) use ($createdF, $updatedF) { |
|
| 28 | 28 | $builder->data([ |
| 29 | 29 | $createdF => time(), |
| 30 | 30 | $updatedF => time(), |
@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | ], |
| 34 | 34 | [ |
| 35 | 35 | Action::UPDATE, |
| 36 | - function (Builder $builder) use ($updatedF) { |
|
| 36 | + function(Builder $builder) use ($updatedF) { |
|
| 37 | 37 | $builder->data([ |
| 38 | 38 | $updatedF => time(), |
| 39 | 39 | ]); |
@@ -49,11 +49,11 @@ |
||
| 49 | 49 | $page = $size = null; |
| 50 | 50 | |
| 51 | 51 | if (method_exists($source, 'getPage')) { |
| 52 | - $page = (int)$source->getPage(); |
|
| 52 | + $page = (int) $source->getPage(); |
|
| 53 | 53 | } |
| 54 | 54 | |
| 55 | 55 | if (method_exists($source, 'getSize')) { |
| 56 | - $size = (int)$source->getSize(); |
|
| 56 | + $size = (int) $source->getSize(); |
|
| 57 | 57 | } |
| 58 | 58 | |
| 59 | 59 | return [$page ?: 1, $size ?: $this->pSize]; |