| 1 | <?php |
||
| 15 | abstract class Manager |
||
| 16 | { |
||
| 17 | /** |
||
| 18 | * @var array |
||
| 19 | */ |
||
| 20 | protected $config; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * @var \Symfony\Component\Filesystem\Filesystem |
||
| 24 | */ |
||
| 25 | protected $fs; |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @var \Symfony\Component\Templating\PhpEngine |
||
| 29 | */ |
||
| 30 | protected $templating; |
||
| 31 | |||
| 32 | /** |
||
| 33 | * Manager constructor. |
||
| 34 | * |
||
| 35 | * @param Filesystem $fs |
||
| 36 | * @param EngineInterface $templating |
||
| 37 | */ |
||
| 38 | 2 | public function __construct(Filesystem $fs, EngineInterface $templating) |
|
| 43 | |||
| 44 | /** |
||
| 45 | * Creates the virtual host related files. |
||
| 46 | * |
||
| 47 | * @param VhostInterface $vhost |
||
| 48 | */ |
||
| 49 | abstract public function createVhost(VhostInterface $vhost); |
||
| 50 | |||
| 51 | /** |
||
| 52 | * Enables the virtual host. |
||
| 53 | * |
||
| 54 | * @param VhostInterface $vhost |
||
| 55 | */ |
||
| 56 | abstract protected function enableVhost(VhostInterface $vhost); |
||
| 57 | |||
| 58 | /** |
||
| 59 | * Deletes all virtual host associated files. |
||
| 60 | * |
||
| 61 | * @param VhostInterface $vhost |
||
| 62 | */ |
||
| 63 | abstract public function deleteVhost(VhostInterface $vhost); |
||
| 64 | |||
| 65 | /** |
||
| 66 | * Lists current virtual hosts. |
||
| 67 | * |
||
| 68 | * @return array [vhost name, enabled] |
||
| 69 | */ |
||
| 70 | abstract public function listVhosts(); |
||
| 71 | |||
| 72 | /** |
||
| 73 | * Gets the generated files for a virtual host. |
||
| 74 | * |
||
| 75 | * @param VhostInterface $vhost |
||
| 76 | * |
||
| 77 | * @return array |
||
| 78 | */ |
||
| 79 | abstract public function getGeneratedFiles(VhostInterface $vhost); |
||
| 80 | |||
| 81 | /** |
||
| 82 | * Restarts web server. |
||
| 83 | */ |
||
| 84 | abstract public function restartServer(); |
||
| 85 | } |
||
| 86 |
Our type inference engine has found a suspicous assignment of a value to a property. This check raises an issue when a value that can be of a given class or a super-class is assigned to a property that is type hinted more strictly.
Either this assignment is in error or an instanceof check should be added for that assignment.