1 | <?php |
||
31 | abstract class WeatherAbstract |
||
32 | { |
||
33 | /** |
||
34 | * @internal |
||
35 | * @var NullCacheItemPool |
||
36 | */ |
||
37 | protected $cache = null; |
||
38 | |||
39 | /** |
||
40 | * @internal |
||
41 | * @var LoggerInterface |
||
42 | */ |
||
43 | protected $logger = null; |
||
44 | |||
45 | /** |
||
46 | * @internal |
||
47 | * @var string |
||
48 | */ |
||
49 | protected $lang = 'en'; |
||
50 | |||
51 | /** |
||
52 | * @internal |
||
53 | * @var string |
||
54 | */ |
||
55 | protected $units = 'si'; |
||
56 | |||
57 | /** Нет осадков */ |
||
58 | const PRECIP_TYPE_NONE = 0; |
||
59 | /** Дождь */ |
||
60 | const PRECIP_TYPE_RAIN = 1; |
||
61 | /** Снег */ |
||
62 | const PRECIP_TYPE_SNOW = 2; |
||
63 | /** Снег с дождём */ |
||
64 | const PRECIP_TYPE_SLEET = 3; |
||
65 | /** Град */ |
||
66 | const PRECIP_TYPE_HAIL = 4; |
||
67 | |||
68 | /** |
||
69 | * |
||
70 | * |
||
71 | * @param CacheItemPoolInterface|null $cache Экземпляра класса кэширования по стандарту PSR-6 |
||
72 | * @param LoggerInterface|null $logger Экземляр класса логера сандарта PSR-3 |
||
73 | * |
||
74 | * @api |
||
75 | */ |
||
76 | public function __construct(CacheItemPoolInterface $cache = null, LoggerInterface $logger = null) |
||
81 | |||
82 | /** |
||
83 | * Возвращает код языка |
||
84 | * |
||
85 | * @api |
||
86 | * |
||
87 | * @return string |
||
88 | */ |
||
89 | public function getLang() |
||
93 | |||
94 | /** |
||
95 | * @api |
||
96 | * @param string $lang |
||
97 | */ |
||
98 | public function setLang($lang) |
||
103 | |||
104 | /** |
||
105 | * @api |
||
106 | * |
||
107 | * @return string |
||
108 | */ |
||
109 | public function getUnits() |
||
113 | |||
114 | /** |
||
115 | * Возвращает объект с описанием текущей погоды |
||
116 | * |
||
117 | * @param Point $point Класс с коорденатами места для которой запрашивается погода |
||
118 | * |
||
119 | * @api |
||
120 | * @return \Forecast\Current|null Объект с текущей погодой |
||
121 | */ |
||
122 | public function getCurrent(Point $point) |
||
131 | |||
132 | /** |
||
133 | * @api |
||
134 | * @return Hourly |
||
135 | */ |
||
136 | public function getHourly(Point $point, $forse = false) |
||
145 | |||
146 | |||
147 | /** |
||
148 | * @api |
||
149 | * |
||
150 | * @param string $units |
||
151 | * @return $this |
||
152 | */ |
||
153 | public function setUnits($units) |
||
158 | |||
159 | /** |
||
160 | * @param Point $point |
||
161 | * |
||
162 | * @internal |
||
163 | * @return Current |
||
164 | */ |
||
165 | abstract protected function doFetchCurrent(Point $point); |
||
166 | |||
167 | /** |
||
168 | * @param Point $point |
||
169 | * @return Hourly |
||
170 | */ |
||
171 | abstract protected function doFetchHourly(Point $point); |
||
172 | |||
173 | /** |
||
174 | * @param Point $point |
||
175 | * |
||
176 | * @internal |
||
177 | * @return string |
||
178 | */ |
||
179 | abstract protected function getCacheKeyCurrent(Point $point); |
||
180 | |||
181 | /** |
||
182 | * @param Point $point |
||
183 | * |
||
184 | * @internal |
||
185 | * @return string |
||
186 | */ |
||
187 | abstract protected function getCacheKeyHourly(Point $point); |
||
188 | |||
189 | /** |
||
190 | * |
||
191 | * @internal |
||
192 | * @return \DateTime |
||
193 | */ |
||
194 | abstract protected function getCacheExpirationCurrent(); |
||
195 | |||
196 | /** |
||
197 | * |
||
198 | * @internal |
||
199 | * @return \DateTime |
||
200 | */ |
||
201 | abstract protected function getCacheExpirationHourly(); |
||
202 | |||
203 | |||
204 | |||
205 | /* abstract public function getDaily(); |
||
206 | |||
207 | abstract public function getHistory();*/ |
||
208 | |||
209 | public function calcDewPoint($h) |
||
213 | } |
||
214 |
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..