55
66use Magento \Framework \View \Element \Block \ArgumentInterface ;
77use Magento \Framework \Data \OptionSourceInterface ;
8+ use Magento \Store \Model \Store ;
89use Magento \Store \Model \StoreManagerInterface ;
10+ use Magento \Store \Model \Website ;
911
1012class StoreViewOptions implements ArgumentInterface, OptionSourceInterface
1113{
@@ -21,7 +23,7 @@ public function toOptionArray(): array
2123 $ options [] = ['label ' => __ ('All Store Views ' ), 'value ' => '' ];
2224
2325 $ websites = $ this ->storeManager ->getWebsites ();
24- uasort ($ websites , function ($ a , $ b ) {
26+ uasort ($ websites , function (Website $ a , Website $ b ) {
2527 $ soA = (int )$ a ->getSortOrder ();
2628 $ soB = (int )$ b ->getSortOrder ();
2729
@@ -42,7 +44,7 @@ public function toOptionArray(): array
4244 /** @var \Magento\Store\Model\Group $group */
4345
4446 $ stores = $ group ->getStores ();
45- usort ($ stores , function ($ a , $ b ) {
47+ usort ($ stores , function (Store $ a , Store $ b ) {
4648 $ soA = (int )$ a ->getSortOrder ();
4749 $ soB = (int )$ b ->getSortOrder ();
4850
0 commit comments