@@ -66,8 +66,7 @@ discard block |
||
66 | 66 | $this->class = $class; |
67 | 67 | try { |
68 | 68 | $class = new ReflectionClass($class); |
69 | - } |
|
70 | - catch (ReflectionException $exception) { |
|
69 | + } catch (ReflectionException $exception) { |
|
71 | 70 | throw new LogicException('Unexpected ReflectionException', 0, $exception); |
72 | 71 | } |
73 | 72 | $this->proto = $class->newInstanceWithoutConstructor(); |
@@ -84,8 +83,7 @@ discard block |
||
84 | 83 | if (preg_match('/@var\s+(?<type>[a-z]+)[\s$]/', $doc, $match)) { |
85 | 84 | $types[$name] = $match['type']; |
86 | 85 | } |
87 | - } |
|
88 | - elseif (preg_match('/@eav\s+(?<table>\S+)/', $doc, $match)) { |
|
86 | + } elseif (preg_match('/@eav\s+(?<table>\S+)/', $doc, $match)) { |
|
89 | 87 | $eav[$name] = $match['table']; |
90 | 88 | $this->properties[$name] = $property; |
91 | 89 | } |
@@ -213,8 +211,7 @@ discard block |
||
213 | 211 | public function save (EntityInterface $entity): int { |
214 | 212 | if (!$entity->getId()) { |
215 | 213 | $this->saveInsert($entity); |
216 | - } |
|
217 | - else { |
|
214 | + } else { |
|
218 | 215 | $this->saveUpdate($entity); |
219 | 216 | } |
220 | 217 | $this->saveEav($entity); |
@@ -86,11 +86,9 @@ discard block |
||
86 | 86 | $cmp[$k] = static::compare($k, $operator, $v, $subOperator, $listOperator); |
87 | 87 | } |
88 | 88 | return $cmp; |
89 | - } |
|
90 | - elseif (is_array($b)) { |
|
89 | + } elseif (is_array($b)) { |
|
91 | 90 | return "{$a} {$listOperator} (" . implode(',', $b) . ")"; |
92 | - } |
|
93 | - elseif ($b instanceof Select) { |
|
91 | + } elseif ($b instanceof Select) { |
|
94 | 92 | return "{$a} {$operator} {$subOperator} ({$b->toSql()})"; |
95 | 93 | } |
96 | 94 | return "{$a} {$operator} {$b}"; |
@@ -359,8 +357,7 @@ discard block |
||
359 | 357 | foreach ($columns as $alias => $name) { |
360 | 358 | if (is_string($alias) and $alias !== $name) { |
361 | 359 | $names[] = $name . ' AS ' . $alias; |
362 | - } |
|
363 | - else { |
|
360 | + } else { |
|
364 | 361 | $names[] = $name; |
365 | 362 | } |
366 | 363 | } |