@@ -27,6 +27,6 @@  | 
                                                    ||
| 27 | 27 | */  | 
                                                        
| 28 | 28 | public function getBindings(): array  | 
                                                        
| 29 | 29 |      { | 
                                                        
| 30 | - return (array) ($this->config['bindings'] ?? []);  | 
                                                        |
| 30 | + return (array)($this->config['bindings'] ?? []);  | 
                                                        |
| 31 | 31 | }  | 
                                                        
| 32 | 32 | }  | 
                                                        
@@ -23,13 +23,13 @@ discard block  | 
                                                    ||
| 23 | 23 | public function __construct(  | 
                                                        
| 24 | 24 | private readonly ReaderInterface $reader,  | 
                                                        
| 25 | 25 | private readonly PrototypeBootloader $prototype  | 
                                                        
| 26 | -    ) { | 
                                                        |
| 26 | +    ){ | 
                                                        |
| 27 | 27 | }  | 
                                                        
| 28 | 28 | |
| 29 | 29 | public function listen(ReflectionClass $class): void  | 
                                                        
| 30 | 30 |      { | 
                                                        
| 31 | 31 | $attribute = $this->reader->firstClassMetadata($class, Prototyped::class);  | 
                                                        
| 32 | -        if ($attribute === null) { | 
                                                        |
| 32 | +        if ($attribute === null){ | 
                                                        |
| 33 | 33 | return;  | 
                                                        
| 34 | 34 | }  | 
                                                        
| 35 | 35 | |
@@ -38,7 +38,7 @@ discard block  | 
                                                    ||
| 38 | 38 | |
| 39 | 39 | public function finalize(): void  | 
                                                        
| 40 | 40 |      { | 
                                                        
| 41 | -        foreach ($this->attributes as $property => $class) { | 
                                                        |
| 41 | +        foreach ($this->attributes as $property => $class){ | 
                                                        |
| 42 | 42 | $this->prototype->bindProperty($property, $class);  | 
                                                        
| 43 | 43 | }  | 
                                                        
| 44 | 44 | }  | 
                                                        
@@ -29,7 +29,8 @@ discard block  | 
                                                    ||
| 29 | 29 | public function listen(ReflectionClass $class): void  | 
                                                        
| 30 | 30 |      { | 
                                                        
| 31 | 31 | $attribute = $this->reader->firstClassMetadata($class, Prototyped::class);  | 
                                                        
| 32 | -        if ($attribute === null) { | 
                                                        |
| 32 | + if ($attribute === null)  | 
                                                        |
| 33 | +        { | 
                                                        |
| 33 | 34 | return;  | 
                                                        
| 34 | 35 | }  | 
                                                        
| 35 | 36 | |
@@ -38,7 +39,8 @@ discard block  | 
                                                    ||
| 38 | 39 | |
| 39 | 40 | public function finalize(): void  | 
                                                        
| 40 | 41 |      { | 
                                                        
| 41 | -        foreach ($this->attributes as $property => $class) { | 
                                                        |
| 42 | + foreach ($this->attributes as $property => $class)  | 
                                                        |
| 43 | +        { | 
                                                        |
| 42 | 44 | $this->prototype->bindProperty($property, $class);  | 
                                                        
| 43 | 45 | }  | 
                                                        
| 44 | 46 | }  | 
                                                        
@@ -12,7 +12,7 @@ discard block  | 
                                                    ||
| 12 | 12 | public function perform(): int  | 
                                                        
| 13 | 13 |      { | 
                                                        
| 14 | 14 | $bindings = $this->getRegistry()->getPropertyBindings();  | 
                                                        
| 15 | -        if ($bindings === []) { | 
                                                        |
| 15 | +        if ($bindings === []){ | 
                                                        |
| 16 | 16 |              $this->comment('No prototype dependencies found.'); | 
                                                        
| 17 | 17 | |
| 18 | 18 | return self::SUCCESS;  | 
                                                        
@@ -20,7 +20,7 @@ discard block  | 
                                                    ||
| 20 | 20 | |
| 21 | 21 | $grid = $this->table(['Name:', 'Target:']);  | 
                                                        
| 22 | 22 | |
| 23 | -        foreach ($bindings as $binding) { | 
                                                        |
| 23 | +        foreach ($bindings as $binding){ | 
                                                        |
| 24 | 24 | $grid->addRow([$binding->property, $binding->type->name()]);  | 
                                                        
| 25 | 25 | }  | 
                                                        
| 26 | 26 | |
@@ -12,7 +12,8 @@ discard block  | 
                                                    ||
| 12 | 12 | public function perform(): int  | 
                                                        
| 13 | 13 |      { | 
                                                        
| 14 | 14 | $bindings = $this->getRegistry()->getPropertyBindings();  | 
                                                        
| 15 | -        if ($bindings === []) { | 
                                                        |
| 15 | + if ($bindings === [])  | 
                                                        |
| 16 | +        { | 
                                                        |
| 16 | 17 |              $this->comment('No prototype dependencies found.'); | 
                                                        
| 17 | 18 | |
| 18 | 19 | return self::SUCCESS;  | 
                                                        
@@ -20,7 +21,8 @@ discard block  | 
                                                    ||
| 20 | 21 | |
| 21 | 22 | $grid = $this->table(['Name:', 'Target:']);  | 
                                                        
| 22 | 23 | |
| 23 | -        foreach ($bindings as $binding) { | 
                                                        |
| 24 | + foreach ($bindings as $binding)  | 
                                                        |
| 25 | +        { | 
                                                        |
| 24 | 26 | $grid->addRow([$binding->property, $binding->type->name()]);  | 
                                                        
| 25 | 27 | }  | 
                                                        
| 26 | 28 | |
@@ -19,7 +19,7 @@ discard block  | 
                                                    ||
| 19 | 19 | public function __construct(  | 
                                                        
| 20 | 20 | protected readonly PrototypeLocator $locator,  | 
                                                        
| 21 | 21 | protected readonly NodeExtractor $extractor  | 
                                                        
| 22 | -    ) { | 
                                                        |
| 22 | +    ){ | 
                                                        |
| 23 | 23 | parent::__construct();  | 
                                                        
| 24 | 24 | }  | 
                                                        
| 25 | 25 | |
@@ -34,7 +34,7 @@ discard block  | 
                                                    ||
| 34 | 34 | $results = [$this->readProperties($class)];  | 
                                                        
| 35 | 35 | |
| 36 | 36 | $parent = $class->getParentClass();  | 
                                                        
| 37 | -        while ($parent instanceof \ReflectionClass && isset($all[$parent->getName()])) { | 
                                                        |
| 37 | +        while ($parent instanceof \ReflectionClass && isset($all[$parent->getName()])){ | 
                                                        |
| 38 | 38 | $results[] = $this->readProperties($parent);  | 
                                                        
| 39 | 39 | $parent = $parent->getParentClass();  | 
                                                        
| 40 | 40 | }  | 
                                                        
@@ -67,8 +67,8 @@ discard block  | 
                                                    ||
| 67 | 67 |      { | 
                                                        
| 68 | 68 | $result = [];  | 
                                                        
| 69 | 69 | |
| 70 | -        foreach ($properties as $target) { | 
                                                        |
| 71 | -            if ($target instanceof Throwable) { | 
                                                        |
| 70 | +        foreach ($properties as $target){ | 
                                                        |
| 71 | +            if ($target instanceof Throwable){ | 
                                                        |
| 72 | 72 | $result[] = \sprintf(  | 
                                                        
| 73 | 73 | '<fg=red>%s [f: %s, l: %s]</fg=red>',  | 
                                                        
| 74 | 74 | $target->getMessage(),  | 
                                                        
@@ -78,7 +78,7 @@ discard block  | 
                                                    ||
| 78 | 78 | continue;  | 
                                                        
| 79 | 79 | }  | 
                                                        
| 80 | 80 | |
| 81 | -            if ($target === null) { | 
                                                        |
| 81 | +            if ($target === null){ | 
                                                        |
| 82 | 82 | $result[] = '<fg=yellow>undefined</fg=yellow>';  | 
                                                        
| 83 | 83 | continue;  | 
                                                        
| 84 | 84 | }  | 
                                                        
@@ -94,16 +94,16 @@ discard block  | 
                                                    ||
| 94 | 94 | */  | 
                                                        
| 95 | 95 | private function readProperties(\ReflectionClass $class): array  | 
                                                        
| 96 | 96 |      { | 
                                                        
| 97 | -        if (isset($this->cache[$class->getFileName()])) { | 
                                                        |
| 97 | +        if (isset($this->cache[$class->getFileName()])){ | 
                                                        |
| 98 | 98 | $proto = $this->cache[$class->getFileName()];  | 
                                                        
| 99 | -        } else { | 
                                                        |
| 99 | +        }else{ | 
                                                        |
| 100 | 100 | $proto = $this->getExtractor()->getPrototypeProperties(\file_get_contents($class->getFileName()));  | 
                                                        
| 101 | 101 | $this->cache[$class->getFileName()] = $proto;  | 
                                                        
| 102 | 102 | }  | 
                                                        
| 103 | 103 | |
| 104 | 104 | $result = [];  | 
                                                        
| 105 | -        foreach ($proto as $name) { | 
                                                        |
| 106 | -            if (!isset($result[$name])) { | 
                                                        |
| 105 | +        foreach ($proto as $name){ | 
                                                        |
| 106 | +            if (!isset($result[$name])){ | 
                                                        |
| 107 | 107 | $result[$name] = $this->getRegistry()->resolveProperty($name);  | 
                                                        
| 108 | 108 | }  | 
                                                        
| 109 | 109 | }  | 
                                                        
@@ -120,7 +120,7 @@ discard block  | 
                                                    ||
| 120 | 120 | */  | 
                                                        
| 121 | 121 | private function reverse(array $results): \Generator  | 
                                                        
| 122 | 122 |      { | 
                                                        
| 123 | -        foreach (\array_reverse($results) as $result) { | 
                                                        |
| 123 | +        foreach (\array_reverse($results) as $result){ | 
                                                        |
| 124 | 124 | yield from $result;  | 
                                                        
| 125 | 125 | }  | 
                                                        
| 126 | 126 | }  | 
                                                        
@@ -34,7 +34,8 @@ discard block  | 
                                                    ||
| 34 | 34 | $results = [$this->readProperties($class)];  | 
                                                        
| 35 | 35 | |
| 36 | 36 | $parent = $class->getParentClass();  | 
                                                        
| 37 | -        while ($parent instanceof \ReflectionClass && isset($all[$parent->getName()])) { | 
                                                        |
| 37 | + while ($parent instanceof \ReflectionClass && isset($all[$parent->getName()]))  | 
                                                        |
| 38 | +        { | 
                                                        |
| 38 | 39 | $results[] = $this->readProperties($parent);  | 
                                                        
| 39 | 40 | $parent = $parent->getParentClass();  | 
                                                        
| 40 | 41 | }  | 
                                                        
@@ -67,8 +68,10 @@ discard block  | 
                                                    ||
| 67 | 68 |      { | 
                                                        
| 68 | 69 | $result = [];  | 
                                                        
| 69 | 70 | |
| 70 | -        foreach ($properties as $target) { | 
                                                        |
| 71 | -            if ($target instanceof Throwable) { | 
                                                        |
| 71 | + foreach ($properties as $target)  | 
                                                        |
| 72 | +        { | 
                                                        |
| 73 | + if ($target instanceof Throwable)  | 
                                                        |
| 74 | +            { | 
                                                        |
| 72 | 75 | $result[] = \sprintf(  | 
                                                        
| 73 | 76 | '<fg=red>%s [f: %s, l: %s]</fg=red>',  | 
                                                        
| 74 | 77 | $target->getMessage(),  | 
                                                        
@@ -78,7 +81,8 @@ discard block  | 
                                                    ||
| 78 | 81 | continue;  | 
                                                        
| 79 | 82 | }  | 
                                                        
| 80 | 83 | |
| 81 | -            if ($target === null) { | 
                                                        |
| 84 | + if ($target === null)  | 
                                                        |
| 85 | +            { | 
                                                        |
| 82 | 86 | $result[] = '<fg=yellow>undefined</fg=yellow>';  | 
                                                        
| 83 | 87 | continue;  | 
                                                        
| 84 | 88 | }  | 
                                                        
@@ -94,16 +98,21 @@ discard block  | 
                                                    ||
| 94 | 98 | */  | 
                                                        
| 95 | 99 | private function readProperties(\ReflectionClass $class): array  | 
                                                        
| 96 | 100 |      { | 
                                                        
| 97 | -        if (isset($this->cache[$class->getFileName()])) { | 
                                                        |
| 101 | + if (isset($this->cache[$class->getFileName()]))  | 
                                                        |
| 102 | +        { | 
                                                        |
| 98 | 103 | $proto = $this->cache[$class->getFileName()];  | 
                                                        
| 99 | -        } else { | 
                                                        |
| 104 | + }  | 
                                                        |
| 105 | + else  | 
                                                        |
| 106 | +        { | 
                                                        |
| 100 | 107 | $proto = $this->getExtractor()->getPrototypeProperties(\file_get_contents($class->getFileName()));  | 
                                                        
| 101 | 108 | $this->cache[$class->getFileName()] = $proto;  | 
                                                        
| 102 | 109 | }  | 
                                                        
| 103 | 110 | |
| 104 | 111 | $result = [];  | 
                                                        
| 105 | -        foreach ($proto as $name) { | 
                                                        |
| 106 | -            if (!isset($result[$name])) { | 
                                                        |
| 112 | + foreach ($proto as $name)  | 
                                                        |
| 113 | +        { | 
                                                        |
| 114 | + if (!isset($result[$name]))  | 
                                                        |
| 115 | +            { | 
                                                        |
| 107 | 116 | $result[$name] = $this->getRegistry()->resolveProperty($name);  | 
                                                        
| 108 | 117 | }  | 
                                                        
| 109 | 118 | }  | 
                                                        
@@ -120,7 +129,8 @@ discard block  | 
                                                    ||
| 120 | 129 | */  | 
                                                        
| 121 | 130 | private function reverse(array $results): \Generator  | 
                                                        
| 122 | 131 |      { | 
                                                        
| 123 | -        foreach (\array_reverse($results) as $result) { | 
                                                        |
| 132 | + foreach (\array_reverse($results) as $result)  | 
                                                        |
| 133 | +        { | 
                                                        |
| 124 | 134 | yield from $result;  | 
                                                        
| 125 | 135 | }  | 
                                                        
| 126 | 136 | }  | 
                                                        
@@ -22,7 +22,7 @@ discard block  | 
                                                    ||
| 22 | 22 | public function perform(): int  | 
                                                        
| 23 | 23 |      { | 
                                                        
| 24 | 24 | $dependencies = $this->getRegistry()->getPropertyBindings();  | 
                                                        
| 25 | -        if ($dependencies === []) { | 
                                                        |
| 25 | +        if ($dependencies === []){ | 
                                                        |
| 26 | 26 |              $this->writeln('<comment>No prototyped shortcuts found.</comment>'); | 
                                                        
| 27 | 27 | |
| 28 | 28 | return self::SUCCESS;  | 
                                                        
@@ -32,7 +32,7 @@ discard block  | 
                                                    ||
| 32 | 32 | |
| 33 | 33 | $trait = new \ReflectionClass(PrototypeTrait::class);  | 
                                                        
| 34 | 34 | $docComment = $trait->getDocComment();  | 
                                                        
| 35 | -        if ($docComment === false) { | 
                                                        |
| 35 | +        if ($docComment === false){ | 
                                                        |
| 36 | 36 |              $this->write('<fg=red>DOCComment is missing</fg=red>'); | 
                                                        
| 37 | 37 | |
| 38 | 38 | return self::FAILURE;  | 
                                                        
@@ -40,7 +40,7 @@ discard block  | 
                                                    ||
| 40 | 40 | |
| 41 | 41 | $filename = $trait->getFileName();  | 
                                                        
| 42 | 42 | |
| 43 | -        try { | 
                                                        |
| 43 | +        try{ | 
                                                        |
| 44 | 44 | \file_put_contents(  | 
                                                        
| 45 | 45 | $filename,  | 
                                                        
| 46 | 46 | \str_replace(  | 
                                                        
@@ -49,18 +49,18 @@ discard block  | 
                                                    ||
| 49 | 49 | \file_get_contents($filename)  | 
                                                        
| 50 | 50 | )  | 
                                                        
| 51 | 51 | );  | 
                                                        
| 52 | -        } catch (\Throwable $e) { | 
                                                        |
| 53 | -            $this->write('<fg=red>' . $e->getMessage() . "</fg=red>\n"); | 
                                                        |
| 52 | +        }catch (\Throwable $e){ | 
                                                        |
| 53 | +            $this->write('<fg=red>'.$e->getMessage()."</fg=red>\n"); | 
                                                        |
| 54 | 54 | |
| 55 | 55 | return self::FAILURE;  | 
                                                        
| 56 | 56 | }  | 
                                                        
| 57 | 57 | |
| 58 | 58 |          $this->write("<fg=green>complete</fg=green>\n"); | 
                                                        
| 59 | 59 | |
| 60 | -        if ($this->isVerbose()) { | 
                                                        |
| 60 | +        if ($this->isVerbose()){ | 
                                                        |
| 61 | 61 | $grid = $this->table(['Property:', 'Target:']);  | 
                                                        
| 62 | 62 | |
| 63 | -            foreach ($dependencies as $dependency) { | 
                                                        |
| 63 | +            foreach ($dependencies as $dependency){ | 
                                                        |
| 64 | 64 | $grid->addRow([$dependency->var, $dependency->type->fullName]);  | 
                                                        
| 65 | 65 | }  | 
                                                        
| 66 | 66 | |
@@ -78,7 +78,7 @@ discard block  | 
                                                    ||
| 78 | 78 | );  | 
                                                        
| 79 | 79 |          $an->lines[] = new Annotation\Line(''); | 
                                                        
| 80 | 80 | |
| 81 | -        foreach ($dependencies as $dependency) { | 
                                                        |
| 81 | +        foreach ($dependencies as $dependency){ | 
                                                        |
| 82 | 82 | $an->lines[] = new Annotation\Line(  | 
                                                        
| 83 | 83 |                  \sprintf('\\%s $%s', $dependency->type->fullName, $dependency->var), | 
                                                        
| 84 | 84 | 'property'  | 
                                                        
@@ -22,7 +22,8 @@ discard block  | 
                                                    ||
| 22 | 22 | public function perform(): int  | 
                                                        
| 23 | 23 |      { | 
                                                        
| 24 | 24 | $dependencies = $this->getRegistry()->getPropertyBindings();  | 
                                                        
| 25 | -        if ($dependencies === []) { | 
                                                        |
| 25 | + if ($dependencies === [])  | 
                                                        |
| 26 | +        { | 
                                                        |
| 26 | 27 |              $this->writeln('<comment>No prototyped shortcuts found.</comment>'); | 
                                                        
| 27 | 28 | |
| 28 | 29 | return self::SUCCESS;  | 
                                                        
@@ -32,7 +33,8 @@ discard block  | 
                                                    ||
| 32 | 33 | |
| 33 | 34 | $trait = new \ReflectionClass(PrototypeTrait::class);  | 
                                                        
| 34 | 35 | $docComment = $trait->getDocComment();  | 
                                                        
| 35 | -        if ($docComment === false) { | 
                                                        |
| 36 | + if ($docComment === false)  | 
                                                        |
| 37 | +        { | 
                                                        |
| 36 | 38 |              $this->write('<fg=red>DOCComment is missing</fg=red>'); | 
                                                        
| 37 | 39 | |
| 38 | 40 | return self::FAILURE;  | 
                                                        
@@ -40,7 +42,8 @@ discard block  | 
                                                    ||
| 40 | 42 | |
| 41 | 43 | $filename = $trait->getFileName();  | 
                                                        
| 42 | 44 | |
| 43 | -        try { | 
                                                        |
| 45 | + try  | 
                                                        |
| 46 | +        { | 
                                                        |
| 44 | 47 | \file_put_contents(  | 
                                                        
| 45 | 48 | $filename,  | 
                                                        
| 46 | 49 | \str_replace(  | 
                                                        
@@ -49,7 +52,9 @@ discard block  | 
                                                    ||
| 49 | 52 | \file_get_contents($filename)  | 
                                                        
| 50 | 53 | )  | 
                                                        
| 51 | 54 | );  | 
                                                        
| 52 | -        } catch (\Throwable $e) { | 
                                                        |
| 55 | + }  | 
                                                        |
| 56 | + catch (\Throwable $e)  | 
                                                        |
| 57 | +        { | 
                                                        |
| 53 | 58 |              $this->write('<fg=red>' . $e->getMessage() . "</fg=red>\n"); | 
                                                        
| 54 | 59 | |
| 55 | 60 | return self::FAILURE;  | 
                                                        
@@ -57,10 +62,12 @@ discard block  | 
                                                    ||
| 57 | 62 | |
| 58 | 63 |          $this->write("<fg=green>complete</fg=green>\n"); | 
                                                        
| 59 | 64 | |
| 60 | -        if ($this->isVerbose()) { | 
                                                        |
| 65 | + if ($this->isVerbose())  | 
                                                        |
| 66 | +        { | 
                                                        |
| 61 | 67 | $grid = $this->table(['Property:', 'Target:']);  | 
                                                        
| 62 | 68 | |
| 63 | -            foreach ($dependencies as $dependency) { | 
                                                        |
| 69 | + foreach ($dependencies as $dependency)  | 
                                                        |
| 70 | +            { | 
                                                        |
| 64 | 71 | $grid->addRow([$dependency->var, $dependency->type->fullName]);  | 
                                                        
| 65 | 72 | }  | 
                                                        
| 66 | 73 | |
@@ -78,7 +85,8 @@ discard block  | 
                                                    ||
| 78 | 85 | );  | 
                                                        
| 79 | 86 |          $an->lines[] = new Annotation\Line(''); | 
                                                        
| 80 | 87 | |
| 81 | -        foreach ($dependencies as $dependency) { | 
                                                        |
| 88 | + foreach ($dependencies as $dependency)  | 
                                                        |
| 89 | +        { | 
                                                        |
| 82 | 90 | $an->lines[] = new Annotation\Line(  | 
                                                        
| 83 | 91 |                  \sprintf('\\%s $%s', $dependency->type->fullName, $dependency->var), | 
                                                        
| 84 | 92 | 'property'  | 
                                                        
@@ -35,7 +35,7 @@ discard block  | 
                                                    ||
| 35 | 35 | public function perform(): int  | 
                                                        
| 36 | 36 |      { | 
                                                        
| 37 | 37 | $prototyped = $this->locator->getTargetClasses();  | 
                                                        
| 38 | -        if ($prototyped === []) { | 
                                                        |
| 38 | +        if ($prototyped === []){ | 
                                                        |
| 39 | 39 |              $this->writeln('<comment>No prototyped classes found.</comment>'); | 
                                                        
| 40 | 40 | |
| 41 | 41 | return self::SUCCESS;  | 
                                                        
@@ -43,18 +43,18 @@ discard block  | 
                                                    ||
| 43 | 43 | |
| 44 | 44 | $targets = [];  | 
                                                        
| 45 | 45 | |
| 46 | -        foreach ($prototyped as $class) { | 
                                                        |
| 46 | +        foreach ($prototyped as $class){ | 
                                                        |
| 47 | 47 | $proto = $this->getPrototypeProperties($class, $prototyped);  | 
                                                        
| 48 | -            if (empty($proto)) { | 
                                                        |
| 48 | +            if (empty($proto)){ | 
                                                        |
| 49 | 49 | $modified = $this->modify($class, $proto);  | 
                                                        
| 50 | -                if ($modified !== null) { | 
                                                        |
| 50 | +                if ($modified !== null){ | 
                                                        |
| 51 | 51 | $targets[] = $modified;  | 
                                                        
| 52 | 52 | }  | 
                                                        
| 53 | 53 | continue;  | 
                                                        
| 54 | 54 | }  | 
                                                        
| 55 | 55 | |
| 56 | -            foreach ($proto as $target) { | 
                                                        |
| 57 | -                if ($target instanceof \Throwable) { | 
                                                        |
| 56 | +            foreach ($proto as $target){ | 
                                                        |
| 57 | +                if ($target instanceof \Throwable){ | 
                                                        |
| 58 | 58 | $targets[] = [  | 
                                                        
| 59 | 59 | $class->getName(),  | 
                                                        
| 60 | 60 | $target->getMessage(),  | 
                                                        
@@ -63,7 +63,7 @@ discard block  | 
                                                    ||
| 63 | 63 | continue 2;  | 
                                                        
| 64 | 64 | }  | 
                                                        
| 65 | 65 | |
| 66 | -                if ($target === null) { | 
                                                        |
| 66 | +                if ($target === null){ | 
                                                        |
| 67 | 67 | continue 2;  | 
                                                        
| 68 | 68 | }  | 
                                                        
| 69 | 69 | }  | 
                                                        
@@ -71,14 +71,14 @@ discard block  | 
                                                    ||
| 71 | 71 | $targets[] = [$class->getName(), $this->mergeNames($proto), $this->mergeTargets($proto)];  | 
                                                        
| 72 | 72 | |
| 73 | 73 | $modified = $this->modify($class, $proto);  | 
                                                        
| 74 | -            if ($modified !== null) { | 
                                                        |
| 74 | +            if ($modified !== null){ | 
                                                        |
| 75 | 75 | $targets[] = $modified;  | 
                                                        
| 76 | 76 | }  | 
                                                        
| 77 | 77 | }  | 
                                                        
| 78 | 78 | |
| 79 | -        if (!empty($targets)) { | 
                                                        |
| 79 | +        if (!empty($targets)){ | 
                                                        |
| 80 | 80 | $grid = $this->table(['Class:', 'Property:', 'Target:']);  | 
                                                        
| 81 | -            foreach ($targets as $target) { | 
                                                        |
| 81 | +            foreach ($targets as $target){ | 
                                                        |
| 82 | 82 | $grid->addRow($target);  | 
                                                        
| 83 | 83 | }  | 
                                                        
| 84 | 84 | |
@@ -91,7 +91,7 @@ discard block  | 
                                                    ||
| 91 | 91 | private function modify(\ReflectionClass $class, array $proto): ?array  | 
                                                        
| 92 | 92 |      { | 
                                                        
| 93 | 93 | $classDefinition = $this->extractor->extract($class->getFileName(), $proto);  | 
                                                        
| 94 | -        try { | 
                                                        |
| 94 | +        try{ | 
                                                        |
| 95 | 95 | $modified = $this->injector->injectDependencies(  | 
                                                        
| 96 | 96 | \file_get_contents($class->getFileName()),  | 
                                                        
| 97 | 97 | $classDefinition,  | 
                                                        
@@ -101,7 +101,7 @@ discard block  | 
                                                    ||
| 101 | 101 | \file_put_contents($class->getFileName(), $modified);  | 
                                                        
| 102 | 102 | |
| 103 | 103 | return null;  | 
                                                        
| 104 | -        } catch (\Throwable $e) { | 
                                                        |
| 104 | +        }catch (\Throwable $e){ | 
                                                        |
| 105 | 105 |              return [$class->getName(), $e->getMessage(), \sprintf('%s:L%s', $e->getFile(), $e->getLine())]; | 
                                                        
| 106 | 106 | }  | 
                                                        
| 107 | 107 | }  | 
                                                        
@@ -80,7 +80,7 @@ discard block  | 
                                                    ||
| 80 | 80 | |
| 81 | 81 | public function __construct(  | 
                                                        
| 82 | 82 | private readonly ConfiguratorInterface $config  | 
                                                        
| 83 | -    ) { | 
                                                        |
| 83 | +    ){ | 
                                                        |
| 84 | 84 | }  | 
                                                        
| 85 | 85 | |
| 86 | 86 | public function init(ConsoleBootloader $console): void  | 
                                                        
@@ -124,30 +124,30 @@ discard block  | 
                                                    ||
| 124 | 124 |      { | 
                                                        
| 125 | 125 | $registry = new PrototypeRegistry($container);  | 
                                                        
| 126 | 126 | |
| 127 | -        foreach ($config->getBindings() as $property => $shortcut) { | 
                                                        |
| 128 | -            if (\is_array($shortcut) && isset($shortcut['resolve'])) { | 
                                                        |
| 129 | -                if (isset($shortcut['with'])) { | 
                                                        |
| 127 | +        foreach ($config->getBindings() as $property => $shortcut){ | 
                                                        |
| 128 | +            if (\is_array($shortcut) && isset($shortcut['resolve'])){ | 
                                                        |
| 129 | +                if (isset($shortcut['with'])){ | 
                                                        |
| 130 | 130 | // check dependencies  | 
                                                        
| 131 | -                    foreach ($shortcut['with'] as $dep) { | 
                                                        |
| 132 | -                        if (!\class_exists($dep, true) && !\interface_exists($dep, true)) { | 
                                                        |
| 131 | +                    foreach ($shortcut['with'] as $dep){ | 
                                                        |
| 132 | +                        if (!\class_exists($dep, true) && !\interface_exists($dep, true)){ | 
                                                        |
| 133 | 133 | continue 2;  | 
                                                        
| 134 | 134 | }  | 
                                                        
| 135 | 135 | }  | 
                                                        
| 136 | 136 | }  | 
                                                        
| 137 | 137 | |
| 138 | -                try { | 
                                                        |
| 138 | +                try{ | 
                                                        |
| 139 | 139 | $target = $container->get($shortcut['resolve']);  | 
                                                        
| 140 | -                    if (\is_object($target)) { | 
                                                        |
| 140 | +                    if (\is_object($target)){ | 
                                                        |
| 141 | 141 | $registry->bindProperty($property, $target::class);  | 
                                                        
| 142 | 142 | }  | 
                                                        
| 143 | -                } catch (ContainerExceptionInterface) { | 
                                                        |
| 143 | +                }catch (ContainerExceptionInterface){ | 
                                                        |
| 144 | 144 | continue;  | 
                                                        
| 145 | 145 | }  | 
                                                        
| 146 | 146 | |
| 147 | 147 | continue;  | 
                                                        
| 148 | 148 | }  | 
                                                        
| 149 | 149 | |
| 150 | -            if (\is_string($shortcut) && (\class_exists($shortcut, true) || \interface_exists($shortcut, true))) { | 
                                                        |
| 150 | +            if (\is_string($shortcut) && (\class_exists($shortcut, true) || \interface_exists($shortcut, true))){ | 
                                                        |
| 151 | 151 | $registry->bindProperty($property, $shortcut);  | 
                                                        
| 152 | 152 | }  | 
                                                        
| 153 | 153 | }  | 
                                                        
@@ -124,30 +124,40 @@  | 
                                                    ||
| 124 | 124 |      { | 
                                                        
| 125 | 125 | $registry = new PrototypeRegistry($container);  | 
                                                        
| 126 | 126 | |
| 127 | -        foreach ($config->getBindings() as $property => $shortcut) { | 
                                                        |
| 128 | -            if (\is_array($shortcut) && isset($shortcut['resolve'])) { | 
                                                        |
| 129 | -                if (isset($shortcut['with'])) { | 
                                                        |
| 127 | + foreach ($config->getBindings() as $property => $shortcut)  | 
                                                        |
| 128 | +        { | 
                                                        |
| 129 | + if (\is_array($shortcut) && isset($shortcut['resolve']))  | 
                                                        |
| 130 | +            { | 
                                                        |
| 131 | + if (isset($shortcut['with']))  | 
                                                        |
| 132 | +                { | 
                                                        |
| 130 | 133 | // check dependencies  | 
                                                        
| 131 | -                    foreach ($shortcut['with'] as $dep) { | 
                                                        |
| 132 | -                        if (!\class_exists($dep, true) && !\interface_exists($dep, true)) { | 
                                                        |
| 134 | + foreach ($shortcut['with'] as $dep)  | 
                                                        |
| 135 | +                    { | 
                                                        |
| 136 | + if (!\class_exists($dep, true) && !\interface_exists($dep, true))  | 
                                                        |
| 137 | +                        { | 
                                                        |
| 133 | 138 | continue 2;  | 
                                                        
| 134 | 139 | }  | 
                                                        
| 135 | 140 | }  | 
                                                        
| 136 | 141 | }  | 
                                                        
| 137 | 142 | |
| 138 | -                try { | 
                                                        |
| 143 | + try  | 
                                                        |
| 144 | +                { | 
                                                        |
| 139 | 145 | $target = $container->get($shortcut['resolve']);  | 
                                                        
| 140 | -                    if (\is_object($target)) { | 
                                                        |
| 146 | + if (\is_object($target))  | 
                                                        |
| 147 | +                    { | 
                                                        |
| 141 | 148 | $registry->bindProperty($property, $target::class);  | 
                                                        
| 142 | 149 | }  | 
                                                        
| 143 | -                } catch (ContainerExceptionInterface) { | 
                                                        |
| 150 | + }  | 
                                                        |
| 151 | + catch (ContainerExceptionInterface)  | 
                                                        |
| 152 | +                { | 
                                                        |
| 144 | 153 | continue;  | 
                                                        
| 145 | 154 | }  | 
                                                        
| 146 | 155 | |
| 147 | 156 | continue;  | 
                                                        
| 148 | 157 | }  | 
                                                        
| 149 | 158 | |
| 150 | -            if (\is_string($shortcut) && (\class_exists($shortcut, true) || \interface_exists($shortcut, true))) { | 
                                                        |
| 159 | + if (\is_string($shortcut) && (\class_exists($shortcut, true) || \interface_exists($shortcut, true)))  | 
                                                        |
| 160 | +            { | 
                                                        |
| 151 | 161 | $registry->bindProperty($property, $shortcut);  | 
                                                        
| 152 | 162 | }  | 
                                                        
| 153 | 163 | }  |