@@ -22,7 +22,7 @@ |
||
22 | 22 | $configuration = new Configuration(); |
23 | 23 | $config = $this->processConfiguration($configuration, $configs); |
24 | 24 | |
25 | - $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); |
|
25 | + $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config')); |
|
26 | 26 | $loader->load('services.yml'); |
27 | 27 | } |
28 | 28 | } |
@@ -36,7 +36,7 @@ |
||
36 | 36 | Logger $logger, |
37 | 37 | UserTranslator $userTranslator |
38 | 38 | ) { |
39 | - parent::__construct($clientId, $clientPassword, $baseUrl,$mangoPayApi, $logger); |
|
39 | + parent::__construct($clientId, $clientPassword, $baseUrl, $mangoPayApi, $logger); |
|
40 | 40 | $this->userTranslator = $userTranslator; |
41 | 41 | } |
42 | 42 |
@@ -16,19 +16,11 @@ |
||
16 | 16 | |
17 | 17 | namespace PartFire\MangoPayBundle\Command; |
18 | 18 | |
19 | -use Fruitful\IdentityCheckBundle\Entity\IdentityCheck; |
|
20 | -use Fruitful\IdentityCheckBundle\Entity\Repository\IdentityCheckFactoryRepository; |
|
21 | -use Fruitful\IdentityCheckBundle\Event\IdentityCheckUpdateEvent; |
|
22 | 19 | use PartFire\CommonBundle\Services\Output\Cli\ConsoleOutput; |
23 | 20 | use PartFire\MangoPayBundle\Services\Hook; |
24 | 21 | use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand; |
25 | -use Symfony\Component\Console\Input\InputArgument; |
|
26 | -use Symfony\Component\Console\Input\InputDefinition; |
|
27 | 22 | use Symfony\Component\Console\Input\InputInterface; |
28 | -use Symfony\Component\Console\Input\InputOption; |
|
29 | 23 | use Symfony\Component\Console\Output\OutputInterface; |
30 | -use Symfony\Component\EventDispatcher\EventDispatcher; |
|
31 | -use Symfony\Component\EventDispatcher\EventDispatcherInterface; |
|
32 | 24 | |
33 | 25 | class HookListCommand extends ContainerAwareCommand |
34 | 26 | { |
@@ -40,8 +40,8 @@ |
||
40 | 40 | } |
41 | 41 | |
42 | 42 | /** |
43 | - * @return mixed |
|
44 | - */ |
|
43 | + * @return mixed |
|
44 | + */ |
|
45 | 45 | public function getFirstName() |
46 | 46 | { |
47 | 47 | return $this->firstName; |
@@ -51,7 +51,7 @@ |
||
51 | 51 | |
52 | 52 | /** |
53 | 53 | * @param KycDocumentPage $kycDocumentPage |
54 | - * @return KycDocumentPage|PartFireException |
|
54 | + * @return PartFireException|null |
|
55 | 55 | */ |
56 | 56 | public function create(KycDocumentPage $kycDocumentPage) |
57 | 57 | { |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | KycDocumentPageTranslator $kycDocumentPageTranslator |
47 | 47 | ) { |
48 | 48 | $this->kycDocumentPageTranslator = $kycDocumentPageTranslator; |
49 | - parent::__construct($clientId, $clientPassword, $baseUrl,$mangoPayApi, $logger); |
|
49 | + parent::__construct($clientId, $clientPassword, $baseUrl, $mangoPayApi, $logger); |
|
50 | 50 | } |
51 | 51 | |
52 | 52 | /** |
@@ -58,10 +58,10 @@ discard block |
||
58 | 58 | try { |
59 | 59 | $kycDocumentPage = $this->mangoPayApi->Users->CreateKycPageFromFile($kycDocumentPage->getOwnerId(), $kycDocumentPage->getKycDocumentId(), $kycDocumentPage->getFilePath()); |
60 | 60 | |
61 | - } catch(ResponseException $e) { |
|
61 | + } catch (ResponseException $e) { |
|
62 | 62 | $this->logger->addCritical($e->getMessage(), ['code' => $e->getCode(), 'details' => $e->GetErrorDetails()]); |
63 | 63 | return new PartFireException($e->getMessage(), $e->getCode()); |
64 | - } catch(Exception $e) { |
|
64 | + } catch (Exception $e) { |
|
65 | 65 | $this->logger->addError($e->getMessage()); |
66 | 66 | return new PartFireException($e->getMessage(), $e->getCode()); |
67 | 67 | } |
@@ -55,10 +55,10 @@ |
||
55 | 55 | return $this->payOutTranslator->translateMangoToPayOutDto($createdPayout); |
56 | 56 | } |
57 | 57 | $this->logger->addCritical( |
58 | - "Pay-Out has been created with status: ".$createdPayout->Status . ' (result code: ' . $createdPayout->ResultCode . ')' |
|
58 | + "Pay-Out has been created with status: " . $createdPayout->Status . ' (result code: ' . $createdPayout->ResultCode . ')' |
|
59 | 59 | ); |
60 | 60 | throw new PartFireException( |
61 | - "Pay-Out has been created with status: ".$createdPayout->Status . ' (result code: ' . $createdPayout->ResultCode . ')' |
|
61 | + "Pay-Out has been created with status: " . $createdPayout->Status . ' (result code: ' . $createdPayout->ResultCode . ')' |
|
62 | 62 | ); |
63 | 63 | } |
64 | 64 | $this->logger->addCritical("Failed to create PayOut"); |
@@ -14,8 +14,6 @@ |
||
14 | 14 | |
15 | 15 | namespace PartFire\MangoPayBundle\Services; |
16 | 16 | |
17 | -use Composer\EventDispatcher\Event; |
|
18 | -use Fruitful\FFConstants; |
|
19 | 17 | use PartFire\CommonBundle\Services\Output\CommonOutputInterface; |
20 | 18 | use PartFire\MangoPayBundle\Entity\Hook; |
21 | 19 | use PartFire\MangoPayBundle\Entity\Repository\HookRepository; |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | { |
73 | 73 | $output->info(count($this->getAllNewWebhooks()) . " new hooks to check"); |
74 | 74 | |
75 | - foreach($this->getAllNewWebhooks() as $webHook) { |
|
75 | + foreach ($this->getAllNewWebhooks() as $webHook) { |
|
76 | 76 | $output->infoid(" Processing hook ID " . $webHook->getResourceId() . " - Action Type = " . $webHook->getEventType()); |
77 | 77 | try { |
78 | 78 | $this->processWebhook($webHook, $output); |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | |
91 | 91 | } else { |
92 | 92 | $this->sendErrorMessage( |
93 | - "Received webhook from MangoPay *" . $hook->getEventType() ."*, which is unknown. Firing event anyway \n ```" . json_encode($hook->getRawHookData()) . "```", |
|
93 | + "Received webhook from MangoPay *" . $hook->getEventType() . "*, which is unknown. Firing event anyway \n ```" . json_encode($hook->getRawHookData()) . "```", |
|
94 | 94 | ':anguished:' |
95 | 95 | ); |
96 | 96 | } |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | $this->mangoPayRepositoryFactory->saveAndGetEntity($hook); |
116 | 116 | } |
117 | 117 | |
118 | - private function getIdentityCheckReportByOnfidoReportId(OnfidoHookQueue $onfidoHookQueue) : ?IdentityCheckReport |
|
118 | + private function getIdentityCheckReportByOnfidoReportId(OnfidoHookQueue $onfidoHookQueue) : ? IdentityCheckReport |
|
119 | 119 | { |
120 | 120 | return $this->mangoPayRepositoryFactory->getIdentityCheckReport()->findOneByOnfidoReportId( |
121 | 121 | $onfidoHookQueue->getResourceId() |
@@ -14,20 +14,12 @@ |
||
14 | 14 | |
15 | 15 | namespace PartFire\MangoPayBundle\Command; |
16 | 16 | |
17 | -use Fruitful\IdentityCheckBundle\Entity\IdentityCheck; |
|
18 | -use Fruitful\IdentityCheckBundle\Entity\Repository\IdentityCheckFactoryRepository; |
|
19 | -use Fruitful\IdentityCheckBundle\Event\IdentityCheckUpdateEvent; |
|
20 | 17 | use PartFire\CommonBundle\Services\Output\Cli\ConsoleOutput; |
21 | 18 | use PartFire\MangoPayBundle\MangoPayConstants; |
22 | 19 | use PartFire\MangoPayBundle\Services\Hook; |
23 | 20 | use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand; |
24 | -use Symfony\Component\Console\Input\InputArgument; |
|
25 | -use Symfony\Component\Console\Input\InputDefinition; |
|
26 | 21 | use Symfony\Component\Console\Input\InputInterface; |
27 | -use Symfony\Component\Console\Input\InputOption; |
|
28 | 22 | use Symfony\Component\Console\Output\OutputInterface; |
29 | -use Symfony\Component\EventDispatcher\EventDispatcher; |
|
30 | -use Symfony\Component\EventDispatcher\EventDispatcherInterface; |
|
31 | 23 | |
32 | 24 | class HookCreateAllCommand extends ContainerAwareCommand |
33 | 25 | { |
@@ -14,19 +14,11 @@ |
||
14 | 14 | |
15 | 15 | namespace PartFire\MangoPayBundle\Command; |
16 | 16 | |
17 | -use Fruitful\IdentityCheckBundle\Entity\IdentityCheck; |
|
18 | -use Fruitful\IdentityCheckBundle\Entity\Repository\IdentityCheckFactoryRepository; |
|
19 | -use Fruitful\IdentityCheckBundle\Event\IdentityCheckUpdateEvent; |
|
20 | 17 | use PartFire\CommonBundle\Services\Output\Cli\ConsoleOutput; |
21 | 18 | use PartFire\MangoPayBundle\Services\Hook; |
22 | 19 | use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand; |
23 | -use Symfony\Component\Console\Input\InputArgument; |
|
24 | -use Symfony\Component\Console\Input\InputDefinition; |
|
25 | 20 | use Symfony\Component\Console\Input\InputInterface; |
26 | -use Symfony\Component\Console\Input\InputOption; |
|
27 | 21 | use Symfony\Component\Console\Output\OutputInterface; |
28 | -use Symfony\Component\EventDispatcher\EventDispatcher; |
|
29 | -use Symfony\Component\EventDispatcher\EventDispatcherInterface; |
|
30 | 22 | |
31 | 23 | class HookUpdateAllCommand extends ContainerAwareCommand |
32 | 24 | { |
@@ -55,7 +55,7 @@ |
||
55 | 55 | $responses = []; |
56 | 56 | |
57 | 57 | $hookItems = $this->getHookService()->list(); |
58 | - foreach($hookItems as $hook) { |
|
58 | + foreach ($hookItems as $hook) { |
|
59 | 59 | $hookId = $hook->Id; |
60 | 60 | $this->output->infoid("Updating Hook ID " . $hookId . " with " . $url); |
61 | 61 | try { |