@@ -70,14 +70,14 @@ |
||
| 70 | 70 | $value = \gettype($result); |
| 71 | 71 | |
| 72 | 72 | if (\is_object($result)) { |
| 73 | - $value = \get_class($result) . '#' . \spl_object_hash($result); |
|
| 73 | + $value = \get_class($result).'#'.\spl_object_hash($result); |
|
| 74 | 74 | |
| 75 | 75 | if (\method_exists($result, '__toString')) { |
| 76 | - $value = (string)$result; |
|
| 76 | + $value = (string) $result; |
|
| 77 | 77 | } |
| 78 | 78 | } |
| 79 | 79 | |
| 80 | - $message = \sprintf('%4s = %s', '#' . $opcode->getId(), $value); |
|
| 80 | + $message = \sprintf('%4s = %s', '#'.$opcode->getId(), $value); |
|
| 81 | 81 | |
| 82 | 82 | $this->logger->debug($message); |
| 83 | 83 | } |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | */ |
| 58 | 58 | private static function node(NodeInterface $ast): string |
| 59 | 59 | { |
| 60 | - return '<' . $ast->getName() . '>'; |
|
| 60 | + return '<'.$ast->getName().'>'; |
|
| 61 | 61 | } |
| 62 | 62 | |
| 63 | 63 | /** |
@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | */ |
| 67 | 67 | private static function opcode(OpcodeInterface $opcode): string |
| 68 | 68 | { |
| 69 | - return '#' . $opcode->getId() . ' ' . $opcode->getName(); |
|
| 69 | + return '#'.$opcode->getId().' '.$opcode->getName(); |
|
| 70 | 70 | } |
| 71 | 71 | |
| 72 | 72 | /** |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | */ |
| 76 | 76 | private static function value(ValueInterface $value): string |
| 77 | 77 | { |
| 78 | - return (string)$value; |
|
| 78 | + return (string) $value; |
|
| 79 | 79 | } |
| 80 | 80 | |
| 81 | 81 | /** |
@@ -92,11 +92,11 @@ discard block |
||
| 92 | 92 | return $value ? 'true' : 'false'; |
| 93 | 93 | |
| 94 | 94 | case \is_string($value): |
| 95 | - $minified = \preg_replace('/\s+/', ' ', (string)$value); |
|
| 96 | - return '"' . \addcslashes($minified, '"') . '"'; |
|
| 95 | + $minified = \preg_replace('/\s+/', ' ', (string) $value); |
|
| 96 | + return '"'.\addcslashes($minified, '"').'"'; |
|
| 97 | 97 | |
| 98 | 98 | default: |
| 99 | - return (string)$value; |
|
| 99 | + return (string) $value; |
|
| 100 | 100 | } |
| 101 | 101 | } |
| 102 | 102 | |
@@ -123,7 +123,7 @@ discard block |
||
| 123 | 123 | */ |
| 124 | 124 | private static function object($value): string |
| 125 | 125 | { |
| 126 | - return \get_class($value) . '#' . \spl_object_hash($value); |
|
| 126 | + return \get_class($value).'#'.\spl_object_hash($value); |
|
| 127 | 127 | } |
| 128 | 128 | |
| 129 | 129 | /** |
@@ -132,6 +132,6 @@ discard block |
||
| 132 | 132 | */ |
| 133 | 133 | private static function file(Readable $readable): string |
| 134 | 134 | { |
| 135 | - return '(file)' . $readable->getPathname(); |
|
| 135 | + return '(file)'.$readable->getPathname(); |
|
| 136 | 136 | } |
| 137 | 137 | } |
@@ -105,7 +105,7 @@ discard block |
||
| 105 | 105 | private function log($value): void |
| 106 | 106 | { |
| 107 | 107 | if ($value instanceof OpcodeInterface) { |
| 108 | - $this->logger->debug((string)$value); |
|
| 108 | + $this->logger->debug((string) $value); |
|
| 109 | 109 | } else { |
| 110 | 110 | $this->logger->info(\gettype($value)); |
| 111 | 111 | } |
@@ -131,7 +131,7 @@ discard block |
||
| 131 | 131 | if ($child instanceof ProvidesOpcode) { |
| 132 | 132 | $iterator = $this->extract($child, $child->getOpcodes($context)); |
| 133 | 133 | |
| 134 | - yield from \iterator_reverse_each($iterator, function ($response) use (&$deferred): void { |
|
| 134 | + yield from \iterator_reverse_each($iterator, function($response) use (&$deferred): void { |
|
| 135 | 135 | // In the event that the parent sends a deferred callback |
| 136 | 136 | // back, we memorize the reference to him in order |
| 137 | 137 | // to fulfill in the future. |
@@ -44,11 +44,11 @@ |
||
| 44 | 44 | $parent = $context->create(); |
| 45 | 45 | $current = yield new DefineOpcode($this->getFullNameValue(), new TypeValue($this->getType())); |
| 46 | 46 | |
| 47 | - yield function () use ($current, $parent) { |
|
| 47 | + yield function() use ($current, $parent) { |
|
| 48 | 48 | yield new AddDefinitionOpcode($current, $parent); |
| 49 | 49 | }; |
| 50 | 50 | |
| 51 | - if (! ($description = $this->getDescriptionValue()) instanceof NullValue) { |
|
| 51 | + if (!($description = $this->getDescriptionValue()) instanceof NullValue) { |
|
| 52 | 52 | yield new AddDescriptionOpcode($current, $description); |
| 53 | 53 | } |
| 54 | 54 | } |
@@ -41,7 +41,7 @@ |
||
| 41 | 41 | */ |
| 42 | 42 | public function getOpcodes(Context $context): iterable |
| 43 | 43 | { |
| 44 | - yield from \iterator_each(parent::getOpcodes($context), function ($result): void { |
|
| 44 | + yield from \iterator_each(parent::getOpcodes($context), function($result): void { |
|
| 45 | 45 | if ($result instanceof AddDefinitionOpcode) { |
| 46 | 46 | $result->rebind(OpcodeInterface::RL_ADD_FIELD); |
| 47 | 47 | } |
@@ -48,7 +48,7 @@ |
||
| 48 | 48 | */ |
| 49 | 49 | public function getOpcodes(Context $context): iterable |
| 50 | 50 | { |
| 51 | - yield from \iterator_each(parent::getOpcodes($context), function ($result): void { |
|
| 51 | + yield from \iterator_each(parent::getOpcodes($context), function($result): void { |
|
| 52 | 52 | if ($result instanceof AddDefinitionOpcode) { |
| 53 | 53 | $result->rebind(OpcodeInterface::RL_ADD_ARGUMENT); |
| 54 | 54 | } |
@@ -55,11 +55,11 @@ |
||
| 55 | 55 | $parent = $context->create(); |
| 56 | 56 | $current = yield new DefineOpcode($this->getNameValue(), new TypeValue($this->getType())); |
| 57 | 57 | |
| 58 | - yield function () use ($current, $parent) { |
|
| 58 | + yield function() use ($current, $parent) { |
|
| 59 | 59 | yield new AddDefinitionOpcode($current, $parent); |
| 60 | 60 | }; |
| 61 | 61 | |
| 62 | - if (! ($description = $this->getDescriptionValue()) instanceof NullValue) { |
|
| 62 | + if (!($description = $this->getDescriptionValue()) instanceof NullValue) { |
|
| 63 | 63 | yield new AddDescriptionOpcode($current, $description); |
| 64 | 64 | } |
| 65 | 65 | } |