| Conditions | 1 |
| Paths | 1 |
| Total Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 1 |
| Changes | 0 | ||
| 1 | <?php |
||
| 24 | 5 | public function generate($command, $name) |
|
| 25 | { |
||
| 26 | 5 | $config = Arr::get($this->config, $command, []); |
|
| 27 | |||
| 28 | 5 | return new Code( |
|
| 29 | 5 | $name, |
|
| 30 | 5 | $config, |
|
| 31 | 5 | $this->generateDependencies($name, Arr::get($config, 'dependencies', [])), |
|
| 32 | 5 | $this->files, |
|
| 33 | 5 | $this->useSortFixer |
|
| 34 | 5 | ); |
|
| 35 | } |
||
| 36 | |||
| 58 |
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: