Passed
Push — master ( 7683d9...8afd7f )
by Carl
03:13
created
DependencyInjection/PartFireMangoPayExtension.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
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
 }
Please login to merge, or discard this patch.
Models/Adapters/UserQuery.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
Command/HookListCommand.php 1 patch
Unused Use Statements   -8 removed lines patch added patch discarded remove patch
@@ -16,19 +16,11 @@
 block discarded – undo
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
 {
Please login to merge, or discard this patch.
Models/DTOs/UserNatural.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -40,8 +40,8 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
Services/HookHandleService.php 2 patches
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -14,8 +14,6 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
     {
88 88
         $output->info(count($this->getAllNewWebhooks()) . " new hooks to check");
89 89
 
90
-        foreach($this->getAllNewWebhooks() as $webHook) {
90
+        foreach ($this->getAllNewWebhooks() as $webHook) {
91 91
             $output->infoid(" Processing hook ID " . $webHook->getResourceId() . " - Action Type = " . $webHook->getEventType());
92 92
             try {
93 93
                 $this->processWebhook($webHook, $output);
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
         if (MangoPayConstants::isEventTypeOk($hook->getEventType())) {
105 105
 
106 106
         } else {
107
-            $errMsg = "Received webhook from MangoPay *" . $hook->getEventType() ."*, which is unknown. Firing event anyway \n ```" . json_encode($hook->getRawHookData()) . "```";
107
+            $errMsg = "Received webhook from MangoPay *" . $hook->getEventType() . "*, which is unknown. Firing event anyway \n ```" . json_encode($hook->getRawHookData()) . "```";
108 108
             $commonOutput->error($errMsg);
109 109
             $this->sendErrorMessage(
110 110
                 $errMsg,
@@ -236,7 +236,7 @@  discard block
 block discarded – undo
236 236
         return $this->mangoPayRepositoryFactory->saveAndGetEntity($hook);
237 237
     }
238 238
 
239
-    private function getIdentityCheckReportByOnfidoReportId(OnfidoHookQueue $onfidoHookQueue) : ?IdentityCheckReport
239
+    private function getIdentityCheckReportByOnfidoReportId(OnfidoHookQueue $onfidoHookQueue) : ? IdentityCheckReport
240 240
     {
241 241
         return $this->mangoPayRepositoryFactory->getIdentityCheckReport()->findOneByOnfidoReportId(
242 242
             $onfidoHookQueue->getResourceId()
Please login to merge, or discard this patch.
Command/HookCreateAllCommand.php 1 patch
Unused Use Statements   -8 removed lines patch added patch discarded remove patch
@@ -14,20 +14,12 @@
 block discarded – undo
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
 {
Please login to merge, or discard this patch.
Command/HookUpdateAllCommand.php 2 patches
Unused Use Statements   -8 removed lines patch added patch discarded remove patch
@@ -14,19 +14,11 @@
 block discarded – undo
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
 {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@
 block discarded – undo
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 {
Please login to merge, or discard this patch.
Models/Adapters/HookQuery.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
         Logger $logger
33 33
 
34 34
     ) {
35
-        parent::__construct($clientId, $clientPassword, $baseUrl,$mangoPayApi, $logger);
35
+        parent::__construct($clientId, $clientPassword, $baseUrl, $mangoPayApi, $logger);
36 36
     }
37 37
 
38 38
     public function list()
Please login to merge, or discard this patch.
MangoPayConstants.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@
 block discarded – undo
74 74
     // Hook Variables
75 75
     // https://docs.mangopay.com/endpoints/v2.01/hooks#e246_the-hook-object
76 76
     const       HOOK_EVENT_TYPE                     = "EventType";
77
-    const       HOOK_RESOURCE_ID                    = "RessourceId";  // Known spelling mistake in MangoPay Api
77
+    const       HOOK_RESOURCE_ID                    = "RessourceId"; // Known spelling mistake in MangoPay Api
78 78
     const       HOOK_DATE                           = "Date";
79 79
 
80 80
     // Event types
Please login to merge, or discard this patch.
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -329,6 +329,9 @@
 block discarded – undo
329 329
         return self::isEventType("PREAUTHORIZATION_", $eventType);
330 330
     }
331 331
 
332
+    /**
333
+     * @param string $compareToEvent
334
+     */
332 335
     private static function isEventType($compareToEvent, $eventName)
333 336
     {
334 337
         $compareToEventLength = strlen($compareToEvent);
Please login to merge, or discard this patch.