@@ -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'); |
@@ -142,7 +142,7 @@ discard block |
||
| 142 | 142 | */ |
| 143 | 143 | public function saveAll($relations = []) |
| 144 | 144 | { |
| 145 | - return $this->relation->saveAll($this->owner, (array)$relations); |
|
| 145 | + return $this->relation->saveAll($this->owner, (array) $relations); |
|
| 146 | 146 | } |
| 147 | 147 | |
| 148 | 148 | /** |
@@ -154,7 +154,7 @@ discard block |
||
| 154 | 154 | */ |
| 155 | 155 | public function deleteAll($relations = []) |
| 156 | 156 | { |
| 157 | - return $this->relation->deleteAll($this->owner, (array)$relations); |
|
| 157 | + return $this->relation->deleteAll($this->owner, (array) $relations); |
|
| 158 | 158 | } |
| 159 | 159 | |
| 160 | 160 | /** |
@@ -36,7 +36,7 @@ |
||
| 36 | 36 | */ |
| 37 | 37 | public static function instance() |
| 38 | 38 | { |
| 39 | - if (self::$instance === null) { |
|
| 39 | + if (self::$instance === null) { |
|
| 40 | 40 | return self::$instance = new self; |
| 41 | 41 | } |
| 42 | 42 | |