Completed
Push — develop ( 36e9ea...2b118d )
by Oleg
10:59 queued 02:24
created
lib/WebMarketingROI/OptimizelyPHP/Resource/v2/Action.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
                 }
42 42
                 case 'page_id': $this->setPageId($value); break;
43 43
                 default:
44
-                    throw new \Exception('Unknown option: ' . $name);
44
+                    throw new \Exception('Unknown option: '.$name);
45 45
             }
46 46
         }
47 47
     }
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
         // Remove options with empty values
64 64
         $cleanedOptions = array();
65 65
         foreach ($options as $name=>$value) {
66
-            if ($value!==null)
66
+            if ($value !== null)
67 67
                 $cleanedOptions[$name] = $value;
68 68
         }
69 69
         
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -91,8 +91,9 @@
 block discarded – undo
91 91
         // Remove options with empty values
92 92
         $cleanedOptions = array();
93 93
         foreach ($options as $name=>$value) {
94
-            if ($value!==null)
95
-                $cleanedOptions[$name] = $value;
94
+            if ($value!==null) {
95
+                            $cleanedOptions[$name] = $value;
96
+            }
96 97
         }
97 98
         
98 99
         return $cleanedOptions;
Please login to merge, or discard this patch.
lib/WebMarketingROI/OptimizelyPHP/Resource/v2/Audience.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
                 case 'id': $this->setId($value); break;
83 83
                 case 'last_modified': $this->setLastModified($value); break;
84 84
                 default:
85
-                    throw new \Exception('Unknown option: ' . $name);
85
+                    throw new \Exception('Unknown option: '.$name);
86 86
             }
87 87
         }
88 88
     }
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
         // Remove options with empty values
108 108
         $cleanedOptions = array();
109 109
         foreach ($options as $name=>$value) {
110
-            if ($value!==null)
110
+            if ($value !== null)
111 111
                 $cleanedOptions[$name] = $value;
112 112
         }
113 113
         
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -91,8 +91,9 @@
 block discarded – undo
91 91
         // Remove options with empty values
92 92
         $cleanedOptions = array();
93 93
         foreach ($options as $name=>$value) {
94
-            if ($value!==null)
95
-                $cleanedOptions[$name] = $value;
94
+            if ($value!==null) {
95
+                            $cleanedOptions[$name] = $value;
96
+            }
96 97
         }
97 98
         
98 99
         return $cleanedOptions;
Please login to merge, or discard this patch.
lib/WebMarketingROI/OptimizelyPHP/Resource/v2/Variation.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
                 case 'variation_id': $this->setVariationId($value); break;
71 71
                 case 'weight': $this->setWeight($value); break;
72 72
                 default:
73
-                    throw new \Exception('Unknown option: ' . $name);
73
+                    throw new \Exception('Unknown option: '.$name);
74 74
             }
75 75
         }
76 76
     }
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
         // Remove options with empty values
97 97
         $cleanedOptions = array();
98 98
         foreach ($options as $name=>$value) {
99
-            if ($value!==null)
99
+            if ($value !== null)
100 100
                 $cleanedOptions[$name] = $value;
101 101
         }
102 102
         
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -91,8 +91,9 @@
 block discarded – undo
91 91
         // Remove options with empty values
92 92
         $cleanedOptions = array();
93 93
         foreach ($options as $name=>$value) {
94
-            if ($value!==null)
95
-                $cleanedOptions[$name] = $value;
94
+            if ($value!==null) {
95
+                            $cleanedOptions[$name] = $value;
96
+            }
96 97
         }
97 98
         
98 99
         return $cleanedOptions;
Please login to merge, or discard this patch.
lib/WebMarketingROI/OptimizelyPHP/Resource/v2/EventFilter.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
                 case 'filter_type': $this->setFilterType($value); break;
34 34
                 case 'selector': $this->setSelector($value); break;
35 35
                 default:
36
-                    throw new \Exception('Unknown option: ' . $name);
36
+                    throw new \Exception('Unknown option: '.$name);
37 37
             }
38 38
         }
39 39
     }
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
         // Remove options with empty values
52 52
         $cleanedOptions = array();
53 53
         foreach ($options as $name=>$value) {
54
-            if ($value!==null)
54
+            if ($value !== null)
55 55
                 $cleanedOptions[$name] = $value;
56 56
         }
57 57
         
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -91,8 +91,9 @@
 block discarded – undo
91 91
         // Remove options with empty values
92 92
         $cleanedOptions = array();
93 93
         foreach ($options as $name=>$value) {
94
-            if ($value!==null)
95
-                $cleanedOptions[$name] = $value;
94
+            if ($value!==null) {
95
+                            $cleanedOptions[$name] = $value;
96
+            }
96 97
         }
97 98
         
98 99
         return $cleanedOptions;
Please login to merge, or discard this patch.
lib/WebMarketingROI/OptimizelyPHP/Resource/v2/ExperimentVariationReach.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
                     break;                
71 71
                 }
72 72
                 default:
73
-                    throw new \Exception('Unknown option: ' . $name);
73
+                    throw new \Exception('Unknown option: '.$name);
74 74
             }
75 75
         }
76 76
     }
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
         // Remove options with empty values
97 97
         $cleanedOptions = array();
98 98
         foreach ($options as $name=>$value) {
99
-            if ($value!==null)
99
+            if ($value !== null)
100 100
                 $cleanedOptions[$name] = $value;
101 101
         }
102 102
         
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -91,8 +91,9 @@
 block discarded – undo
91 91
         // Remove options with empty values
92 92
         $cleanedOptions = array();
93 93
         foreach ($options as $name=>$value) {
94
-            if ($value!==null)
95
-                $cleanedOptions[$name] = $value;
94
+            if ($value!==null) {
95
+                            $cleanedOptions[$name] = $value;
96
+            }
96 97
         }
97 98
         
98 99
         return $cleanedOptions;
Please login to merge, or discard this patch.
lib/WebMarketingROI/OptimizelyPHP/Resource/v2/Campaign.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
                 case 'type': $this->setType($value); break;
134 134
                 case 'id': $this->setId($value); break;
135 135
                 default:
136
-                    throw new \Exception('Unknown option: ' . $name);
136
+                    throw new \Exception('Unknown option: '.$name);
137 137
             }
138 138
         }
139 139
     }
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
         // Remove options with empty values
172 172
         $cleanedOptions = array();
173 173
         foreach ($options as $name=>$value) {
174
-            if ($value!==null)
174
+            if ($value !== null)
175 175
                 $cleanedOptions[$name] = $value;
176 176
         }
177 177
         
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -91,8 +91,9 @@
 block discarded – undo
91 91
         // Remove options with empty values
92 92
         $cleanedOptions = array();
93 93
         foreach ($options as $name=>$value) {
94
-            if ($value!==null)
95
-                $cleanedOptions[$name] = $value;
94
+            if ($value!==null) {
95
+                            $cleanedOptions[$name] = $value;
96
+            }
96 97
         }
97 98
         
98 99
         return $cleanedOptions;
Please login to merge, or discard this patch.
lib/WebMarketingROI/OptimizelyPHP/Resource/v2/VariationReach.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
                 case 'variation_id': $this->setVariationId($value); break;
48 48
                 case 'variation_reach': $this->setVariationReach($value); break;
49 49
                 default:
50
-                    throw new \Exception('Unknown option: ' . $name);
50
+                    throw new \Exception('Unknown option: '.$name);
51 51
             }
52 52
         }
53 53
     }
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
         // Remove options with empty values
68 68
         $cleanedOptions = array();
69 69
         foreach ($options as $name=>$value) {
70
-            if ($value!==null)
70
+            if ($value !== null)
71 71
                 $cleanedOptions[$name] = $value;
72 72
         }
73 73
         
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -91,8 +91,9 @@
 block discarded – undo
91 91
         // Remove options with empty values
92 92
         $cleanedOptions = array();
93 93
         foreach ($options as $name=>$value) {
94
-            if ($value!==null)
95
-                $cleanedOptions[$name] = $value;
94
+            if ($value!==null) {
95
+                            $cleanedOptions[$name] = $value;
96
+            }
96 97
         }
97 98
         
98 99
         return $cleanedOptions;
Please login to merge, or discard this patch.
lib/WebMarketingROI/OptimizelyPHP/Resource/v2/Metric.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
                 case 'kind': $this->setKind($value); break;
34 34
                 case 'id': $this->setId($value); break;
35 35
                 default:
36
-                    throw new \Exception('Unknown option: ' . $name);
36
+                    throw new \Exception('Unknown option: '.$name);
37 37
             }
38 38
         }
39 39
     }
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
         // Remove options with empty values
52 52
         $cleanedOptions = array();
53 53
         foreach ($options as $name=>$value) {
54
-            if ($value!==null)
54
+            if ($value !== null)
55 55
                 $cleanedOptions[$name] = $value;
56 56
         }
57 57
         
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -91,8 +91,9 @@
 block discarded – undo
91 91
         // Remove options with empty values
92 92
         $cleanedOptions = array();
93 93
         foreach ($options as $name=>$value) {
94
-            if ($value!==null)
95
-                $cleanedOptions[$name] = $value;
94
+            if ($value!==null) {
95
+                            $cleanedOptions[$name] = $value;
96
+            }
96 97
         }
97 98
         
98 99
         return $cleanedOptions;
Please login to merge, or discard this patch.
examples/Projects/CreateProject.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -16,14 +16,14 @@  discard block
 block discarded – undo
16 16
 use WebMarketingROI\OptimizelyPHP\Resource\v2\Project;
17 17
 
18 18
 // Init class autloading.
19
-include dirname(__FILE__) . '/../../vendor/autoload.php';
19
+include dirname(__FILE__).'/../../vendor/autoload.php';
20 20
 
21 21
 // Include Utils.php - a file containing helper functions
22
-include dirname(__FILE__) . '/../Utils.php';
22
+include dirname(__FILE__).'/../Utils.php';
23 23
 
24 24
 // Read project ID from command line.
25
-if ($argc!=2) {
26
-    die('Expected 1 command-line argument, while got ' . $argc-1);
25
+if ($argc != 2) {
26
+    die('Expected 1 command-line argument, while got '.$argc - 1);
27 27
 }
28 28
 $projectId = $argv[1];
29 29
 
@@ -44,11 +44,11 @@  discard block
 block discarded – undo
44 44
     $createdProject = $optimizelyClient->projects()->create($project);
45 45
                 
46 46
 } catch (\Exception $e) {
47
-    echo "Exception caught: " . $e->getMessage() . "\n";    
47
+    echo "Exception caught: ".$e->getMessage()."\n";    
48 48
 }    
49 49
 
50 50
 // Save access token for later use
51 51
 $accessToken = $optimizelyClient->getAccessToken();
52
-file_put_contents(dirname(__FILE__) . '/../access_token.json', json_encode($accessToken));
52
+file_put_contents(dirname(__FILE__).'/../access_token.json', json_encode($accessToken));
53 53
 
54 54
 echo "Done!\n";
55 55
\ No newline at end of file
Please login to merge, or discard this patch.