@@ -66,16 +66,16 @@ |
||
| 66 | 66 | $this->assertEntity($expected, $entity, 0, $message); |
| 67 | 67 | } |
| 68 | 68 | |
| 69 | - /** |
|
| 70 | - * Assert that two array of entities are equal |
|
| 71 | - * |
|
| 72 | - * @param array $expectedEntities |
|
| 73 | - * @param array $actualEntities |
|
| 74 | - * @param int $dateTimeDelta |
|
| 75 | - * @param string $message |
|
| 76 | - * |
|
| 77 | - * @throws \Exception |
|
| 78 | - */ |
|
| 69 | + /** |
|
| 70 | + * Assert that two array of entities are equal |
|
| 71 | + * |
|
| 72 | + * @param array $expectedEntities |
|
| 73 | + * @param array $actualEntities |
|
| 74 | + * @param int $dateTimeDelta |
|
| 75 | + * @param string $message |
|
| 76 | + * |
|
| 77 | + * @throws \Exception |
|
| 78 | + */ |
|
| 79 | 79 | public function assertEntities($expectedEntities, $actualEntities, $dateTimeDelta = 5, $message = '') |
| 80 | 80 | { |
| 81 | 81 | if (is_string($dateTimeDelta)) { |
@@ -189,16 +189,16 @@ |
||
| 189 | 189 | $expectedValue = $expected[$attribute] ?? null; |
| 190 | 190 | |
| 191 | 191 | if (!is_object($expectedValue)) { |
| 192 | - $this->assertSame($expectedValue, $value, $message . ': Expected attribute "'.$path.'" is not the same'); |
|
| 192 | + $this->assertSame($expectedValue, $value, $message.': Expected attribute "'.$path.'" is not the same'); |
|
| 193 | 193 | continue; |
| 194 | 194 | } |
| 195 | 195 | |
| 196 | 196 | if ($expectedValue instanceof Constraint) { |
| 197 | - $this->assertThat($value, $expectedValue, $message . ': Expected attribute "'.$path.'" is not the same'); |
|
| 197 | + $this->assertThat($value, $expectedValue, $message.': Expected attribute "'.$path.'" is not the same'); |
|
| 198 | 198 | } elseif ($expectedValue instanceof \DateTimeInterface) { |
| 199 | - $this->assertEqualsWithDelta($expectedValue, $value, $dateTimeDelta, $message . ': Expected attribute "'.$path.'" is not the same'); |
|
| 199 | + $this->assertEqualsWithDelta($expectedValue, $value, $dateTimeDelta, $message.': Expected attribute "'.$path.'" is not the same'); |
|
| 200 | 200 | } else { |
| 201 | - $this->assertEquals($expectedValue, $value, $message . ': Expected attribute "'.$path.'" is not the same'); |
|
| 201 | + $this->assertEquals($expectedValue, $value, $message.': Expected attribute "'.$path.'" is not the same'); |
|
| 202 | 202 | } |
| 203 | 203 | } |
| 204 | 204 | } |
@@ -31,7 +31,7 @@ discard block |
||
| 31 | 31 | * @var array |
| 32 | 32 | */ |
| 33 | 33 | protected $testPacks = [ |
| 34 | - 'persistent' => [], // Entités créées non modifiables |
|
| 34 | + 'persistent' => [], // Entités créées non modifiables |
|
| 35 | 35 | 'non-persistent' => [] // Entités créées et détruites aprés un test |
| 36 | 36 | ]; |
| 37 | 37 | |
@@ -160,7 +160,7 @@ discard block |
||
| 160 | 160 | |
| 161 | 161 | // On ajoute la classe de l'entité uniquement si elle n'est pas déjà dans le tableau et si le test pack n'a pas démarré de savepoint |
| 162 | 162 | foreach ($entityClasses as $entityClassName) { |
| 163 | - if (! in_array($entityClassName, $this->entityClasses)) { |
|
| 163 | + if (!in_array($entityClassName, $this->entityClasses)) { |
|
| 164 | 164 | if ($this->initialized) { |
| 165 | 165 | $this->create([$entityClassName]); |
| 166 | 166 | } else { |
@@ -219,7 +219,7 @@ discard block |
||
| 219 | 219 | */ |
| 220 | 220 | public function onInit(callable $callback) |
| 221 | 221 | { |
| 222 | - if (! $this->initialized) { |
|
| 222 | + if (!$this->initialized) { |
|
| 223 | 223 | $this->once('testpack.initialized', $callback); |
| 224 | 224 | } |
| 225 | 225 | |
@@ -21,7 +21,7 @@ |
||
| 21 | 21 | */ |
| 22 | 22 | public function __construct($entityClass, $message = '', $previous = null) |
| 23 | 23 | { |
| 24 | - parent::__construct($entityClass . ' : ' . $message, 0, $previous); |
|
| 24 | + parent::__construct($entityClass.' : '.$message, 0, $previous); |
|
| 25 | 25 | |
| 26 | 26 | $this->entityClass = $entityClass; |
| 27 | 27 | } |
@@ -93,7 +93,7 @@ |
||
| 93 | 93 | $this->_attributes['dbConfig'] = $this->_attributes['dbConfig']($this); |
| 94 | 94 | } |
| 95 | 95 | |
| 96 | - if (! $this->_attributes['dbConfig'] instanceof ConnectionConfig) { |
|
| 96 | + if (!$this->_attributes['dbConfig'] instanceof ConnectionConfig) { |
|
| 97 | 97 | $this->_attributes['dbConfig'] = new ConnectionConfig((array) $this->_attributes['dbConfig']); |
| 98 | 98 | } |
| 99 | 99 | |
@@ -94,7 +94,7 @@ |
||
| 94 | 94 | ); |
| 95 | 95 | } |
| 96 | 96 | |
| 97 | - return ' : [' . implode(', ', $buffer) . ']'; |
|
| 97 | + return ' : ['.implode(', ', $buffer).']'; |
|
| 98 | 98 | } |
| 99 | 99 | |
| 100 | 100 | /** |
@@ -43,7 +43,7 @@ |
||
| 43 | 43 | |
| 44 | 44 | $query->joinEntity( |
| 45 | 45 | $this->distant->entityName(), |
| 46 | - function (JoinClause $clause) use($alias, $query) { $this->buildJoinClause($clause, $query, $alias); }, |
|
| 46 | + function(JoinClause $clause) use($alias, $query) { $this->buildJoinClause($clause, $query, $alias); }, |
|
| 47 | 47 | null, |
| 48 | 48 | $alias |
| 49 | 49 | ); |
@@ -230,7 +230,7 @@ |
||
| 230 | 230 | break; |
| 231 | 231 | |
| 232 | 232 | default: |
| 233 | - throw new \RuntimeException('Unknown type from relation "' . $relationName . '" in ' . $repository->entityName()); |
|
| 233 | + throw new \RuntimeException('Unknown type from relation "'.$relationName.'" in '.$repository->entityName()); |
|
| 234 | 234 | } |
| 235 | 235 | |
| 236 | 236 | return $relation->setOptions($relationMeta); |
@@ -91,7 +91,7 @@ |
||
| 91 | 91 | */ |
| 92 | 92 | public function join($query, $alias = null) |
| 93 | 93 | { |
| 94 | - $parts = explode('#', (string)$alias); |
|
| 94 | + $parts = explode('#', (string) $alias); |
|
| 95 | 95 | |
| 96 | 96 | if (!isset($parts[1])) { |
| 97 | 97 | throw new \LogicException('Joins are not supported on polymorph without discriminator'); |
@@ -18,7 +18,7 @@ |
||
| 18 | 18 | */ |
| 19 | 19 | public function join($query, $alias = null) |
| 20 | 20 | { |
| 21 | - $parts = explode('#', (string)$alias); |
|
| 21 | + $parts = explode('#', (string) $alias); |
|
| 22 | 22 | |
| 23 | 23 | if (!isset($parts[1])) { |
| 24 | 24 | throw new \LogicException('Joins are not supported on polymorph without discriminator'); |