1 | <?php |
||
14 | class Module extends ExternalModule |
||
15 | { |
||
16 | /** LESS mixin declaration pattern */ |
||
17 | const P_IMPORT_DECLARATION = '/@import\s+(\'|\")(?<path>[^\'\"]+)(\'|\");/'; |
||
18 | |||
19 | /** LESS resource importing dependencies file name */ |
||
20 | const DEPENDENCY_CACHE = 'dependencies'; |
||
21 | |||
22 | /** @var array LESS resources dependencies */ |
||
23 | public $dependencies = []; |
||
24 | |||
25 | /** @var Path to LESS resources dependencies cache file */ |
||
26 | protected $dependencyCache; |
||
27 | |||
28 | /** @var \lessc LESS compiler */ |
||
29 | protected $less; |
||
30 | |||
31 | /** SamsonFramework load preparation stage handler */ |
||
32 | 6 | public function prepare(array $params = []) |
|
49 | |||
50 | /** |
||
51 | * Cache LESS resources importing dependency trees. |
||
52 | */ |
||
53 | 2 | public function cacheDependencies() |
|
57 | |||
58 | /** |
||
59 | * Recursively replace @import in content of the LESS file |
||
60 | * |
||
61 | * @param string $resource Resource full path |
||
62 | * @param string $content less file content |
||
63 | * @param array $tree LESS Tree array pointer |
||
64 | * |
||
65 | * @return string Content of LESS file with included @imported resources |
||
66 | * @throws ResourceNotFound If importing resource could not be found |
||
67 | */ |
||
68 | 4 | protected function readImport($resource, $content, &$tree) |
|
89 | |||
90 | /** |
||
91 | * LESS resource compiler. |
||
92 | * |
||
93 | * @param string $resource Resource full path |
||
94 | * @param string $extension Resource extension |
||
95 | * @param string $content Compiled output resource content |
||
96 | * |
||
97 | * @throws \Exception |
||
98 | */ |
||
99 | 4 | public function compiler($resource, &$extension, &$content) |
|
118 | } |
||
119 |
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..