@@ -104,7 +104,7 @@ |
||
104 | 104 | */ |
105 | 105 | private function dsnValueToString(mixed $value): string |
106 | 106 | { |
107 | - return match (true) { |
|
107 | + return match(true) { |
|
108 | 108 | \is_bool($value) => $value ? '1' : '0', |
109 | 109 | // TODO Think about escaping special chars in strings |
110 | 110 | \is_scalar($value), $value instanceof \Stringable => (string)$value, |
@@ -37,13 +37,13 @@ |
||
37 | 37 | ) { |
38 | 38 | /** @psalm-suppress ArgumentTypeCoercion */ |
39 | 39 | parent::__construct( |
40 | - connection: $connection ?? new MemoryConnectionConfig(), |
|
41 | - driver: $driver, |
|
42 | - reconnect: $reconnect, |
|
43 | - timezone: $timezone, |
|
44 | - queryCache: $queryCache, |
|
45 | - readonlySchema: $readonlySchema, |
|
46 | - readonly: $readonly, |
|
40 | + connection : $connection ?? new MemoryConnectionConfig(), |
|
41 | + driver : $driver, |
|
42 | + reconnect : $reconnect, |
|
43 | + timezone : $timezone, |
|
44 | + queryCache : $queryCache, |
|
45 | + readonlySchema : $readonlySchema, |
|
46 | + readonly : $readonly, |
|
47 | 47 | ); |
48 | 48 | } |
49 | 49 | } |
@@ -34,7 +34,7 @@ |
||
34 | 34 | * @param array $options |
35 | 35 | */ |
36 | 36 | public function __construct( |
37 | - string|\Stringable $dsn, |
|
37 | + string | \Stringable $dsn, |
|
38 | 38 | ?string $user = null, |
39 | 39 | ?string $password = null, |
40 | 40 | array $options = [] |
@@ -34,7 +34,7 @@ |
||
34 | 34 | * @param array $options |
35 | 35 | */ |
36 | 36 | public function __construct( |
37 | - string|\Stringable $dsn, |
|
37 | + string | \Stringable $dsn, |
|
38 | 38 | ?string $user = null, |
39 | 39 | ?string $password = null, |
40 | 40 | array $options = [] |
@@ -87,7 +87,7 @@ |
||
87 | 87 | |
88 | 88 | private function detectType(mixed $value): int |
89 | 89 | { |
90 | - return match (gettype($value)) { |
|
90 | + return match(gettype($value)) { |
|
91 | 91 | 'boolean' => PDO::PARAM_BOOL, |
92 | 92 | 'integer' => PDO::PARAM_INT, |
93 | 93 | 'NULL' => PDO::PARAM_NULL, |
@@ -730,7 +730,7 @@ |
||
730 | 730 | foreach ($target->getForeignKeys() as $foreign) { |
731 | 731 | $foreign->columns( |
732 | 732 | array_map( |
733 | - static fn ($column) => $column === $initial->getName() ? $name->getName() : $column, |
|
733 | + static fn($column) => $column === $initial->getName() ? $name->getName() : $column, |
|
734 | 734 | $foreign->getColumns() |
735 | 735 | ) |
736 | 736 | ); |
@@ -110,7 +110,7 @@ |
||
110 | 110 | * |
111 | 111 | * @throws BuilderException |
112 | 112 | */ |
113 | - public function insertOne(array $rowset = []): int|string|null |
|
113 | + public function insertOne(array $rowset = []): int | string | null |
|
114 | 114 | { |
115 | 115 | return $this->database |
116 | 116 | ->insert($this->name) |
@@ -160,7 +160,7 @@ discard block |
||
160 | 160 | |
161 | 161 | if ($driverObject instanceof LoggerAwareInterface) { |
162 | 162 | $logger = $this->getLoggerForDriver($driverObject); |
163 | - if (! $logger instanceof NullLogger) { |
|
163 | + if (!$logger instanceof NullLogger) { |
|
164 | 164 | $driverObject->setLogger($logger); |
165 | 165 | } |
166 | 166 | } |
@@ -198,7 +198,7 @@ discard block |
||
198 | 198 | |
199 | 199 | private function getLoggerForDriver(DriverInterface $driver): LoggerInterface |
200 | 200 | { |
201 | - if (! $this->loggerFactory) { |
|
201 | + if (!$this->loggerFactory) { |
|
202 | 202 | return $this->logger ??= new NullLogger(); |
203 | 203 | } |
204 | 204 |
@@ -104,7 +104,7 @@ |
||
104 | 104 | */ |
105 | 105 | private function whereWrapper(): Closure |
106 | 106 | { |
107 | - return static function ($parameter) { |
|
107 | + return static function($parameter) { |
|
108 | 108 | \is_array($parameter) and throw new BuilderException('Arrays must be wrapped with Parameter instance'); |
109 | 109 | |
110 | 110 | return !$parameter instanceof ParameterInterface && !$parameter instanceof FragmentInterface |