1 | <?php |
||
24 | class PoInitSmarty extends PoInitAbstract |
||
25 | { |
||
26 | /** |
||
27 | * @var \Smarty $smarty Smarty 3 object |
||
28 | */ |
||
29 | protected $smarty = null; |
||
30 | |||
31 | /** |
||
32 | * @var string[] $gettextTags tags for gettext constructs, i.e. tag($msgid) |
||
33 | */ |
||
34 | protected $gettextTags = array('gettext', '_'); |
||
35 | |||
36 | /** |
||
37 | * @var string[] $pgettextTags tags for pgettext constructs, i.e. tag($msgctxt, $msgid) |
||
38 | */ |
||
39 | protected $pgettextTags = array(); |
||
40 | |||
41 | /** |
||
42 | * @var string[] $ngettextTags tags for ngettext constructs, i.e. tag($msgid, $msgid_plural) |
||
43 | */ |
||
44 | protected $ngettextTags = array(); |
||
45 | |||
46 | /** |
||
47 | * @var string[] $msgidArgNames names of Smarty function arguments for msgid |
||
48 | */ |
||
49 | protected $msgidArgNames = array('msgid'); |
||
50 | |||
51 | /** |
||
52 | * @var string[] $msgidPluralArgNames names of Smarty function arguments for msgid_plural |
||
53 | */ |
||
54 | protected $msgidPluralArgNames = array('msgid_plural'); |
||
55 | |||
56 | /** |
||
57 | * @var string[] $msgctxtArgNames names of Smarty function argments for msgctxt |
||
58 | */ |
||
59 | protected $msgctxtArgNames = array('msgctxt'); |
||
60 | |||
61 | /** |
||
62 | * Set the Smarty and PoObjects to use in the Init process |
||
63 | * |
||
64 | * @param \Smarty $smarty a fully initialize Smarty 3 instance |
||
65 | * @param PoFile|null $poFile a PoFile object to be used in msginit |
||
66 | */ |
||
67 | 14 | public function __construct(\Smarty $smarty, ?PoFile $poFile = null) |
|
72 | |||
73 | /** |
||
74 | * getMsgctxtArgNames - get argument name(s) used for the msgctxt |
||
75 | * |
||
76 | * @return string[] |
||
77 | */ |
||
78 | 1 | public function getMsgctxtArgNames(): array |
|
82 | |||
83 | /** |
||
84 | * Set argument name(s) used for the msgctxt |
||
85 | * |
||
86 | * @param string[] $argNames array of argument names to set |
||
87 | * |
||
88 | * @return void |
||
89 | */ |
||
90 | 1 | public function setMsgctxtArgNames(array $argNames): void |
|
94 | |||
95 | /** |
||
96 | * Add argument name(s) used for the msgctxt |
||
97 | * |
||
98 | * @param string|string[] $argNames argument name(s) to add |
||
99 | * |
||
100 | * @return void |
||
101 | */ |
||
102 | 1 | public function addMsgctxtArgNames($argNames): void |
|
106 | |||
107 | /** |
||
108 | * Get argument name(s) used for the msgid |
||
109 | * |
||
110 | * @return string[] |
||
111 | */ |
||
112 | 1 | public function getMsgidArgNames(): array |
|
116 | |||
117 | /** |
||
118 | * Set argument name(s) used for the msgid |
||
119 | * |
||
120 | * @param string[] $argNames array of argument names to set |
||
121 | * |
||
122 | * @return void |
||
123 | */ |
||
124 | 1 | public function setMsgidArgNames(array $argNames): void |
|
128 | |||
129 | /** |
||
130 | * Add argument name(s) used for the msgid |
||
131 | * |
||
132 | * @param string|string[] $argNames argument name(s) to add |
||
133 | * |
||
134 | * @return void |
||
135 | */ |
||
136 | 1 | public function addMsgidArgNames($argNames): void |
|
140 | |||
141 | /** |
||
142 | * Get argument name(s) used for the msgid_plural |
||
143 | * |
||
144 | * @return string[] |
||
145 | */ |
||
146 | 1 | public function getMsgidPluralArgNames(): array |
|
150 | |||
151 | /** |
||
152 | * Set argument name(s) used for the msgid_plural |
||
153 | * |
||
154 | * @param string[] $argNames array of argument names to set |
||
155 | * |
||
156 | * @return void |
||
157 | */ |
||
158 | 1 | public function setMsgidPluralArgNames(array $argNames): void |
|
162 | |||
163 | /** |
||
164 | * Add argument name(s) used for the msgid_plural |
||
165 | * |
||
166 | * @param string|string[] $argNames argument name(s) to add |
||
167 | * |
||
168 | * @return void |
||
169 | */ |
||
170 | 1 | public function addMsgidPluralArgNames($argNames): void |
|
174 | |||
175 | /** |
||
176 | * Inspect the supplied source, capture gettext references as a PoFile object. |
||
177 | * |
||
178 | * @param string $source php source code |
||
179 | * @param string $refname source identification used for PO reference comments |
||
180 | * |
||
181 | * @return PoFile |
||
182 | */ |
||
183 | 6 | public function msginitString(string $source, string $refname): PoFile |
|
220 | } |
||
221 |
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..