@@ -108,7 +108,7 @@ |
||
| 108 | 108 | */ |
| 109 | 109 | private function whereWrapper(): Closure |
| 110 | 110 | { |
| 111 | - return static function ($parameter) { |
|
| 111 | + return static function($parameter) { |
|
| 112 | 112 | if (is_array($parameter)) { |
| 113 | 113 | throw new BuilderException( |
| 114 | 114 | 'Arrays must be wrapped with Parameter instance' |
@@ -373,7 +373,7 @@ discard block |
||
| 373 | 373 | */ |
| 374 | 374 | private function onWrapper(): Closure |
| 375 | 375 | { |
| 376 | - return static function ($parameter) { |
|
| 376 | + return static function($parameter) { |
|
| 377 | 377 | if ($parameter instanceof FragmentInterface || $parameter instanceof ParameterInterface) { |
| 378 | 378 | return $parameter; |
| 379 | 379 | } |
@@ -389,7 +389,7 @@ discard block |
||
| 389 | 389 | */ |
| 390 | 390 | private function onWhereWrapper(): Closure |
| 391 | 391 | { |
| 392 | - return static function ($parameter) { |
|
| 392 | + return static function($parameter) { |
|
| 393 | 393 | if (is_array($parameter)) { |
| 394 | 394 | throw new BuilderException( |
| 395 | 395 | 'Arrays must be wrapped with Parameter instance' |
@@ -108,7 +108,7 @@ |
||
| 108 | 108 | */ |
| 109 | 109 | private function havingWrapper(): Closure |
| 110 | 110 | { |
| 111 | - return static function ($parameter) { |
|
| 111 | + return static function($parameter) { |
|
| 112 | 112 | if (is_array($parameter)) { |
| 113 | 113 | throw new BuilderException( |
| 114 | 114 | 'Arrays must be wrapped with Parameter instance' |
@@ -11,5 +11,5 @@ |
||
| 11 | 11 | /** |
| 12 | 12 | * Set returning column or expression. |
| 13 | 13 | */ |
| 14 | - public function returning(string|FragmentInterface ...$columns): self; |
|
| 14 | + public function returning(string | FragmentInterface ...$columns): self; |
|
| 15 | 15 | } |
@@ -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 = [] |
@@ -37,9 +37,9 @@ |
||
| 37 | 37 | * @param array<non-empty-string>|non-empty-string $needle |
| 38 | 38 | * @return non-empty-string|null |
| 39 | 39 | */ |
| 40 | - public static function read(string $haystack, array|string $needle): ?string |
|
| 40 | + public static function read(string $haystack, array | string $needle): ?string |
|
| 41 | 41 | { |
| 42 | - $needle = \array_map(static fn(string $item): string => \preg_quote($item), (array)$needle); |
|
| 42 | + $needle = \array_map(static fn(string $item) : string => \preg_quote($item), (array)$needle); |
|
| 43 | 43 | $pattern = \sprintf('/\b(?:%s)=([^;]+)/i', \implode('|', $needle)); |
| 44 | 44 | |
| 45 | 45 | if (\preg_match($pattern, $haystack, $matches)) { |
@@ -32,7 +32,7 @@ |
||
| 32 | 32 | * @param array $options |
| 33 | 33 | */ |
| 34 | 34 | public function __construct( |
| 35 | - string|\Stringable $dsn, |
|
| 35 | + string | \Stringable $dsn, |
|
| 36 | 36 | array $options = [] |
| 37 | 37 | ) { |
| 38 | 38 | parent::__construct($options); |
@@ -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 | } |