Completed
Push — master ( e411bc...5768ca )
by Nicolas
02:04
created
client_example/ClientCommander.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -109,7 +109,7 @@
 block discarded – undo
109 109
     {
110 110
         global $help;
111 111
     
112
-        echo("Usage: php ". basename(__FILE__) . " -c configFile [-h] [-k <key>] [-s <secret>] [-r <region>]\n");
112
+        echo("Usage: php " . basename(__FILE__) . " -c configFile [-h] [-k <key>] [-s <secret>] [-r <region>]\n");
113 113
         echo("-h: Print this help\n");
114 114
         echo("-d: Debug mode\n");
115 115
         echo("-c: configFile\n");
Please login to merge, or discard this patch.
pollers/src/ActivityPoller.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
         // Poll from all the taskList registered for each activities 
101 101
         if ($this->debug)
102 102
             $this->cpeLogger->log_out("DEBUG", basename(__FILE__),
103
-                "Polling activity taskList '" . $this->taskList  . "' ... ");
103
+                "Polling activity taskList '" . $this->taskList . "' ... ");
104 104
             
105 105
         try {
106 106
             // Call SWF and poll for incoming tasks
@@ -201,9 +201,9 @@  discard block
 block discarded – undo
201 201
                 if (!file_exists($activityToHandle->{"file"}))
202 202
                 {
203 203
                     $this->cpeLogger->log_out("ERROR", basename(__FILE__),
204
-                        "The code file '".$activityToHandle->{"file"}."' for activity: name=" 
204
+                        "The code file '" . $activityToHandle->{"file"} . "' for activity: name=" 
205 205
                         . $activityToHandle->{"name"} . ",version=" 
206
-                        . $activityToHandle->{"version"}." doesn't exists! Check if the file is accessible and if the path is correct in your config file.");
206
+                        . $activityToHandle->{"version"} . " doesn't exists! Check if the file is accessible and if the path is correct in your config file.");
207 207
                     return false;
208 208
                 }
209 209
                 
@@ -242,7 +242,7 @@  discard block
 block discarded – undo
242 242
         $this->cpeLogger->log_out("ERROR", basename(__FILE__),
243 243
             "No Activity handler was found for: name=" 
244 244
             . $this->activityName . ",version=" 
245
-            . $this->activityVersion.". Check your config file and ensure your 'activity' name AND 'version' is there.");    
245
+            . $this->activityVersion . ". Check your config file and ensure your 'activity' name AND 'version' is there.");    
246 246
         return false;
247 247
     }
248 248
 }
@@ -262,7 +262,7 @@  discard block
 block discarded – undo
262 262
 // Usage
263 263
 function usage($defaultConfigFile)
264 264
 {
265
-    echo("Usage: php ". basename(__FILE__) . " -D <domain> -A <activity_name> -V <activity_version> [-T <task_list>] [-h] [-d] [-c <config_file path>] [-l <log path>]\n");
265
+    echo("Usage: php " . basename(__FILE__) . " -D <domain> -A <activity_name> -V <activity_version> [-T <task_list>] [-h] [-d] [-c <config_file path>] [-l <log path>]\n");
266 266
     echo("-h: Print this help\n");
267 267
     echo("-d: Debug mode\n");
268 268
     echo("-c <config_file path>: Optional parameter to override the default configuration file: '$defaultConfigFile'.\n");
@@ -331,7 +331,7 @@  discard block
 block discarded – undo
331 331
     // Tasklist
332 332
     if (!isset($options['T']))
333 333
     {
334
-        $taskList = $options['A'].'-'.$options['V'];
334
+        $taskList = $options['A'] . '-' . $options['V'];
335 335
     } else {
336 336
         $taskList = $options['T'];
337 337
     }
Please login to merge, or discard this patch.
pollers/src/InputPoller.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -114,12 +114,12 @@  discard block
 block discarded – undo
114 114
                 $this->cpeLogger->log_out(
115 115
                     "ERROR", 
116 116
                     basename(__FILE__), 
117
-                    $e->getMessage().print_r($msg, true));
117
+                    $e->getMessage() . print_r($msg, true));
118 118
             } catch (\Exception $e) {
119 119
                 $this->cpeLogger->log_out(
120 120
                     "ERROR", 
121 121
                     basename(__FILE__), 
122
-                    $e->getMessage().print_r($msg, true));
122
+                    $e->getMessage() . print_r($msg, true));
123 123
             }
124 124
             
125 125
             // Message polled. Valid or not, we delete it from SQS
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
         $this->cpeLogger->log_out(
148 148
             "INFO", 
149 149
             basename(__FILE__), 
150
-            "Received message '" . $message->{"type"}  . "'"
150
+            "Received message '" . $message->{"type"} . "'"
151 151
         );
152 152
         if ($this->debug)
153 153
             $this->cpeLogger->log_out(
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
             $this->cpeLogger->log_out(
197 197
                 "INFO",
198 198
                 basename(__FILE__),
199
-                "New workflow submitted to SWF: ".$workflowRunId->get('runId'));
199
+                "New workflow submitted to SWF: " . $workflowRunId->get('runId'));
200 200
 
201 201
             // Send WORKFLOW_SCHEDULED message back to client
202 202
             $this->cpeSqsWriter->workflow_scheduled($workflowType, $workflowRunId->get('runId'), $workflowId, $message);
@@ -222,10 +222,10 @@  discard block
 block discarded – undo
222 222
     private function validate_message($message)
223 223
     {
224 224
         if (!isset($message) || 
225
-            !isset($message->{"time"})   || $message->{"time"} == "" || 
226
-            !isset($message->{"jobId"})  || $message->{"jobId"} == "" || 
227
-            !isset($message->{"type"})   || $message->{"type"} == "" || 
228
-            !isset($message->{"data"})   || $message->{"data"} == "")
225
+            !isset($message->{"time"}) || $message->{"time"} == "" || 
226
+            !isset($message->{"jobId"}) || $message->{"jobId"} == "" || 
227
+            !isset($message->{"type"}) || $message->{"type"} == "" || 
228
+            !isset($message->{"data"}) || $message->{"data"} == "")
229 229
             throw new CpeSdk\CpeException("'time', 'type', 'jobId' or 'data' fields missing in JSON message file!",
230 230
                 self::INVALID_JSON);
231 231
         
@@ -246,7 +246,7 @@  discard block
 block discarded – undo
246 246
 function usage($defaultConfigFile)
247 247
 {
248 248
     echo("# Description\nThe InputPoller connects your client applications to your stack. It handles communication over the two SQS channels you created for your client application.\n\n");
249
-    echo("Usage: php ". basename(__FILE__) . " [-h] [-d] -n <client_name> [-l <log path>]\n");
249
+    echo("Usage: php " . basename(__FILE__) . " [-h] [-d] -n <client_name> [-l <log path>]\n");
250 250
     echo("-h: Print this help\n");
251 251
     echo("-d: Debug mode\n");
252 252
     echo("-l <log_path>: Location where logs will be dumped in (folder).\n");
@@ -283,9 +283,9 @@  discard block
 block discarded – undo
283 283
     $cpeLogger = new CpeSdk\CpeLogger($logPath, $options['n'], $debug);
284 284
         
285 285
     $config = new \stdClass;
286
-    $config->clients = [(object)[
286
+    $config->clients = [(object) [
287 287
             'name' => $options['n'],
288
-            'queues' => (object)[
288
+            'queues' => (object) [
289 289
                 'input' => getenv('INPUT_QUEUE'),
290 290
                 'output' => getenv('OUTPUT_QUEUE'),
291 291
             ],
Please login to merge, or discard this patch.