@@ -140,7 +140,7 @@ |
||
| 140 | 140 | $em = $em ?: EntityManager::getInstance($class); |
| 141 | 141 | |
| 142 | 142 | /** @var m\Mock|EntityFetcher $fetcher */ |
| 143 | - $fetcher = m::mock(EntityFetcher::class, [ $em, $class ])->makePartial(); |
|
| 143 | + $fetcher = m::mock(EntityFetcher::class, [$em, $class])->makePartial(); |
|
| 144 | 144 | $em->shouldReceive('fetch')->with($class)->once()->andReturn($fetcher); |
| 145 | 145 | |
| 146 | 146 | /** @scrutinizer ignore-call */ |
@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | if ($value instanceof \DateTime) { |
| 97 | 97 | $type = 'DateTime'; |
| 98 | 98 | } |
| 99 | - $method = [ $this, 'escape' . ucfirst($type) ]; |
|
| 99 | + $method = [$this, 'escape' . ucfirst($type)]; |
|
| 100 | 100 | |
| 101 | 101 | if (is_callable($method)) { |
| 102 | 102 | return call_user_func($method, $value); |
@@ -301,7 +301,7 @@ discard block |
||
| 301 | 301 | $var = $entity::getPrimaryKeyVars()[0]; |
| 302 | 302 | $column = $entity::getColumnName($var); |
| 303 | 303 | |
| 304 | - $entity->setOriginalData(array_merge($entity->getData(), [ $column => $value ])); |
|
| 304 | + $entity->setOriginalData(array_merge($entity->getData(), [$column => $value])); |
|
| 305 | 305 | $entity->__set($var, $value); |
| 306 | 306 | } |
| 307 | 307 | |
@@ -318,8 +318,7 @@ discard block |
||
| 318 | 318 | $primary = array_combine($vars, $cols); |
| 319 | 319 | |
| 320 | 320 | $query = "SELECT * FROM " . $this->escapeIdentifier($entity::getTableName()) . " WHERE "; |
| 321 | - $query .= count($cols) > 1 ? $this->buildCompositeWhereInStatement($cols, $entities) : |
|
| 322 | - $this->escapeIdentifier($cols[0]) . ' IN (' . implode(',', array_map(function (Entity $entity) { |
|
| 321 | + $query .= count($cols) > 1 ? $this->buildCompositeWhereInStatement($cols, $entities) : $this->escapeIdentifier($cols[0]) . ' IN (' . implode(',', array_map(function (Entity $entity) { |
|
| 323 | 322 | return $this->escapeValue(array_values($entity->getPrimaryKey())[0]); |
| 324 | 323 | }, $entities)) . ')'; |
| 325 | 324 | |