1 | <?php |
||
24 | class Language |
||
25 | { |
||
26 | use Log; |
||
27 | |||
28 | /** |
||
29 | * Container of the loaded language files |
||
30 | * |
||
31 | * @var array |
||
32 | */ |
||
33 | private $is_loaded = array(); |
||
34 | |||
35 | /** |
||
36 | * Container for the various languages |
||
37 | * |
||
38 | * @var unknown |
||
39 | */ |
||
40 | private $language = array(); |
||
41 | |||
42 | /** |
||
43 | * Sets up the Language object |
||
44 | * |
||
45 | * @param array $paths |
||
46 | */ |
||
47 | public function __construct($paths = array()) |
||
48 | { |
||
49 | if (! is_array($paths)) { |
||
50 | $paths = array( |
||
51 | $paths |
||
52 | ); |
||
53 | } |
||
54 | |||
55 | foreach($paths As $path) { |
||
56 | $this->init($path); |
||
57 | }; |
||
58 | } |
||
59 | |||
60 | /** |
||
61 | * Loads a language array file for use |
||
62 | * |
||
63 | * @param string $path |
||
64 | * The path to the language direcotry to load |
||
65 | * @return void|unknown|boolean |
||
66 | */ |
||
67 | public function init($path) |
||
98 | |||
99 | /** |
||
100 | * Fetch a single line of text from the language array |
||
101 | * |
||
102 | * @param string $line |
||
103 | * line |
||
104 | * @return string |
||
105 | */ |
||
106 | public function __($line = '') |
||
111 | } |
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..