Passed
Push — master ( 5f2738...ad74ba )
by Claude
03:18
created
src/Commands/Worker/ListAll.php 2 patches
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -25,12 +25,12 @@
 block discarded – undo
25 25
     protected function configure()
26 26
     {
27 27
         $this->setName('list')
28
-             ->addArgument(
29
-                  'workerNamePattern',
30
-                  InputArgument::OPTIONAL,
31
-                  'Regex pattern of the worker name',
32
-                  null
33
-             )
28
+                ->addArgument(
29
+                    'workerNamePattern',
30
+                    InputArgument::OPTIONAL,
31
+                    'Regex pattern of the worker name',
32
+                    null
33
+                )
34 34
             ->setDescription('List AMQP workers');
35 35
     }
36 36
 
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
     {
39 39
         $workerNamePattern = $input->getArgument('workerNamePattern');
40 40
 
41
-        if(!empty($workerNamePattern))
41
+        if( ! empty($workerNamePattern))
42 42
         {
43 43
             $comment = sprintf('List of worker with following pattern: %s', $workerNamePattern);
44 44
             $services = $this->workerProvider->listWithRegexFilter($workerNamePattern);
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 
52 52
         $output->writeln(sprintf('<comment>%s</comment>', $comment));
53 53
 
54
-        if(empty($services) || !is_array($services))
54
+        if(empty($services) || ! is_array($services))
55 55
         {
56 56
             $output->writeln('<error>No worker found</error>');
57 57
             return;
Please login to merge, or discard this patch.
src/Workers/MessageAdapter.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 
66 66
     public function applyHooks(MessageHookCollection $messageHookCollection)
67 67
     {
68
-        if(!empty($messageHookCollection))
68
+        if( ! empty($messageHookCollection))
69 69
         {
70 70
             foreach($messageHookCollection as $messageHook)
71 71
             {
@@ -151,14 +151,14 @@  discard block
 block discarded – undo
151 151
     {
152 152
         $retryHeader = $this->getHeader(\Puzzle\AMQP\Consumers\Retry::DEFAULT_RETRY_HEADER);
153 153
 
154
-        return (!empty($retryHeader) && (int) $retryHeader === $retryOccurence);
154
+        return ( ! empty($retryHeader) && (int) $retryHeader === $retryOccurence);
155 155
     }
156 156
 
157 157
     public function getRoutingKeyFromHeader()
158 158
     {
159 159
         $headers = $this->getHeaders();
160 160
 
161
-        if(! array_key_exists('routing_key', $headers))
161
+        if( ! array_key_exists('routing_key', $headers))
162 162
         {
163 163
             return null;
164 164
         }
Please login to merge, or discard this patch.
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -81,6 +81,9 @@
 block discarded – undo
81 81
         throw new \LogicException('Consumed messages have no flags');
82 82
     }
83 83
 
84
+    /**
85
+     * @param string $attributeName
86
+     */
84 87
     public function getAttribute($attributeName)
85 88
     {
86 89
         $messageProperties = $this->message->getProperties();
Please login to merge, or discard this patch.
src/Workers/ProcessorInterfaceAdapter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
         
26 26
         $hooks = $this->workerContext->getMessageHooks();
27 27
         
28
-        if(!empty($hooks))
28
+        if( ! empty($hooks))
29 29
         {
30 30
             $message->applyHooks($hooks);
31 31
         }
Please login to merge, or discard this patch.
src/Workers/WorkerContext.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
     
100 100
     public function deployInstances($numberOfInstance)
101 101
     {
102
-        if(! empty($numberOfInstance))
102
+        if( ! empty($numberOfInstance))
103 103
         {
104 104
             $this->instances = (int) $numberOfInstance;
105 105
         }
@@ -114,9 +114,9 @@  discard block
 block discarded – undo
114 114
     
115 115
     public function deployOn($servers)
116 116
     {
117
-        if(! empty($servers))
117
+        if( ! empty($servers))
118 118
         {
119
-            if(! is_array($servers))
119
+            if( ! is_array($servers))
120 120
             {
121 121
                 $servers = [$servers];
122 122
             }
Please login to merge, or discard this patch.
src/Services/SupervisorConfigurationGenerator.php 1 patch
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@
 block discarded – undo
72 72
 user=www-data
73 73
 autostart=$autostart
74 74
 autorestart=$autorestart
75
-TXT;
75
+txt;
76 76
     }
77 77
     
78 78
     private function booleanToString($value)
Please login to merge, or discard this patch.
src/Consumers/InstantRetry.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -43,12 +43,12 @@
 block discarded – undo
43 43
             'max_execution_time' => self::DEFAULT_MAX_EXECUTION_TIME,
44 44
         );
45 45
 
46
-        if(!empty($this->retries))
46
+        if( ! empty($this->retries))
47 47
         {
48 48
             $options['instant_retry_attempts'] = $this->retries;
49 49
         }
50 50
 
51
-        if(!empty($this->delay))
51
+        if( ! empty($this->delay))
52 52
         {
53 53
             $options['instant_retry_delay'] = $this->delay * 1000000; //computed in microseconds
54 54
         }
Please login to merge, or discard this patch.
src/Consumers/Retry.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@
 block discarded – undo
52 52
             'retry_key_pattern' => sprintf(self::RETRY_ROUTING_KEY_PATTERN, $workerContext->queue),
53 53
         );
54 54
 
55
-        if(! empty($this->retries))
55
+        if( ! empty($this->retries))
56 56
         {
57 57
             $options['retry_attempts'] = $this->retries;
58 58
         }
Please login to merge, or discard this patch.
src/Commands/GenerateSupervisorConfigurationFiles.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@
 block discarded – undo
78 78
     {
79 79
         $value = $input->getOption($name);
80 80
 
81
-        if(! in_array($value, ['true', 'false']))
81
+        if( ! in_array($value, ['true', 'false']))
82 82
         {
83 83
             throw new \InvalidArgumentException(sprintf('Invalid value "%s" for option %s, expecting boolean.', $value, $name));
84 84
         }
Please login to merge, or discard this patch.
src/Clients/Decorators/PrefixedExchangesClient.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
     {
36 36
         $exchangeParts = [];
37 37
         
38
-        if(! empty($this->exchangesPrefix))
38
+        if( ! empty($this->exchangesPrefix))
39 39
         {
40 40
             $exchangeParts[] = trim($this->exchangesPrefix);
41 41
         }
Please login to merge, or discard this patch.