1 | <?php |
||
12 | class ConfigPersister { |
||
13 | /** @var \Illuminate\Filesystem\Filesystem $filesystem */ |
||
14 | protected $filesystem; |
||
15 | /** @var \App\Satis\Model\ConfigLock */ |
||
16 | protected $configLock; |
||
17 | /** @var \App\Satis\ConfigMirror */ |
||
18 | protected $configMirror; |
||
19 | /** @var \JMS\Serializer\Serializer $serializer */ |
||
20 | protected $serializer; |
||
21 | /** @var string $lockFilename */ |
||
22 | protected $lockFilename; |
||
23 | |||
24 | /** |
||
25 | * @return \App\Satis\Model\ConfigLock|array|\JMS\Serializer\scalar|mixed|object |
||
26 | * @throws \Illuminate\Contracts\Filesystem\FileNotFoundException |
||
27 | */ |
||
28 | protected function getLockFile() { |
||
41 | |||
42 | /** |
||
43 | * @return \Illuminate\Support\Collection |
||
44 | * @throws \Illuminate\Contracts\Filesystem\FileNotFoundException |
||
45 | */ |
||
46 | protected function getLockedRepositories() { |
||
49 | |||
50 | /** |
||
51 | * @param \Illuminate\Filesystem\Filesystem $filesystem |
||
52 | * @param \App\Satis\Model\ConfigLock $configLock |
||
53 | * @param \App\Satis\ConfigMirror $configMirror |
||
54 | * @param \JMS\Serializer\Serializer $serializer |
||
55 | */ |
||
56 | public function __construct(Filesystem $filesystem, ConfigLock $configLock, ConfigMirror $configMirror, |
||
67 | |||
68 | /** |
||
69 | * @return bool |
||
70 | */ |
||
71 | public function isLocked() { |
||
74 | |||
75 | /** |
||
76 | * @param string $repositoryId |
||
77 | */ |
||
78 | public function lock($repositoryId) { |
||
95 | |||
96 | /** |
||
97 | * @param string|null $repositoryId |
||
98 | */ |
||
99 | public function unlock($repositoryId = null) { |
||
115 | |||
116 | /** |
||
117 | * @return string |
||
118 | * @throws \Illuminate\Contracts\Filesystem\FileNotFoundException |
||
119 | */ |
||
120 | public function load() { |
||
125 | |||
126 | /** |
||
127 | * @param string $config |
||
128 | */ |
||
129 | public function updateWith($config) { |
||
135 | } |
||
136 |
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: