1 | <?php |
||||
2 | /** |
||||
3 | * API for Billing |
||||
4 | * |
||||
5 | * @link https://github.com/hiqdev/billing-hiapi |
||||
6 | * @package billing-hiapi |
||||
7 | * @license BSD-3-Clause |
||||
8 | * @copyright Copyright (c) 2017-2018, HiQDev (http://hiqdev.com/) |
||||
9 | */ |
||||
10 | |||||
11 | namespace hiqdev\billing\hiapi\price; |
||||
12 | |||||
13 | use hiqdev\php\billing\plan\Plan; |
||||
14 | |||||
15 | /** |
||||
16 | * SinglePrice Hydrator. |
||||
17 | * |
||||
18 | * @author Andrii Vasyliev <[email protected]> |
||||
19 | */ |
||||
20 | class SinglePriceHydrator extends PriceHydrator |
||||
21 | { |
||||
22 | /** |
||||
23 | * {@inheritdoc} |
||||
24 | * @param object|Plan $object |
||||
25 | */ |
||||
26 | public function extract($object) |
||||
27 | { |
||||
28 | return array_merge(parent::extract($object), array_filter([ |
||||
29 | 'prepaid' => $this->hydrator->extract($object->getPrepaid()), |
||||
0 ignored issues
–
show
|
|||||
30 | 'price' => $this->hydrator->extract($object->getPrice()), |
||||
0 ignored issues
–
show
The method
getPrice() does not exist on hiqdev\php\billing\plan\Plan . Did you maybe mean getPrices() ?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces. This is most likely a typographical error or the method has been renamed. ![]() |
|||||
31 | ], static function ($value): bool { |
||||
32 | return $value !== null; |
||||
33 | }, ARRAY_FILTER_USE_BOTH)); |
||||
34 | } |
||||
35 | } |
||||
36 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.