@@ -34,7 +34,7 @@ |
||
34 | 34 | |
35 | 35 | /** |
36 | 36 | * @param Context $context |
37 | - * @return iterable |
|
37 | + * @return \Generator |
|
38 | 38 | */ |
39 | 39 | public function getOpcodes(Context $context): iterable |
40 | 40 | { |
@@ -34,7 +34,7 @@ |
||
34 | 34 | |
35 | 35 | /** |
36 | 36 | * @param Context $context |
37 | - * @return iterable |
|
37 | + * @return \Generator |
|
38 | 38 | */ |
39 | 39 | public function getOpcodes(Context $context): iterable |
40 | 40 | { |
@@ -34,7 +34,7 @@ |
||
34 | 34 | |
35 | 35 | /** |
36 | 36 | * @param Context $context |
37 | - * @return iterable |
|
37 | + * @return \Generator |
|
38 | 38 | */ |
39 | 39 | public function getOpcodes(Context $context): iterable |
40 | 40 | { |
@@ -82,30 +82,30 @@ discard block |
||
82 | 82 | return $value->toString(); |
83 | 83 | |
84 | 84 | case $value instanceof TypeInterface: |
85 | - return '$' . $value->getName(); |
|
85 | + return '$'.$value->getName(); |
|
86 | 86 | |
87 | 87 | case $value instanceof JoinableOpcode: |
88 | - return '!' . $value->getId(); |
|
88 | + return '!'.$value->getId(); |
|
89 | 89 | |
90 | 90 | case $value instanceof OpcodeInterface: |
91 | 91 | return $value->getName(); |
92 | 92 | |
93 | 93 | case $value instanceof Readable: |
94 | - return 'file:' . $value->getPathname(); |
|
94 | + return 'file:'.$value->getPathname(); |
|
95 | 95 | |
96 | 96 | case \is_bool($value): |
97 | - return '(php:bool)' . ($value ? 'true' : 'false'); |
|
97 | + return '(php:bool)'.($value ? 'true' : 'false'); |
|
98 | 98 | |
99 | 99 | case $value === null: |
100 | 100 | return '(php:null)null'; |
101 | 101 | |
102 | 102 | case \is_scalar($value): |
103 | 103 | $type = \gettype($value); |
104 | - $minified = \preg_replace('/\s+/', ' ', (string)$value); |
|
105 | - return '(php:' . $type . ')"' . \addcslashes($minified, '"') . '"'; |
|
104 | + $minified = \preg_replace('/\s+/', ' ', (string) $value); |
|
105 | + return '(php:'.$type.')"'.\addcslashes($minified, '"').'"'; |
|
106 | 106 | |
107 | 107 | case \is_object($value): |
108 | - return \get_class($value) . '#' . \spl_object_hash($value); |
|
108 | + return \get_class($value).'#'.\spl_object_hash($value); |
|
109 | 109 | } |
110 | 110 | |
111 | 111 | return ''; |
@@ -116,11 +116,11 @@ discard block |
||
116 | 116 | */ |
117 | 117 | public function __toString(): string |
118 | 118 | { |
119 | - $operands = \array_map(function ($value): string { |
|
119 | + $operands = \array_map(function($value): string { |
|
120 | 120 | return $this->operandToString($value); |
121 | 121 | }, $this->operands); |
122 | 122 | |
123 | - return \sprintf('%-20s %-20s', $this->getName(), '{' . \implode(', ', $operands) . '}'); |
|
123 | + return \sprintf('%-20s %-20s', $this->getName(), '{'.\implode(', ', $operands).'}'); |
|
124 | 124 | } |
125 | 125 | |
126 | 126 | /** |
@@ -51,8 +51,8 @@ discard block |
||
51 | 51 | $this->id = $id; |
52 | 52 | $this->file = $file; |
53 | 53 | $this->offset = $offset; |
54 | - $this->description = function () use ($opcode): string { |
|
55 | - return \trim((string)(new \ReflectionObject($opcode))->getDocComment(), " \t\n\r\0\x0B/*"); |
|
54 | + $this->description = function() use ($opcode): string { |
|
55 | + return \trim((string) (new \ReflectionObject($opcode))->getDocComment(), " \t\n\r\0\x0B/*"); |
|
56 | 56 | }; |
57 | 57 | } |
58 | 58 | |
@@ -61,8 +61,8 @@ discard block |
||
61 | 61 | */ |
62 | 62 | public function getDescription(): string |
63 | 63 | { |
64 | - return \preg_replace_callback('/\$(\d+)/iu', function (array $m): string { |
|
65 | - return $this->operandToString($this->operands[(int)$m[1]] ?? null); |
|
64 | + return \preg_replace_callback('/\$(\d+)/iu', function(array $m): string { |
|
65 | + return $this->operandToString($this->operands[(int) $m[1]] ?? null); |
|
66 | 66 | }, ($this->description)()); |
67 | 67 | } |
68 | 68 | |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | public function __toString(): string |
113 | 113 | { |
114 | 114 | return \vsprintf('%4s %-10s %-3d %-3d %s', [ |
115 | - '#' . $this->getId(), |
|
115 | + '#'.$this->getId(), |
|
116 | 116 | \pathinfo($this->getFile()->getPathname(), \PATHINFO_FILENAME), |
117 | 117 | $this->getLine(), |
118 | 118 | $this->getColumn(), |