Completed
Push — master ( 536792...6972e2 )
by Gaetano
08:49
created
Core/WorkflowServiceFacade.php 1 patch
Braces   +9 added lines, -3 removed lines patch added patch discarded remove patch
@@ -45,7 +45,9 @@  discard block
 block discarded – undo
45 45
     {
46 46
         $workflowDefinitions = $this->getValidWorkflowsDefinitionsForSignal($signalName);
47 47
 
48
-        if ($this->logger) $this->logger->debug("Found " . count($workflowDefinitions) . " workflow definitions for signal '$signalName'");
48
+        if ($this->logger) {
49
+            $this->logger->debug("Found " . count($workflowDefinitions) . " workflow definitions for signal '$signalName'");
50
+        }
49 51
 
50 52
         if (count($workflowDefinitions)) {
51 53
 
@@ -59,7 +61,9 @@  discard block
 block discarded – undo
59 61
             foreach ($workflowDefinitions as $workflowDefinition) {
60 62
 
61 63
                 if (self::$workflowExecuting > 0 && $workflowDefinition->avoidRecursion) {
62
-                    if ($this->logger) $this->logger->debug("Skipping workflow '{$workflowDefinition->name}' to avoid recursion (workflow already executing)");
64
+                    if ($this->logger) {
65
+                        $this->logger->debug("Skipping workflow '{$workflowDefinition->name}' to avoid recursion (workflow already executing)");
66
+                    }
63 67
                     return;
64 68
                 }
65 69
 
@@ -83,7 +87,9 @@  discard block
 block discarded – undo
83 87
                 self::$workflowExecuting += 1;
84 88
                 try {
85 89
 
86
-                    if ($this->logger) $this->logger->debug("Executing workflow '{$workflowDefinition->name}' with parameters: " . preg_replace("/\n+/s", ' ', preg_replace('/^(Array| +|\(|\))/m', '', print_r($workflowParameters, true))));
90
+                    if ($this->logger) {
91
+                        $this->logger->debug("Executing workflow '{$workflowDefinition->name}' with parameters: " . preg_replace("/\n+/s", ' ', preg_replace('/^(Array| +|\(|\))/m', '', print_r($workflowParameters, true))));
92
+                    }
87 93
 
88 94
                     /// @todo allow setting of default lang ?
89 95
                     $this->innerService->executeMigration($wfd, $workflowDefinition->useTransaction, null, $workflowDefinition->runAs, false, null, $workflowParameters);
Please login to merge, or discard this patch.