| Conditions | 4 |
| Paths | 6 |
| Total Lines | 10 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 4 |
| Changes | 0 | ||
| 1 | <?php |
||
| 20 | 5 | public function execute(InputInterface $input, OutputInterface $output) |
|
| 21 | { |
||
| 22 | 5 | $optionValue = $input->getOption('dir'); |
|
| 23 | 5 | if($optionValue){ |
|
| 24 | 2 | $this->getProject()->setDirectoryPath(getcwd() . DIRECTORY_SEPARATOR . $optionValue); |
|
| 25 | 5 | }elseif($this->getProject()->getName()){ |
|
| 26 | 2 | $this->getProject()->setDirectoryPath(getcwd() . DIRECTORY_SEPARATOR . $this->getProject()->getName()); |
|
| 27 | 2 | } |
|
| 28 | 5 | return $this->getProject()->getDirectoryPath() ? ITask::NO_ERROR_CODE : ITask::BLOCKING_ERROR_CODE; |
|
| 29 | } |
||
| 30 | } |
||
| 31 |