@@ -154,7 +154,7 @@ discard block |
||
| 154 | 154 | return $this->get($type)->toDatabase($value); |
| 155 | 155 | } |
| 156 | 156 | |
| 157 | - throw new TypeException(gettype($value), 'Cannot convert to database the value : ' . print_r($value, true).PHP_EOL.'You should set a valid type as second parameter'); |
|
| 157 | + throw new TypeException(gettype($value), 'Cannot convert to database the value : '.print_r($value, true).PHP_EOL.'You should set a valid type as second parameter'); |
|
| 158 | 158 | } |
| 159 | 159 | |
| 160 | 160 | /** |
@@ -176,7 +176,7 @@ discard block |
||
| 176 | 176 | return null; |
| 177 | 177 | } |
| 178 | 178 | |
| 179 | - throw new TypeException(gettype($value), 'Cannot convert to php the value : ' . print_r($value, true).PHP_EOL.'You should set a valid type as second parameter'); |
|
| 179 | + throw new TypeException(gettype($value), 'Cannot convert to php the value : '.print_r($value, true).PHP_EOL.'You should set a valid type as second parameter'); |
|
| 180 | 180 | } |
| 181 | 181 | |
| 182 | 182 | /** |
@@ -88,7 +88,7 @@ |
||
| 88 | 88 | $this->remove($attribute); |
| 89 | 89 | } |
| 90 | 90 | |
| 91 | - $this->criteria[$filter] = $value; |
|
| 91 | + $this->criteria[$filter] = $value; |
|
| 92 | 92 | $this->inputs[$attribute][] = $filter; |
| 93 | 93 | } |
| 94 | 94 | |
@@ -26,7 +26,7 @@ |
||
| 26 | 26 | } |
| 27 | 27 | |
| 28 | 28 | foreach ($data as $attribute => $value) { |
| 29 | - $method = 'set' . ucfirst($attribute); |
|
| 29 | + $method = 'set'.ucfirst($attribute); |
|
| 30 | 30 | $exists = property_exists($this, $attribute); |
| 31 | 31 | |
| 32 | 32 | if ($exists && $this->$attribute instanceof ImportableInterface && !$value instanceof ImportableInterface) { |
@@ -39,7 +39,7 @@ |
||
| 39 | 39 | * |
| 40 | 40 | * @param string $type |
| 41 | 41 | */ |
| 42 | - public function declare(string $type): void |
|
| 42 | + public function declare(string$type): void |
|
| 43 | 43 | { |
| 44 | 44 | if (isset($this->declaredTypes[$type])) { |
| 45 | 45 | return; |
@@ -64,7 +64,7 @@ |
||
| 64 | 64 | |
| 65 | 65 | // Replace 'adapter' with 'driver' and add 'pdo_' |
| 66 | 66 | if (isset($parameters['adapter'])) { |
| 67 | - $parameters['driver'] = 'pdo_' . $parameters['adapter']; |
|
| 67 | + $parameters['driver'] = 'pdo_'.$parameters['adapter']; |
|
| 68 | 68 | unset($parameters['adapter']); |
| 69 | 69 | } |
| 70 | 70 | |
@@ -210,7 +210,7 @@ discard block |
||
| 210 | 210 | #[WriteOperation] |
| 211 | 211 | public function saveAll($relations = []): int |
| 212 | 212 | { |
| 213 | - return $this->relation->saveAll($this->owner, (array)$relations); |
|
| 213 | + return $this->relation->saveAll($this->owner, (array) $relations); |
|
| 214 | 214 | } |
| 215 | 215 | |
| 216 | 216 | /** |
@@ -226,7 +226,7 @@ discard block |
||
| 226 | 226 | #[WriteOperation] |
| 227 | 227 | public function deleteAll($relations = []): int |
| 228 | 228 | { |
| 229 | - return $this->relation->deleteAll($this->owner, (array)$relations); |
|
| 229 | + return $this->relation->deleteAll($this->owner, (array) $relations); |
|
| 230 | 230 | } |
| 231 | 231 | |
| 232 | 232 | /** |
@@ -245,7 +245,7 @@ |
||
| 245 | 245 | break; |
| 246 | 246 | |
| 247 | 247 | default: |
| 248 | - throw new RuntimeException('Unknown type from relation "' . $relationName . '" in ' . $repository->entityName()); |
|
| 248 | + throw new RuntimeException('Unknown type from relation "'.$relationName.'" in '.$repository->entityName()); |
|
| 249 | 249 | } |
| 250 | 250 | |
| 251 | 251 | return $relation->setOptions($relationMeta); |
@@ -40,10 +40,10 @@ |
||
| 40 | 40 | */ |
| 41 | 41 | public function acceptSchema(Schema $schema) |
| 42 | 42 | { |
| 43 | - $this->output = 'digraph "' . sha1((string) mt_rand()) . '" {' . "\n"; |
|
| 44 | - $this->output .= 'graph [fontname="helvetica", fontsize=12];' . "\n"; |
|
| 45 | - $this->output .= 'node [fontname="helvetica", fontsize=12];' . "\n"; |
|
| 46 | - $this->output .= 'edge [fontname="helvetica", fontsize=12];' . "\n"; |
|
| 43 | + $this->output = 'digraph "'.sha1((string) mt_rand()).'" {'."\n"; |
|
| 44 | + $this->output .= 'graph [fontname="helvetica", fontsize=12];'."\n"; |
|
| 45 | + $this->output .= 'node [fontname="helvetica", fontsize=12];'."\n"; |
|
| 46 | + $this->output .= 'edge [fontname="helvetica", fontsize=12];'."\n"; |
|
| 47 | 47 | // $this->output .= 'splines = true;' . "\n"; |
| 48 | 48 | // $this->output .= 'overlap = false;' . "\n"; |
| 49 | 49 | // $this->output .= 'outputorder=edgesfirst;'."\n"; |
@@ -113,7 +113,7 @@ discard block |
||
| 113 | 113 | $count = 0; |
| 114 | 114 | |
| 115 | 115 | foreach ($this->execute() as $result) { |
| 116 | - $count += (int)$result['aggregate']; |
|
| 116 | + $count += (int) $result['aggregate']; |
|
| 117 | 117 | } |
| 118 | 118 | |
| 119 | 119 | $this->compilerState->invalidate(['columns', 'orders']); |
@@ -128,7 +128,7 @@ discard block |
||
| 128 | 128 | #[ReadOperation] |
| 129 | 129 | public function count(?string $column = null): int |
| 130 | 130 | { |
| 131 | - return (int)array_sum($this->aggregate(__FUNCTION__, $column)); |
|
| 131 | + return (int) array_sum($this->aggregate(__FUNCTION__, $column)); |
|
| 132 | 132 | } |
| 133 | 133 | |
| 134 | 134 | /** |
@@ -139,7 +139,7 @@ discard block |
||
| 139 | 139 | { |
| 140 | 140 | $numbers = $this->aggregate(__FUNCTION__, $column); |
| 141 | 141 | |
| 142 | - return array_sum($numbers)/count($numbers); |
|
| 142 | + return array_sum($numbers) / count($numbers); |
|
| 143 | 143 | } |
| 144 | 144 | |
| 145 | 145 | /** |
@@ -166,7 +166,7 @@ discard block |
||
| 166 | 166 | #[ReadOperation] |
| 167 | 167 | public function sum(?string $column = null): float |
| 168 | 168 | { |
| 169 | - return (float)array_sum($this->aggregate(__FUNCTION__, $column)); |
|
| 169 | + return (float) array_sum($this->aggregate(__FUNCTION__, $column)); |
|
| 170 | 170 | } |
| 171 | 171 | |
| 172 | 172 | /** |