Completed
Branch master (7d4b9e)
by
unknown
04:42
created
framework-test.php 2 patches
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -37,12 +37,12 @@  discard block
 block discarded – undo
37 37
 ];
38 38
 
39 39
 function checkBuilds (array $builds) {
40
-  foreach ($builds as $framework => $listedVersions) {
40
+    foreach ($builds as $framework => $listedVersions) {
41 41
     if (!is_array($listedVersions)) {
42
-      error_log('MALFORMED FRAMEWORKS MATRIX');
43
-      exit(-1);
42
+        error_log('MALFORMED FRAMEWORKS MATRIX');
43
+        exit(-1);
44
+    }
44 45
     }
45
-  }
46 46
 }
47 47
 
48 48
 $outputLog = '';
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 
53 53
     $framework = "{$testFramework} {$testFrameworkVersion}";
54 54
 
55
-  $composer = <<<EOF
55
+    $composer = <<<EOF
56 56
 {
57 57
   "name": "integration tester",
58 58
   "repositories": [
@@ -104,20 +104,20 @@  discard block
 block discarded – undo
104 104
 }
105 105
 
106 106
 function build($sdkTarget, array $builds) {
107
-  checkBuilds($builds);
108
-  $results = [];
109
-  foreach ($builds as $framework => $testVersions) {
107
+    checkBuilds($builds);
108
+    $results = [];
109
+    foreach ($builds as $framework => $testVersions) {
110 110
     foreach ($testVersions as $testVersion) {
111
-      $results[$framework . ":" . $testVersion] = runFrameworkTest($sdkTarget, $framework, $testVersion);
111
+        $results[$framework . ":" . $testVersion] = runFrameworkTest($sdkTarget, $framework, $testVersion);
112
+    }
112 113
     }
113
-  }
114 114
 
115
-  $ok = true;
116
-  foreach ($results as $result) {
115
+    $ok = true;
116
+    foreach ($results as $result) {
117 117
     $ok = $ok && $result;
118
-  }
118
+    }
119 119
 
120
-  exit($ok ? 0 : -1);
120
+    exit($ok ? 0 : -1);
121 121
 }
122 122
 
123 123
 build($sdkTarget, $builds);
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
     ]
37 37
 ];
38 38
 
39
-function checkBuilds (array $builds) {
39
+function checkBuilds(array $builds) {
40 40
   foreach ($builds as $framework => $listedVersions) {
41 41
     if (!is_array($listedVersions)) {
42 42
       error_log('MALFORMED FRAMEWORKS MATRIX');
@@ -77,22 +77,22 @@  discard block
 block discarded – undo
77 77
 
78 78
     exec('composer install 2>&1', $output, $returnCode);
79 79
     if ($returnCode !== 0) {
80
-        $outputLog .= "###################### Failure: Installing framework {$framework} ###################### \n\n" . implode("\n", $output);
80
+        $outputLog .= "###################### Failure: Installing framework {$framework} ###################### \n\n".implode("\n", $output);
81 81
     } else {
82 82
         $returnCode = 0;
83 83
         $output = [];
84
-        exec('composer require blocktrail/blocktrail-sdk ' . $sdkTarget . ' 2>&1', $output, $returnCode);
84
+        exec('composer require blocktrail/blocktrail-sdk '.$sdkTarget.' 2>&1', $output, $returnCode);
85 85
         if ($returnCode !== 0) {
86
-            $outputLog .= "###################### Failure: Installing SDK with {$framework} ###################### \n\n" . implode("\n", $output);
86
+            $outputLog .= "###################### Failure: Installing SDK with {$framework} ###################### \n\n".implode("\n", $output);
87 87
         }
88 88
     }
89 89
 
90 90
     cleanup();
91 91
 
92 92
     $ok = $returnCode === 0;
93
-    echo "Testing {$framework} with target {$sdkTarget}:  " . ($ok ? 'pass' : 'FAIL') . PHP_EOL;
93
+    echo "Testing {$framework} with target {$sdkTarget}:  ".($ok ? 'pass' : 'FAIL').PHP_EOL;
94 94
     if (!$ok) {
95
-        echo $outputLog . PHP_EOL;
95
+        echo $outputLog.PHP_EOL;
96 96
     }
97 97
 
98 98
     return $ok;
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
   $results = [];
109 109
   foreach ($builds as $framework => $testVersions) {
110 110
     foreach ($testVersions as $testVersion) {
111
-      $results[$framework . ":" . $testVersion] = runFrameworkTest($sdkTarget, $framework, $testVersion);
111
+      $results[$framework.":".$testVersion] = runFrameworkTest($sdkTarget, $framework, $testVersion);
112 112
     }
113 113
   }
114 114
 
Please login to merge, or discard this patch.