| 1 |  |  | <?php | 
            
                                                                                                            
                            
            
                                    
            
            
                | 2 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 3 |  |  | /** | 
            
                                                                                                            
                            
            
                                    
            
            
                | 4 |  |  |  * MIT License | 
            
                                                                                                            
                            
            
                                    
            
            
                | 5 |  |  |  * Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file. | 
            
                                                                                                            
                            
            
                                    
            
            
                | 6 |  |  |  */ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 7 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 8 |  |  | namespace SprykerEco\Zed\Computop\Persistence; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 9 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 10 |  |  | use Generated\Shared\Transfer\ComputopNotificationTransfer; | 
                            
                    |  |  |  | 
                                                                                        
                                                                                     | 
            
                                                                                                            
                            
            
                                    
            
            
                | 11 |  |  | use Generated\Shared\Transfer\ComputopPaymentComputopDetailTransfer; | 
                            
                    |  |  |  | 
                                                                                        
                                                                                     | 
            
                                                                                                            
                            
            
                                    
            
            
                | 12 |  |  | use Generated\Shared\Transfer\ComputopPaymentComputopOrderItemTransfer; | 
                            
                    |  |  |  | 
                                                                                        
                                                                                     | 
            
                                                                                                            
                            
            
                                    
            
            
                | 13 |  |  | use Generated\Shared\Transfer\ComputopPaymentComputopTransfer; | 
                            
                    |  |  |  | 
                                                                                        
                                                                                     | 
            
                                                                                                            
                            
            
                                    
            
            
                | 14 |  |  | use Orm\Zed\Computop\Persistence\SpyPaymentComputopOrderItem; | 
                            
                    |  |  |  | 
                                                                                        
                                                                                     | 
            
                                                                                                            
                            
            
                                    
            
            
                | 15 |  |  | use Spryker\Zed\Kernel\Persistence\AbstractEntityManager; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 16 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 17 |  |  | /** | 
            
                                                                                                            
                            
            
                                    
            
            
                | 18 |  |  |  * @method \SprykerEco\Zed\Computop\Persistence\ComputopPersistenceFactory getFactory() | 
            
                                                                                                            
                            
            
                                    
            
            
                | 19 |  |  |  */ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 20 |  |  | class ComputopEntityManager extends AbstractEntityManager implements ComputopEntityManagerInterface | 
            
                                                                                                            
                            
            
                                    
            
            
                | 21 |  |  | { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 22 |  |  |     /** | 
            
                                                                                                            
                            
            
                                    
            
            
                | 23 |  |  |      * @param \Generated\Shared\Transfer\ComputopNotificationTransfer $computopNotificationTransfer | 
            
                                                                                                            
                            
            
                                    
            
            
                | 24 |  |  |      * | 
            
                                                                                                            
                            
            
                                    
            
            
                | 25 |  |  |      * @return void | 
            
                                                                                                            
                            
            
                                    
            
            
                | 26 |  |  |      */ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 27 |  |  |     public function savePaymentComputopNotification(ComputopNotificationTransfer $computopNotificationTransfer): void | 
            
                                                                                                            
                            
            
                                    
            
            
                | 28 |  |  |     { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 29 |  |  |         $paymentComputopNotificationEntity = $this->getFactory() | 
            
                                                                                                            
                            
            
                                    
            
            
                | 30 |  |  |             ->getPaymentComputopNotificationQuery() | 
            
                                                                                                            
                            
            
                                    
            
            
                | 31 |  |  |             ->filterByPayId($computopNotificationTransfer->getPayId()) | 
            
                                                                                                            
                            
            
                                    
            
            
                | 32 |  |  |             ->filterByTransId($computopNotificationTransfer->getTransId()) | 
            
                                                                                                            
                            
            
                                    
            
            
                | 33 |  |  |             ->filterByXId($computopNotificationTransfer->getXId()) | 
            
                                                                                                            
                            
            
                                    
            
            
                | 34 |  |  |             ->findOneOrCreate(); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 35 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 36 |  |  |         $paymentComputopNotificationEntity->fromArray( | 
            
                                                                                                            
                            
            
                                    
            
            
                | 37 |  |  |             $computopNotificationTransfer->modifiedToArray(), | 
            
                                                                                                            
                            
            
                                    
            
            
                | 38 |  |  |         ); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 39 |  |  |         $paymentComputopNotificationEntity->save(); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 40 |  |  |     } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 41 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 42 |  |  |     /** | 
            
                                                                                                            
                            
            
                                    
            
            
                | 43 |  |  |      * @param \Generated\Shared\Transfer\ComputopPaymentComputopDetailTransfer $computopPaymentComputopDetailTransfer | 
            
                                                                                                            
                            
            
                                    
            
            
                | 44 |  |  |      * | 
            
                                                                                                            
                            
            
                                    
            
            
                | 45 |  |  |      * @return void | 
            
                                                                                                            
                            
            
                                    
            
            
                | 46 |  |  |      */ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 47 |  |  |     public function updateComputopPaymentDetail( | 
            
                                                                                                            
                            
            
                                    
            
            
                | 48 |  |  |         ComputopPaymentComputopDetailTransfer $computopPaymentComputopDetailTransfer | 
            
                                                                                                            
                            
            
                                    
            
            
                | 49 |  |  |     ): void { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 50 |  |  |         $computopPaymentComputopDetailEntity = $this->getFactory() | 
            
                                                                                                            
                            
            
                                    
            
            
                | 51 |  |  |             ->getPaymentComputopDetailQuery() | 
            
                                                                                                            
                            
            
                                    
            
            
                | 52 |  |  |             ->filterByIdPaymentComputop($computopPaymentComputopDetailTransfer->getIdPaymentComputop()) | 
            
                                                                                                            
                            
            
                                    
            
            
                | 53 |  |  |             ->findOne(); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 54 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 55 |  |  |         if ($computopPaymentComputopDetailEntity === null) { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 56 |  |  |             return; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 57 |  |  |         } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 58 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 59 |  |  |         $computopPaymentComputopDetailEntity = $this->getFactory() | 
            
                                                                                                            
                            
            
                                    
            
            
                | 60 |  |  |             ->createComputopMapper() | 
            
                                                                                                            
                            
            
                                    
            
            
                | 61 |  |  |             ->mapComputopPaymentComputopDetailTransferToPaymentComputopDetailEntity( | 
            
                                                                                                            
                            
            
                                    
            
            
                | 62 |  |  |                 $computopPaymentComputopDetailTransfer, | 
            
                                                                                                            
                            
            
                                    
            
            
                | 63 |  |  |                 $computopPaymentComputopDetailEntity, | 
            
                                                                                                            
                            
            
                                    
            
            
                | 64 |  |  |             ); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 65 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 66 |  |  |         $computopPaymentComputopDetailEntity->save(); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 67 |  |  |     } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 68 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 69 |  |  |     /** | 
            
                                                                                                            
                            
            
                                    
            
            
                | 70 |  |  |      * @param \Generated\Shared\Transfer\ComputopPaymentComputopTransfer $computopPaymentComputopTransfer | 
            
                                                                                                            
                            
            
                                    
            
            
                | 71 |  |  |      * | 
            
                                                                                                            
                            
            
                                    
            
            
                | 72 |  |  |      * @return void | 
            
                                                                                                            
                                                                
            
                                    
            
            
                | 73 |  |  |      */ | 
            
                                                                        
                            
            
                                    
            
            
                | 74 |  |  |     public function updateComputopPayment(ComputopPaymentComputopTransfer $computopPaymentComputopTransfer): void | 
            
                                                                        
                            
            
                                    
            
            
                | 75 |  |  |     { | 
            
                                                                        
                            
            
                                    
            
            
                | 76 |  |  |         $computopPaymentComputopEntity = $this->getFactory() | 
            
                                                                        
                            
            
                                    
            
            
                | 77 |  |  |             ->getPaymentComputopQuery() | 
            
                                                                        
                            
            
                                    
            
            
                | 78 |  |  |             ->filterByTransId($computopPaymentComputopTransfer->getTransId()) | 
            
                                                                        
                            
            
                                    
            
            
                | 79 |  |  |             ->findOne(); | 
            
                                                                        
                            
            
                                    
            
            
                | 80 |  |  |  | 
            
                                                                        
                            
            
                                    
            
            
                | 81 |  |  |         if ($computopPaymentComputopEntity === null) { | 
            
                                                                        
                            
            
                                    
            
            
                | 82 |  |  |             return; | 
            
                                                                        
                            
            
                                    
            
            
                | 83 |  |  |         } | 
            
                                                                        
                            
            
                                    
            
            
                | 84 |  |  |  | 
            
                                                                        
                            
            
                                    
            
            
                | 85 |  |  |         $computopPaymentComputopEntity = $this->getFactory() | 
            
                                                                        
                            
            
                                    
            
            
                | 86 |  |  |             ->createComputopMapper() | 
            
                                                                        
                            
            
                                    
            
            
                | 87 |  |  |             ->mapComputopPaymentTransferToComputopPaymentEntity( | 
            
                                                                        
                            
            
                                    
            
            
                | 88 |  |  |                 $computopPaymentComputopTransfer, | 
            
                                                                        
                            
            
                                    
            
            
                | 89 |  |  |                 $computopPaymentComputopEntity, | 
            
                                                                        
                            
            
                                    
            
            
                | 90 |  |  |             ); | 
            
                                                                        
                            
            
                                    
            
            
                | 91 |  |  |  | 
            
                                                                        
                            
            
                                    
            
            
                | 92 |  |  |         $computopPaymentComputopEntity->save(); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 93 |  |  |     } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 94 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 95 |  |  |     /** | 
            
                                                                                                            
                            
            
                                    
            
            
                | 96 |  |  |      * @param \Generated\Shared\Transfer\ComputopPaymentComputopOrderItemTransfer $computopPaymentComputopOrderItemTransfer | 
            
                                                                                                            
                            
            
                                    
            
            
                | 97 |  |  |      * | 
            
                                                                                                            
                            
            
                                    
            
            
                | 98 |  |  |      * @return void | 
            
                                                                                                            
                            
            
                                    
            
            
                | 99 |  |  |      */ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 100 |  |  |     public function updateComputopPaymentComputopOrderItem( | 
            
                                                                                                            
                            
            
                                    
            
            
                | 101 |  |  |         ComputopPaymentComputopOrderItemTransfer $computopPaymentComputopOrderItemTransfer | 
            
                                                                                                            
                            
            
                                    
            
            
                | 102 |  |  |     ): void { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 103 |  |  |         $paymentComputopOrderItemEntity = $this->getFactory() | 
            
                                                                                                            
                            
            
                                    
            
            
                | 104 |  |  |             ->createComputopMapper() | 
            
                                                                                                            
                            
            
                                    
            
            
                | 105 |  |  |             ->mapComputopPaymentComputopOrderItemTransferToPaymentComputopOrderItemEntity( | 
            
                                                                                                            
                            
            
                                    
            
            
                | 106 |  |  |                 $computopPaymentComputopOrderItemTransfer, | 
            
                                                                                                            
                            
            
                                    
            
            
                | 107 |  |  |                 new SpyPaymentComputopOrderItem(), | 
            
                                                                                                            
                            
            
                                    
            
            
                | 108 |  |  |             ); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 109 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 110 |  |  |         $paymentComputopOrderItemEntity->save(); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 111 |  |  |     } | 
            
                                                                                                            
                                                                
            
                                    
            
            
                | 112 |  |  | } | 
            
                                                        
            
                                    
            
            
                | 113 |  |  |  | 
            
                        
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths