| Conditions | 2 | 
| Paths | 2 | 
| Total Lines | 10 | 
| Code Lines | 7 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Changes | 1 | ||
| Bugs | 0 | Features | 0 | 
| 1 | <?php  | 
            ||
| 18 | public function process(ItemHolderInterface $itemHolder, PurchaseContext $context)  | 
            ||
| 19 |     { | 
            ||
| 20 | $Order = $itemHolder;  | 
            ||
| 21 | $Customer = $context->getUser();  | 
            ||
| 22 |         if ($Customer->getPoint() < $Order->getUsePoint()) { | 
            ||
| 23 |             return ProcessResult::error('利用ポイントが所有ポイントを上回っています.'); | 
            ||
| 24 | }  | 
            ||
| 25 | $Customer->setPoint($Customer->getPoint() + $Order->getUsePoint() * -1);  | 
            ||
| 26 | return ProcessResult::success();  | 
            ||
| 
                                                                                                    
                        
                         | 
                |||
| 27 | }  | 
            ||
| 28 | }  | 
            ||
| 29 |