@@ -64,8 +64,8 @@ |
||
64 | 64 | } |
65 | 65 | |
66 | 66 | json_decode($other); |
67 | - $error = (string) JsonMatchesErrorMessageProvider::determineJsonError( |
|
68 | - (string) json_last_error() |
|
67 | + $error = (string)JsonMatchesErrorMessageProvider::determineJsonError( |
|
68 | + (string)json_last_error() |
|
69 | 69 | ); |
70 | 70 | |
71 | 71 | return sprintf( |
@@ -48,6 +48,6 @@ |
||
48 | 48 | */ |
49 | 49 | protected function matches($other): bool |
50 | 50 | { |
51 | - return strpos((string) $other, $this->prefix) === 0; |
|
51 | + return strpos((string)$other, $this->prefix) === 0; |
|
52 | 52 | } |
53 | 53 | } |
@@ -16,6 +16,6 @@ |
||
16 | 16 | { |
17 | 17 | public function __construct(iterable $expected) |
18 | 18 | { |
19 | - parent::__construct((int) $this->getCountOf($expected)); |
|
19 | + parent::__construct((int)$this->getCountOf($expected)); |
|
20 | 20 | } |
21 | 21 | } |
@@ -135,7 +135,7 @@ |
||
135 | 135 | { |
136 | 136 | return sprintf( |
137 | 137 | 'actual size %d matches expected size %d', |
138 | - (int) $this->getCountOf($other), |
|
138 | + (int)$this->getCountOf($other), |
|
139 | 139 | $this->expectedCount |
140 | 140 | ); |
141 | 141 | } |
@@ -56,7 +56,7 @@ |
||
56 | 56 | } catch (ReflectionException $e) { |
57 | 57 | throw new Exception( |
58 | 58 | $e->getMessage(), |
59 | - (int) $e->getCode(), |
|
59 | + (int)$e->getCode(), |
|
60 | 60 | $e |
61 | 61 | ); |
62 | 62 | } |
@@ -48,7 +48,7 @@ |
||
48 | 48 | } catch (ReflectionException $e) { |
49 | 49 | throw new Exception( |
50 | 50 | $e->getMessage(), |
51 | - (int) $e->getCode(), |
|
51 | + (int)$e->getCode(), |
|
52 | 52 | $e |
53 | 53 | ); |
54 | 54 | } |
@@ -53,7 +53,7 @@ |
||
53 | 53 | |
54 | 54 | return array_reduce( |
55 | 55 | $constraints, |
56 | - static function (bool $matches, Constraint $constraint) use ($other): bool { |
|
56 | + static function(bool $matches, Constraint $constraint) use ($other): bool { |
|
57 | 57 | return $matches xor $constraint->evaluate($other, '', true); |
58 | 58 | }, |
59 | 59 | $initial->evaluate($other, '', true) |
@@ -50,7 +50,7 @@ |
||
50 | 50 | |
51 | 51 | preg_match('/(\'[\w\W]*\')([\w\W]*)("[\w\W]*")/i', $string, $matches); |
52 | 52 | |
53 | - $positives = array_map(static function (string $s) { |
|
53 | + $positives = array_map(static function(string $s) { |
|
54 | 54 | return '/\\b' . preg_quote($s, '/') . '/'; |
55 | 55 | }, $positives); |
56 | 56 |
@@ -37,7 +37,7 @@ |
||
37 | 37 | */ |
38 | 38 | public function setConstraints(array $constraints): void |
39 | 39 | { |
40 | - $this->constraints = array_map(function ($constraint): Constraint { |
|
40 | + $this->constraints = array_map(function($constraint): Constraint { |
|
41 | 41 | return $this->checkConstraint($constraint); |
42 | 42 | }, array_values($constraints)); |
43 | 43 | } |