@@ -64,7 +64,7 @@ |
||
| 64 | 64 | public function describe($schemaTable) |
| 65 | 65 | { |
| 66 | 66 | $table = explode($this->identifierDivider, $schemaTable); |
| 67 | - list($schema, $table) = count($table) === 2 ? $table : [ 'public', $table[0] ]; |
|
| 67 | + list($schema, $table) = count($table) === 2 ? $table : ['public', $table[0]]; |
|
| 68 | 68 | |
| 69 | 69 | $query = new QueryBuilder('INFORMATION_SCHEMA.COLUMNS', '', $this->entityManager); |
| 70 | 70 | $query->where('table_name', $table)->andWhere('table_schema', $schema); |
@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | public function ormInitMock($options = [], $driver = 'mysql') |
| 33 | 33 | { |
| 34 | 34 | /** @var EntityManager|m\Mock $em */ |
| 35 | - $em = m::mock(EntityManager::class, [ $options ])->makePartial(); |
|
| 35 | + $em = m::mock(EntityManager::class, [$options])->makePartial(); |
|
| 36 | 36 | /** @var \PDO|m\Mock $pdo */ |
| 37 | 37 | $pdo = m::mock(\PDO::class); |
| 38 | 38 | |
@@ -138,7 +138,7 @@ discard block |
||
| 138 | 138 | $em = $em ?: EntityManager::getInstance($class); |
| 139 | 139 | |
| 140 | 140 | /** @var m\Mock|EntityFetcher $fetcher */ |
| 141 | - $fetcher = m::mock(EntityFetcher::class, [ $em, $class ])->makePartial(); |
|
| 141 | + $fetcher = m::mock(EntityFetcher::class, [$em, $class])->makePartial(); |
|
| 142 | 142 | $em->shouldReceive('fetch')->with($class)->once()->andReturn($fetcher); |
| 143 | 143 | |
| 144 | 144 | /** @scrutinizer ignore-call */ |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | /** {@inheritdoc} */ |
| 39 | 39 | public function fetch(Entity $self, EntityManager $entityManager) |
| 40 | 40 | { |
| 41 | - $key = array_map([$self, '__get' ], array_keys($this->reference)); |
|
| 41 | + $key = array_map([$self, '__get'], array_keys($this->reference)); |
|
| 42 | 42 | |
| 43 | 43 | if (in_array(null, $key)) { |
| 44 | 44 | return null; |
@@ -82,6 +82,6 @@ discard block |
||
| 82 | 82 | $expression[] = $alias . '.' . $myVar . ' = ' . $this->name . '.' . $hisVar; |
| 83 | 83 | } |
| 84 | 84 | |
| 85 | - call_user_func([ $fetcher, $join ], $this->class, implode(' AND ', $expression), $this->name, [], true); |
|
| 85 | + call_user_func([$fetcher, $join], $this->class, implode(' AND ', $expression), $this->name, [], true); |
|
| 86 | 86 | } |
| 87 | 87 | } |
@@ -61,8 +61,8 @@ discard block |
||
| 61 | 61 | |
| 62 | 62 | $this->tableName = $entityManager->escapeIdentifier($class::getTableName()); |
| 63 | 63 | $this->alias = 't0'; |
| 64 | - $this->columns = [ 't0.*' ]; |
|
| 65 | - $this->modifier = [ 'DISTINCT' ]; |
|
| 64 | + $this->columns = ['t0.*']; |
|
| 65 | + $this->modifier = ['DISTINCT']; |
|
| 66 | 66 | |
| 67 | 67 | $this->classMapping['byClass'][$class] = 't0'; |
| 68 | 68 | $this->classMapping['byAlias']['t0'] = $class; |
@@ -183,7 +183,7 @@ discard block |
||
| 183 | 183 | $alias = $this->alias; |
| 184 | 184 | } |
| 185 | 185 | |
| 186 | - call_user_func([ $class, 'getRelation' ], $relation)->addJoin($this, $join, $alias); |
|
| 186 | + call_user_func([$class, 'getRelation'], $relation)->addJoin($this, $join, $alias); |
|
| 187 | 187 | return $this; |
| 188 | 188 | } |
| 189 | 189 | |
@@ -230,7 +230,7 @@ discard block |
||
| 230 | 230 | return null; |
| 231 | 231 | } |
| 232 | 232 | |
| 233 | - $class = $this->class; |
|
| 233 | + $class = $this->class; |
|
| 234 | 234 | $newEntity = new $class($data, $this->entityManager, true); |
| 235 | 235 | $entity = $this->entityManager->map($newEntity); |
| 236 | 236 | |
@@ -275,11 +275,11 @@ discard block |
||
| 275 | 275 | public function count() |
| 276 | 276 | { |
| 277 | 277 | // set the columns and reset after get query |
| 278 | - $this->columns = [ 'COUNT(DISTINCT t0.*)' ]; |
|
| 278 | + $this->columns = ['COUNT(DISTINCT t0.*)']; |
|
| 279 | 279 | $this->modifier = []; |
| 280 | 280 | $query = $this->getQuery(); |
| 281 | - $this->columns = [ 't0.*' ]; |
|
| 282 | - $this->modifier = [ 'DISTINCT' ]; |
|
| 281 | + $this->columns = ['t0.*']; |
|
| 282 | + $this->modifier = ['DISTINCT']; |
|
| 283 | 283 | |
| 284 | 284 | return (int) $this->entityManager->getConnection()->query($query)->fetchColumn(); |
| 285 | 285 | } |