| Conditions | 3 |
| Paths | 3 |
| Total Lines | 18 |
| Code Lines | 10 |
| Lines | 6 |
| Ratio | 33.33 % |
| Changes | 2 | ||
| Bugs | 1 | Features | 1 |
| 1 | <?php |
||
| 29 | public function handle(Configuration $config, array $data) |
||
| 30 | { |
||
| 31 | foreach ($this->getWorkspaceDirectories() as $name => $dir) { |
||
| 32 | $this->logger->info(sprintf( |
||
| 33 | 'WRITING: Creating ‘%s‘ folder', |
||
| 34 | $name |
||
| 35 | )); |
||
| 36 | |||
| 37 | View Code Duplication | if (!General::realiseDirectory($dir, $config->get('write_mode', 'directory'))) { |
|
|
|
|||
| 38 | throw new Exception(sprintf( |
||
| 39 | 'Could not create ‘%s’ directory. Check permission on the root folder.', |
||
| 40 | $name |
||
| 41 | )); |
||
| 42 | } |
||
| 43 | } |
||
| 44 | |||
| 45 | return true; |
||
| 46 | } |
||
| 47 | } |
||
| 48 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: