1 | <?php |
||
22 | class OrientationStorage extends Component |
||
23 | { |
||
24 | const ORIENTATION_HORIZONTAL = 'horizontal'; |
||
25 | const ORIENTATION_VERTICAL = 'vertical'; |
||
26 | |||
27 | public $defaultOrientation = self::ORIENTATION_HORIZONTAL; |
||
28 | |||
29 | /** |
||
30 | * @var string the cache key that will be used to cache storage values |
||
31 | */ |
||
32 | public $cacheKey; |
||
33 | |||
34 | /** |
||
35 | * @var string |
||
36 | */ |
||
37 | public $settingsStorageKey = 'orientations'; |
||
38 | |||
39 | /** |
||
40 | * @var array |
||
41 | */ |
||
42 | protected $storage; |
||
43 | |||
44 | /** |
||
45 | * @inheritdoc |
||
46 | */ |
||
47 | public function init() |
||
53 | |||
54 | /** |
||
55 | * @return \yii\caching\Cache |
||
56 | */ |
||
57 | protected function getCache() |
||
61 | |||
62 | /** |
||
63 | * @return SettingsStorageInterface |
||
64 | */ |
||
65 | protected function getSettingsStorage() |
||
69 | |||
70 | /** |
||
71 | * Ensures that [[storage]] contains actual orientations storage |
||
72 | * |
||
73 | * @return array |
||
74 | */ |
||
75 | private function ensureStorage() |
||
88 | |||
89 | /** |
||
90 | * Saves current [[storage]] |
||
91 | */ |
||
92 | protected function saveStorage() |
||
97 | |||
98 | /** |
||
99 | * Caches current [[storage]] |
||
100 | */ |
||
101 | protected function cache() |
||
105 | |||
106 | /** |
||
107 | * Sets orientation for the $route |
||
108 | * |
||
109 | * @param string $route |
||
110 | * @param string $orientation |
||
111 | */ |
||
112 | public function set($route, $orientation) |
||
119 | |||
120 | /** |
||
121 | * Gets orientation for the $route |
||
122 | * |
||
123 | * @param $route |
||
124 | * @return string |
||
125 | */ |
||
126 | public function get($route) |
||
132 | } |
||
133 |
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..