1 | <?php |
||
24 | class YmlCatalog extends Object |
||
25 | { |
||
26 | /** |
||
27 | * @var BaseFileStream |
||
28 | */ |
||
29 | public $handle; |
||
30 | /** |
||
31 | * @var string |
||
32 | */ |
||
33 | public $shopClass; |
||
34 | /** |
||
35 | * @var string |
||
36 | */ |
||
37 | public $currencyClass; |
||
38 | /** |
||
39 | * @var string |
||
40 | */ |
||
41 | public $categoryClass; |
||
42 | /** |
||
43 | * @var string |
||
44 | */ |
||
45 | public $offerClass; |
||
46 | /** |
||
47 | * @var null|string |
||
48 | */ |
||
49 | public $date; |
||
50 | |||
51 | /** |
||
52 | * @var null|callable |
||
53 | */ |
||
54 | public $onValidationError; |
||
55 | |||
56 | /** |
||
57 | * @var null|string |
||
58 | */ |
||
59 | public $customOfferClass; |
||
60 | |||
61 | /** |
||
62 | * @var null|string |
||
63 | */ |
||
64 | public $deliveryOptionClass; |
||
65 | |||
66 | /** |
||
67 | * @return null|string |
||
68 | */ |
||
69 | protected function getFormattedDate() |
||
79 | |||
80 | /** |
||
81 | * @throws Exception |
||
82 | 9 | */ |
|
83 | 9 | public function generate() |
|
106 | 9 | ||
107 | 9 | /** |
|
108 | 9 | * @param string $string |
|
109 | 9 | * @throws \Exception |
|
110 | 9 | */ |
|
111 | 9 | protected function write($string) |
|
115 | 9 | ||
116 | 9 | /** |
|
117 | 9 | * @param string $string tag name |
|
118 | 4 | */ |
|
119 | 6 | protected function writeTag($string) |
|
123 | 6 | ||
124 | /** |
||
125 | * @param BaseModel $model |
||
126 | * @param $valuesModel |
||
127 | * @throws Exception |
||
128 | 9 | */ |
|
129 | protected function writeModel(BaseModel $model, $valuesModel) |
||
136 | 9 | ||
137 | protected function writeTags($tags) |
||
154 | 9 | ||
155 | /** |
||
156 | * @param string|array $modelClass class name or yii configuration array. You can also set params: |
||
157 | * `findParams`: array of additional find params; |
||
158 | * `query`: ActiveQuery object to generate yml use already created object; |
||
159 | * `dataProvider`: ActiveDataProvider or true to generate yml with pagination; |
||
160 | */ |
||
161 | 9 | protected function writeEachModel($modelClass) |
|
218 | |||
219 | 9 | /** |
|
220 | * @param $modelClass |
||
221 | 9 | * @return Category|Currency|SimpleOffer |
|
222 | 9 | * @throws Exception |
|
223 | 6 | */ |
|
224 | 9 | protected function getNewModel($modelClass) |
|
232 | |||
233 | /** |
||
234 | 9 | * Performs PHP memory garbage collection. |
|
235 | */ |
||
236 | protected function gc() |
||
243 | } |
||
244 |
If a method or function can return multiple different values and unless you are sure that you only can receive a single value in this context, we recommend to add an additional type check:
If this a common case that PHP Analyzer should handle natively, please let us know by opening an issue.