@@ -40,7 +40,7 @@ |
||
40 | 40 | */ |
41 | 41 | public function getContents(): string |
42 | 42 | { |
43 | - return (string) file_get_contents($this->path); |
|
43 | + return (string)file_get_contents($this->path); |
|
44 | 44 | } |
45 | 45 | |
46 | 46 | /** |
@@ -57,6 +57,6 @@ |
||
57 | 57 | return $node->value; |
58 | 58 | } |
59 | 59 | |
60 | - return (string) $node->getAttribute('originalValue'); |
|
60 | + return (string)$node->getAttribute('originalValue'); |
|
61 | 61 | } |
62 | 62 | } |
@@ -76,16 +76,16 @@ |
||
76 | 76 | $type = $this->createType($object); |
77 | 77 | } |
78 | 78 | |
79 | - return new ArgumentDescriptor((string) $object->var->name, $type, $default, $object->byRef, $object->variadic); |
|
79 | + return new ArgumentDescriptor((string)$object->var->name, $type, $default, $object->byRef, $object->variadic); |
|
80 | 80 | } |
81 | 81 | |
82 | 82 | private function createType(Param $arg, ?Context $context = null): Type |
83 | 83 | { |
84 | 84 | $typeResolver = new TypeResolver(); |
85 | 85 | if ($arg->type instanceof NullableType) { |
86 | - $typeString = '?' . $arg->type->type; |
|
86 | + $typeString = '?'.$arg->type->type; |
|
87 | 87 | } else { |
88 | - $typeString = (string) $arg->type; |
|
88 | + $typeString = (string)$arg->type; |
|
89 | 89 | } |
90 | 90 | |
91 | 91 | return $typeResolver->resolve($typeString, $context); |
@@ -366,6 +366,7 @@ discard block |
||
366 | 366 | * |
367 | 367 | * @throws ExpectationFailedException |
368 | 368 | * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException |
369 | + * @param boolean $isNativeType |
|
369 | 370 | */ |
370 | 371 | public static function assertContainsOnly(string $type, iterable $haystack, ?bool $isNativeType = null, string $message = ''): void |
371 | 372 | { |
@@ -433,6 +434,7 @@ discard block |
||
433 | 434 | * |
434 | 435 | * @throws ExpectationFailedException |
435 | 436 | * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException |
437 | + * @param boolean $isNativeType |
|
436 | 438 | */ |
437 | 439 | public static function assertNotContainsOnly(string $type, iterable $haystack, ?bool $isNativeType = null, string $message = ''): void |
438 | 440 | { |
@@ -13,7 +13,7 @@ discard block |
||
13 | 13 | { |
14 | 14 | public function __invoke(?Namespace_ $namespace) : Context |
15 | 15 | { |
16 | - if ( ! $namespace) { |
|
16 | + if (!$namespace) { |
|
17 | 17 | return new Context(''); |
18 | 18 | } |
19 | 19 | |
@@ -29,16 +29,16 @@ discard block |
||
29 | 29 | private function aliasesToFullyQualifiedNames(Namespace_ $namespace) : array |
30 | 30 | { |
31 | 31 | // flatten(flatten(map(stuff))) |
32 | - return \array_merge([], ...\array_merge([], ...\array_map(function ($use) : array { |
|
32 | + return \array_merge([], ...\array_merge([], ...\array_map(function($use) : array { |
|
33 | 33 | /** @var $use Use_|GroupUse */ |
34 | 34 | |
35 | - return \array_map(function (UseUse $useUse) use ($use) : array { |
|
35 | + return \array_map(function(UseUse $useUse) use ($use) : array { |
|
36 | 36 | |
37 | 37 | if ($use instanceof GroupUse) { |
38 | - return [(string) $useUse->getAlias() => $use->prefix->toString() . '\\' . $useUse->name->toString()]; |
|
38 | + return [(string)$useUse->getAlias() => $use->prefix->toString().'\\'.$useUse->name->toString()]; |
|
39 | 39 | } |
40 | 40 | |
41 | - return [(string) $useUse->getAlias() => $useUse->name->toString()]; |
|
41 | + return [(string)$useUse->getAlias() => $useUse->name->toString()]; |
|
42 | 42 | }, $use->uses); |
43 | 43 | }, $this->classAlikeUses($namespace)))); |
44 | 44 | } |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | { |
53 | 53 | return \array_filter( |
54 | 54 | $namespace->stmts ?? [], |
55 | - function (Node $node) : bool { |
|
55 | + function(Node $node) : bool { |
|
56 | 56 | return ( |
57 | 57 | $node instanceof Use_ |
58 | 58 | || $node instanceof GroupUse |
@@ -18,7 +18,6 @@ |
||
18 | 18 | use PhpParser\Node\Const_; |
19 | 19 | use PhpParser\Node\Expr\Variable; |
20 | 20 | use PhpParser\Node\Stmt\Const_ as ConstStatement; |
21 | -use PHPUnit\Framework\TestCase; |
|
22 | 21 | |
23 | 22 | /** |
24 | 23 | * Class PropertyIteratorTest |
@@ -54,7 +54,7 @@ |
||
54 | 54 | */ |
55 | 55 | public function getName() : string |
56 | 56 | { |
57 | - return (string) $this->constant->consts[$this->index]->name; |
|
57 | + return (string)$this->constant->consts[$this->index]->name; |
|
58 | 58 | } |
59 | 59 | |
60 | 60 | /** |