Test Failed
Branch feature/v1_stable_fixes (e805e7)
by Diego
04:22
created
src/Repository/SearchableTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -247,7 +247,7 @@
 block discarded – undo
247 247
         if (isset($value[RepositoryInterface::SEARCH_PARAM_FROM], $value[RepositoryInterface::SEARCH_PARAM_TO])) {
248 248
             $from = $value[RepositoryInterface::SEARCH_PARAM_FROM]->format("Y-m-d");
249 249
             $to = $value[RepositoryInterface::SEARCH_PARAM_TO]->format("Y-m-d");
250
-            return "><" .  $from . "|" . $to;
250
+            return "><" . $from . "|" . $to;
251 251
         }
252 252
 
253 253
         if (isset($value[RepositoryInterface::SEARCH_PARAM_FROM])) {
Please login to merge, or discard this patch.
src/Repository/CacheableRepository.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
     public function get(mixed $id): ?AbstractModel
52 52
     {
53 53
         $cache_key = $this->generator->generate($this->repository->getModelClass(), $id);
54
-        return $this->cache->get($cache_key, function (ItemInterface $item) use ($id) {
54
+        return $this->cache->get($cache_key, function(ItemInterface $item) use ($id) {
55 55
             $model = $this->repository->get($id);
56 56
             if ($model) {
57 57
                 $item->set($model);
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
             json_encode($this->getFetchRelations(), JSON_THROW_ON_ERROR)
73 73
         );
74 74
 
75
-        return $this->cache->get($cache_key, function (ItemInterface $item) use ($api_endpoint) {
75
+        return $this->cache->get($cache_key, function(ItemInterface $item) use ($api_endpoint) {
76 76
             $collection = $this->repository->all($api_endpoint);
77 77
             if (!$collection->isEmpty()) {
78 78
                 $item->set($collection);
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
     public function create(AbstractModel $model): ?AbstractModel
96 96
     {
97 97
         $model = $this->repository->create($model);
98
-        if ($model?->isCacheable()) {
98
+        if ($model ? ->isCacheable()) {
99 99
             return $this->cacheModel($model);
100 100
         }
101 101
 
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
     public function update(AbstractModel $model): ?AbstractModel
112 112
     {
113 113
         $model = $this->repository->update($model);
114
-        if ($model?->isCacheable()) {
114
+        if ($model ? ->isCacheable()) {
115 115
             return $this->cacheModel($model);
116 116
         }
117 117
 
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
             json_encode(static::$filter_params, JSON_THROW_ON_ERROR)
151 151
         );
152 152
 
153
-        return $this->cache->get($cache_key, function (ItemInterface $item) {
153
+        return $this->cache->get($cache_key, function(ItemInterface $item) {
154 154
             $search_results = $this->doSearch();
155 155
             if (!$search_results->isEmpty()) {
156 156
                 $item->set($search_results);
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
         $cache_key = $this->generator->generate($model->getEntityName(), $model->getId());
217 217
 
218 218
         $this->cache->delete($cache_key);
219
-        return $this->cache->get($cache_key, function (ItemInterface $item) use ($model) {
219
+        return $this->cache->get($cache_key, function(ItemInterface $item) use ($model) {
220 220
             $item->set($model);
221 221
             $item->expiresAfter($this->getCacheTTL());
222 222
             if ($this->supportsTagging()) {
Please login to merge, or discard this patch.