@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | */ |
101 | 101 | protected function doCall(string $name, array $arguments) |
102 | 102 | { |
103 | - if (!$this->__moka_mockingStrategy instanceof MockingStrategyInterface) { |
|
103 | + if ( ! $this->__moka_mockingStrategy instanceof MockingStrategyInterface) { |
|
104 | 104 | return null; |
105 | 105 | } |
106 | 106 | |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | */ |
118 | 118 | protected function doGet(string $name) |
119 | 119 | { |
120 | - if (!$this->__moka_mockingStrategy instanceof MockingStrategyInterface) { |
|
120 | + if ( ! $this->__moka_mockingStrategy instanceof MockingStrategyInterface) { |
|
121 | 121 | return null; |
122 | 122 | } |
123 | 123 |
@@ -33,7 +33,7 @@ |
||
33 | 33 | */ |
34 | 34 | public function get($id): ProxyInterface |
35 | 35 | { |
36 | - if (!$this->has($id)) { |
|
36 | + if ( ! $this->has($id)) { |
|
37 | 37 | throw new InvalidIdentifierException( |
38 | 38 | sprintf( |
39 | 39 | 'Cannot find mock object with identifier "%s"', |
@@ -32,7 +32,7 @@ |
||
32 | 32 | |
33 | 33 | public function getCallable(): callable |
34 | 34 | { |
35 | - return function () { |
|
35 | + return function() { |
|
36 | 36 | }; |
37 | 37 | } |
38 | 38 |
@@ -309,17 +309,17 @@ discard block |
||
309 | 309 | ]; |
310 | 310 | |
311 | 311 | $data = array_merge( |
312 | - array_map(function (array $set) { |
|
312 | + array_map(function(array $set) { |
|
313 | 313 | array_unshift($set, $required = true); |
314 | 314 | return $set; |
315 | 315 | }, $required), |
316 | - array_map(function (array $set) { |
|
316 | + array_map(function(array $set) { |
|
317 | 317 | array_unshift($set, $required = false); |
318 | 318 | return $set; |
319 | 319 | }, $optional) |
320 | 320 | ); |
321 | 321 | |
322 | - return array_reduce($data, function (array $data, array $set) { |
|
322 | + return array_reduce($data, function(array $data, array $set) { |
|
323 | 323 | $key = preg_replace('/^an? +/', '', $set[1]); |
324 | 324 | $data[$key] = $set; |
325 | 325 | |
@@ -424,7 +424,7 @@ discard block |
||
424 | 424 | |
425 | 425 | $object = $this->strategy->get($mock); |
426 | 426 | foreach ($fqcns as $fqcn) { |
427 | - if (!is_a($object, $fqcn)) { |
|
427 | + if ( ! is_a($object, $fqcn)) { |
|
428 | 428 | $this->markFeatureUnsupported( |
429 | 429 | sprintf( |
430 | 430 | 'getting a valid mock from %s', |
@@ -27,7 +27,7 @@ |
||
27 | 27 | protected static function doGenerate(\ReflectionParameter $parameter): string |
28 | 28 | { |
29 | 29 | try { |
30 | - $defaultValue = !$parameter->allowsNull() |
|
30 | + $defaultValue = ! $parameter->allowsNull() |
|
31 | 31 | ? var_export($parameter->getDefaultValue(), true) |
32 | 32 | : 'null'; |
33 | 33 |
@@ -84,8 +84,8 @@ |
||
84 | 84 | |
85 | 85 | foreach ($methods as $method) { |
86 | 86 | if ( |
87 | - !$method->isFinal() && |
|
88 | - !\in_array($method->name, self::UNSAFE_METHODS, $strict = true) |
|
87 | + ! $method->isFinal() && |
|
88 | + ! \in_array($method->name, self::UNSAFE_METHODS, $strict = true) |
|
89 | 89 | ) { |
90 | 90 | $methodsCode[] = MethodTemplate::generate($method); |
91 | 91 | } |
@@ -21,8 +21,8 @@ |
||
21 | 21 | protected static function getVisibility(\Reflector $reflector): string |
22 | 22 | { |
23 | 23 | if ( |
24 | - !$reflector instanceof \ReflectionMethod && |
|
25 | - !$reflector instanceof \ReflectionProperty |
|
24 | + ! $reflector instanceof \ReflectionMethod && |
|
25 | + ! $reflector instanceof \ReflectionProperty |
|
26 | 26 | ) { |
27 | 27 | throw new InvalidArgumentException( |
28 | 28 | sprintf( |
@@ -65,7 +65,7 @@ |
||
65 | 65 | return $this->buildProxy($fqcnOrAlias); |
66 | 66 | } |
67 | 67 | |
68 | - if (!$this->container->has($alias)) { |
|
68 | + if ( ! $this->container->has($alias)) { |
|
69 | 69 | $this->container->set($alias, $this->buildProxy($fqcnOrAlias)); |
70 | 70 | } |
71 | 71 |
@@ -24,7 +24,7 @@ |
||
24 | 24 | public static function get(MockingStrategyInterface $mockingStrategy): ProxyBuilder |
25 | 25 | { |
26 | 26 | $key = self::key($mockingStrategy); |
27 | - if (!array_key_exists($key, self::$mockBuilders) || !self::$mockBuilders[$key] instanceof ProxyBuilder) { |
|
27 | + if ( ! array_key_exists($key, self::$mockBuilders) || ! self::$mockBuilders[$key] instanceof ProxyBuilder) { |
|
28 | 28 | self::$mockBuilders[$key] = static::build($mockingStrategy); |
29 | 29 | } |
30 | 30 |