Conditions | 2 |
Paths | 2 |
Total Lines | 15 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
37 | public function load($key) |
||
38 | { |
||
39 | $cacheId = $this->persister->getIdentifier($key); |
||
40 | |||
41 | $entry = GeneralUtility::makeInstance(CacheManager::class)->getCache('onpage_extension')->get( |
||
42 | $cacheId |
||
43 | ); |
||
44 | |||
45 | if ($entry === false) { |
||
46 | $entry = $this->dataService->getApiResult($key); |
||
47 | $this->persister->persist($entry, $key); |
||
|
|||
48 | } |
||
49 | |||
50 | return json_decode($entry, true); |
||
51 | } |
||
52 | } |
||
53 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: