1 | <?php |
||
22 | class WebHelper |
||
23 | { |
||
24 | /** @var WebHelperRepository a Repository instance */ |
||
25 | private $repository; |
||
26 | |||
27 | /** @var VersionParser a VersionParser instance */ |
||
28 | private $versionParser; |
||
29 | |||
30 | /** @var Comparator a Comparator instance */ |
||
31 | private $comparator; |
||
32 | |||
33 | /** @var WebServerInterface a Web Server instance */ |
||
34 | private $server; |
||
35 | |||
36 | /** |
||
37 | * Base constructor. |
||
38 | */ |
||
39 | 3 | public function __construct() |
|
44 | |||
45 | /** |
||
46 | * Sets the Repository Instance. |
||
47 | * |
||
48 | * @param string $resDir a Path of a Directives Repository |
||
49 | */ |
||
50 | 3 | public function setRepository($resDir = '') |
|
56 | |||
57 | /** |
||
58 | * Gets the Repository Instance. |
||
59 | * |
||
60 | * @return WebHelperRepository the Repository Instance |
||
61 | */ |
||
62 | 2 | public function getRepository() |
|
66 | |||
67 | /** |
||
68 | * Sets the web server instance. |
||
69 | * |
||
70 | * @param string $server a web server name |
||
71 | * @param string $version a semver-like version |
||
72 | */ |
||
73 | 3 | public function setServer($server, $version) |
|
80 | |||
81 | /** |
||
82 | * Gets the web server instance. |
||
83 | * |
||
84 | * @return WebServerInterface the web server instance |
||
85 | */ |
||
86 | 2 | public function getServer() |
|
90 | |||
91 | /** |
||
92 | * Finds the best template for a web server directive according to its version. |
||
93 | * |
||
94 | * @param string $directive a directive |
||
95 | * @return string the relative path to the template |
||
96 | */ |
||
97 | 2 | public function find($directive) |
|
114 | |||
115 | /** |
||
116 | * Outputs a webserver directive. |
||
117 | * |
||
118 | * @param string $twigFile a relative path of a template |
||
119 | * @param array $params parameters |
||
120 | * @return string the directive output |
||
121 | */ |
||
122 | 1 | public function render($twigFile, array $params = array()) |
|
126 | } |
||
127 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..