| 1 | <?php declare(strict_types = 1); |
||
| 10 | class ProcessFactory |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * ProcessFactory constructor. |
||
| 14 | * @param Config $config Configuration Settings. |
||
| 15 | */ |
||
| 16 | public function __construct(Config $config) |
||
| 20 | |||
| 21 | /** |
||
| 22 | * Creates a Git Commit Process that will run on $file. |
||
| 23 | * @param File $file File that the process will execute on. |
||
| 24 | * @return ChurnProcess |
||
| 25 | */ |
||
| 26 | public function createGitCommitProcess(File $file): ChurnProcess |
||
| 34 | |||
| 35 | /** |
||
| 36 | * Creates a Cyclomatic Complexity Process that will run on $file. |
||
| 37 | * @param File $file File that the process will execute on. |
||
| 38 | * @return ChurnProcess |
||
| 39 | */ |
||
| 40 | public function createCyclomaticComplexityProcess(File $file): ChurnProcess |
||
| 50 | } |
||
| 51 |
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: