File tree Expand file tree Collapse file tree 3 files changed +8
-8
lines changed
Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -126,11 +126,11 @@ namespace App\Integrations\MagentoStock;
126126
127127use JustBetter\MagentoStock\Repositories\Repository;
128128use Illuminate\Support\Carbon;
129- use Illuminate\Support\Collection ;
129+ use Illuminate\Support\Enumerable ;
130130
131131class MyStockRepository extends Repository
132132{
133- public function skus(?Carbon $from = null): ?Collection
133+ public function skus(?Carbon $from = null): ?Enumerable
134134 {
135135 return collect(['sku_1', 'sku_2']);
136136 }
Original file line number Diff line number Diff line change 33namespace JustBetter \MagentoStock \Repositories ;
44
55use Illuminate \Support \Carbon ;
6- use Illuminate \Support \Collection ;
6+ use Illuminate \Support \Enumerable ;
77use JustBetter \MagentoStock \Data \StockData ;
88
99abstract class BaseRepository
@@ -63,8 +63,8 @@ public static function resolve(): BaseRepository
6363 return $ instance ;
6464 }
6565
66- /** @return Collection <int, string> */
67- abstract public function skus (?Carbon $ from = null ): Collection ;
66+ /** @return Enumerable <int, string> */
67+ abstract public function skus (?Carbon $ from = null ): Enumerable ;
6868
6969 abstract public function retrieve (string $ sku ): ?StockData ;
7070}
Original file line number Diff line number Diff line change 33namespace JustBetter \MagentoStock \Repositories ;
44
55use Illuminate \Support \Carbon ;
6- use Illuminate \Support \Collection ;
6+ use Illuminate \Support \Enumerable ;
77use JustBetter \MagentoProducts \Models \MagentoProduct ;
88use JustBetter \MagentoStock \Data \StockData ;
99use JustBetter \MagentoStock \Exceptions \NotImplementedException ;
@@ -15,9 +15,9 @@ public function retrieve(string $sku): ?StockData
1515 throw new NotImplementedException ;
1616 }
1717
18- public function skus (?Carbon $ from = null ): Collection
18+ public function skus (?Carbon $ from = null ): Enumerable
1919 {
20- /** @var Collection <int, string> $skus */
20+ /** @var Enumerable <int, string> $skus */
2121 $ skus = MagentoProduct::query ()
2222 ->where ('exists_in_magento ' , '= ' , true )
2323 ->select (['sku ' ])
You can’t perform that action at this time.
0 commit comments