Conditions | 3 |
Paths | 3 |
Total Lines | 15 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
33 | public function cloneStaticFiles() |
||
34 | { |
||
35 | $files = $this->flysystem->listContents('generator/templates/static', true); |
||
36 | |||
37 | foreach ($files as $file) { |
||
38 | if ($file['type'] !== 'file') { |
||
39 | continue; |
||
40 | } |
||
41 | |||
42 | $this->flysystem->put( |
||
43 | str_replace('generator/templates/static', 'src', $file['path']), |
||
44 | $this->flysystem->read($file['path']) |
||
45 | ); |
||
46 | } |
||
47 | } |
||
48 | |||
65 |
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: