1 | <?php |
||
28 | class Checkpoint { |
||
29 | |||
30 | const CORE_DIR = 'core'; |
||
31 | const THIRDPARTY_DIR = '3rdparty'; |
||
32 | const APP_DIR = 'apps'; |
||
33 | |||
34 | /** |
||
35 | * @var Locator $locator |
||
36 | */ |
||
37 | protected $locator; |
||
38 | |||
39 | /** |
||
40 | * @var Filesystemhelper $fsHelper |
||
41 | */ |
||
42 | protected $fsHelper; |
||
43 | |||
44 | /** |
||
45 | * |
||
46 | * @param Locator $locator |
||
47 | * @param FilesystemHelper $fsHelper |
||
48 | */ |
||
49 | 2 | public function __construct(Locator $locator, FilesystemHelper $fsHelper){ |
|
53 | |||
54 | /** |
||
55 | * Creates a checkpoint |
||
56 | * @return string |
||
57 | * @throws Exception if base checkpoint directory is not writable |
||
58 | */ |
||
59 | public function create(){ |
||
102 | |||
103 | /** |
||
104 | * Restore a checkpoint by id |
||
105 | * @param string $checkpointId id of checkpoint |
||
106 | * @return array |
||
107 | * @throws UnexpectedValueException if there is no checkpoint with this id |
||
108 | */ |
||
109 | public function restore($checkpointId){ |
||
116 | |||
117 | /** |
||
118 | * Remove a checkpoint by id |
||
119 | * @param string $checkpointId id of checkpoint |
||
120 | * @return array |
||
121 | * @throws UnexpectedValueException if there is no checkpoint with this id |
||
122 | */ |
||
123 | public function remove($checkpointId){ |
||
128 | |||
129 | /** |
||
130 | * Return all checkpoints as an array of items [ 'title', 'date' ] |
||
131 | * @return array |
||
132 | */ |
||
133 | 2 | public function getAll(){ |
|
148 | |||
149 | /** |
||
150 | * Check if there is a checkpoint with a given id |
||
151 | * @param string $checkpointId id of checkpoint |
||
152 | * @return bool |
||
153 | */ |
||
154 | public function checkpointExists($checkpointId){ |
||
157 | |||
158 | /** |
||
159 | * Return array of all checkpoint ids |
||
160 | * @param string $checkpointId id of checkpoint |
||
|
|||
161 | * @return array |
||
162 | */ |
||
163 | 2 | protected function getAllCheckpointIds(){ |
|
175 | |||
176 | /** |
||
177 | * Create an unique checkpoint id |
||
178 | * @param string $checkpointId id of checkpoint |
||
179 | * @return string |
||
180 | */ |
||
181 | protected function createCheckpointId(){ |
||
185 | |||
186 | /** |
||
187 | * Get an absolute path to the checkpoint directory by checkpoint Id |
||
188 | * @param string $checkpointId id of checkpoint |
||
189 | * @return string |
||
190 | */ |
||
191 | 1 | protected function getCheckpointPath($checkpointId){ |
|
194 | |||
195 | /** |
||
196 | * Produce an error on non-existing checkpoints |
||
197 | * @param string $checkpointId id of checkpoint |
||
198 | * @throws UnexpectedValueException if there is no checkpoint with this id |
||
199 | */ |
||
200 | private function assertCheckpointExists($checkpointId){ |
||
206 | } |
||
207 |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter
$italy
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was removed, but the annotation was not.