1 | <?php |
||
25 | class PointHelper |
||
26 | { |
||
27 | /** |
||
28 | * @var BaseInfoRepository |
||
29 | */ |
||
30 | protected $baseInfoReppsitory; |
||
31 | |||
32 | /** |
||
33 | * @var EntityManagerInterface |
||
34 | */ |
||
35 | protected $entityManager; |
||
36 | |||
37 | /** |
||
38 | * PointHelper constructor. |
||
39 | * |
||
40 | * @param BaseInfoRepository $baseInfoReppsitory |
||
41 | * @param EntityManagerInterface $entityManager |
||
42 | */ |
||
43 | public function __construct(BaseInfoRepository $baseInfoReppsitory, EntityManagerInterface $entityManager) |
||
48 | |||
49 | /** |
||
50 | * ポイント設定が有効かどうか. |
||
51 | * |
||
52 | * @return bool |
||
53 | * |
||
54 | * @throws \Doctrine\ORM\NoResultException |
||
55 | * @throws \Doctrine\ORM\NonUniqueResultException |
||
56 | */ |
||
57 | public function isPointEnabled() |
||
63 | |||
64 | /** |
||
65 | * ポイントを金額に変換する. |
||
66 | * |
||
67 | * @param $point ポイント |
||
68 | * |
||
69 | * @return float|int 金額 |
||
70 | * |
||
71 | * @throws \Doctrine\ORM\NoResultException |
||
72 | * @throws \Doctrine\ORM\NonUniqueResultException |
||
73 | */ |
||
74 | public function pointToPrice($point) |
||
80 | |||
81 | /** |
||
82 | * ポイントを値引き額に変換する. マイナス値を返す. |
||
83 | * |
||
84 | * @param $point ポイント |
||
85 | * |
||
86 | * @return float|int 金額 |
||
87 | * |
||
88 | * @throws \Doctrine\ORM\NoResultException |
||
89 | * @throws \Doctrine\ORM\NonUniqueResultException |
||
90 | */ |
||
91 | public function pointToDiscount($point) |
||
95 | |||
96 | /** |
||
97 | * 金額をポイントに変換する. |
||
98 | * |
||
99 | * @param $price |
||
100 | * |
||
101 | * @return float ポイント |
||
102 | * |
||
103 | * @throws \Doctrine\ORM\NoResultException |
||
104 | * @throws \Doctrine\ORM\NonUniqueResultException |
||
105 | */ |
||
106 | public function priceToPoint($price) |
||
112 | |||
113 | /** |
||
114 | * 明細追加処理. |
||
115 | * |
||
116 | * @param ItemHolderInterface $itemHolder |
||
117 | * @param integer $discount |
||
118 | */ |
||
119 | public function addPointDiscountItem(ItemHolderInterface $itemHolder, $discount) |
||
140 | |||
141 | /** |
||
142 | * 既存のポイント明細を削除する. |
||
143 | * |
||
144 | * @param ItemHolderInterface $itemHolder |
||
145 | */ |
||
146 | public function removePointDiscountItem(ItemHolderInterface $itemHolder) |
||
155 | |||
156 | public function prepare(ItemHolderInterface $itemHolder, $point) |
||
162 | |||
163 | public function rollback(ItemHolderInterface $itemHolder, $point) |
||
169 | } |
||
170 |
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: