LD hace 5 años
padre
commit
a7438e1f96
Se han modificado 1 ficheros con 3 adiciones y 3 borrados
  1. 3 3
      app/Services/StationRuleBatchService.php

+ 3 - 3
app/Services/StationRuleBatchService.php

@@ -16,7 +16,7 @@ class StationRuleBatchService
     {
         $batchType = $batch['type'] ?? 'null';
         $ownerId = $batch['owner_id'] ?? 'null';
-        return Cache::remember('stationRuleBatch_batchType_'.$batchType.'_ownerId_'.$ownerId, config('cache.expirations.rarelyChange'),function($batch){
+        return Cache::remember('stationRuleBatch_batchType_'.$batchType.'_ownerId_'.$ownerId, config('cache.expirations.rarelyChange'),function()use($batch){
             return StationRuleBatch::query()->with('stationType')
                 ->where('batch_type',$batch['type'])
                 ->where('owner_id',$batch['owner_id'])
@@ -31,10 +31,10 @@ class StationRuleBatchService
     }
 
     /**
-     * @param Batch[] $batches
+     * @param Collection $batches
      * @return Collection Batches
      */
-    function getBatches_shouldProcess(array $batches): Collection
+    function getBatches_shouldProcess(Collection $batches): Collection
     {
         $batches_toProcess=collect();
         foreach ($batches as $batch){