| Conditions | 1 |
| Paths | 1 |
| Total Lines | 14 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 1 |
| Changes | 0 | ||
| 1 | <?php |
||
| 21 | 2 | public function create(CommandWasCreated $commandWasCreated) |
|
| 22 | { |
||
| 23 | 2 | $classMaker = new CommandHandlerClassMaker($commandWasCreated->getCommand()); |
|
| 24 | 2 | $generateable = $classMaker->generate(new CommandHandler()); |
|
| 25 | 2 | $stringClass = GeneratorClassFactory::create()->generate($generateable); |
|
| 26 | |||
| 27 | 2 | $stringClass = "<?php\n" . $stringClass; |
|
| 28 | |||
| 29 | 2 | (new Filesystem())->dumpFile( |
|
| 30 | 2 | $commandWasCreated->getCommand()->getLocalFileCommandHandler(), |
|
| 31 | 2 | $stringClass |
|
| 32 | ); |
||
| 33 | |||
| 34 | 2 | return true; |
|
| 35 | } |
||
| 41 | } |