Completed
Push — develop ( 36e9ea...2b118d )
by Oleg
10:59 queued 02:24
created
lib/WebMarketingROI/OptimizelyPHP/Service/v2/Experiments.php 1 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
      * @return array
39 39
      * @throws \Exception
40 40
      */
41
-    public function listAll($projectId, $campaignId=null, $includeClassic=false, $page=1, $perPage=10)
41
+    public function listAll($projectId, $campaignId = null, $includeClassic = false, $page = 1, $perPage = 10)
42 42
     {
43 43
         if (empty($projectId) && empty($campaignId)) {
44 44
             throw new \Exception('Project ID or Campaign ID must be non-empty');
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
             throw new \Exception("Expected argument of type Experiment");
149 149
         }
150 150
         
151
-        if ($experimentId<0) {
151
+        if ($experimentId < 0) {
152 152
             throw new \Exception("Expected positive experiment ID argument");
153 153
         }
154 154
         
Please login to merge, or discard this patch.
lib/WebMarketingROI/OptimizelyPHP/Service/v2/Events.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -38,13 +38,13 @@
 block discarded – undo
38 38
      * @return array[Event]
39 39
      * @throws \Exception
40 40
      */
41
-    public function listAll($projectId, $includeClassic, $page=0, $perPage=10)
41
+    public function listAll($projectId, $includeClassic, $page = 0, $perPage = 10)
42 42
     {
43
-        if ($page<0) {
43
+        if ($page < 0) {
44 44
             throw new \Exception('Invalid page number passed');
45 45
         }
46 46
         
47
-        if ($perPage<0) {
47
+        if ($perPage < 0) {
48 48
             throw new \Exception('Invalid page size passed');
49 49
         }
50 50
         
Please login to merge, or discard this patch.
lib/WebMarketingROI/OptimizelyPHP/Service/v2/Projects.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -34,13 +34,13 @@  discard block
 block discarded – undo
34 34
      * @return array
35 35
      * @throws \Exception
36 36
      */
37
-    public function listAll($page=0, $perPage=10)
37
+    public function listAll($page = 0, $perPage = 10)
38 38
     {
39
-        if ($page<0) {
39
+        if ($page < 0) {
40 40
             throw new \Exception('Invalid page number passed');
41 41
         }
42 42
         
43
-        if ($perPage<0 || $perPage>100) {
43
+        if ($perPage < 0 || $perPage > 100) {
44 44
             throw new \Exception('Invalid page size passed');
45 45
         }
46 46
         
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
             throw new \Exception("Integer project ID expected, while got '$projectId'");
72 72
         }
73 73
         
74
-        if ($projectId<0) {
74
+        if ($projectId < 0) {
75 75
             throw new \Exception("A positive project ID expected");
76 76
         }
77 77
         
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
             throw new \Exception("Integer project ID expected, while got '$projectId'");
117 117
         }
118 118
         
119
-        if ($projectId<0) {
119
+        if ($projectId < 0) {
120 120
             throw new \Exception("A positive project ID expected");
121 121
         }
122 122
         
Please login to merge, or discard this patch.
lib/WebMarketingROI/OptimizelyPHP/Service/v2/Campaigns.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -36,21 +36,21 @@  discard block
 block discarded – undo
36 36
      * @return array[Campaign]
37 37
      * @throws \Exception
38 38
      */
39
-    public function listAll($projectId, $page=0, $perPage=10)
39
+    public function listAll($projectId, $page = 0, $perPage = 10)
40 40
     {
41 41
         if (!is_int($projectId)) {
42 42
             throw new \Exception("Integer project ID expected, while got '$projectId'");
43 43
         }
44 44
         
45
-        if ($projectId<0) {
45
+        if ($projectId < 0) {
46 46
             throw new \Exception("Expected positive integer project ID");
47 47
         }
48 48
         
49
-        if ($page<0) {
49
+        if ($page < 0) {
50 50
             throw new \Exception('Invalid page number passed');
51 51
         }
52 52
         
53
-        if ($perPage<0) {
53
+        if ($perPage < 0) {
54 54
             throw new \Exception('Invalid page size passed');
55 55
         }
56 56
         
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
             throw new \Exception("Integer campaign ID expected, while got '$campaignId'");
103 103
         }
104 104
         
105
-        if ($campaignId<0) {
105
+        if ($campaignId < 0) {
106 106
             throw new \Exception("Expected positive integer campaign ID");
107 107
         }
108 108
         
Please login to merge, or discard this patch.
lib/WebMarketingROI/OptimizelyPHP/Service/v2/Pages.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -35,13 +35,13 @@
 block discarded – undo
35 35
      * @return array[Page]
36 36
      * @throws \Exception
37 37
      */
38
-    public function listAll($projectId, $page=0, $perPage=10)
38
+    public function listAll($projectId, $page = 0, $perPage = 10)
39 39
     {
40
-        if ($page<0) {
40
+        if ($page < 0) {
41 41
             throw new \Exception('Invalid page number passed');
42 42
         }
43 43
         
44
-        if ($perPage<0) {
44
+        if ($perPage < 0) {
45 45
             throw new \Exception('Invalid page size passed');
46 46
         }
47 47
         
Please login to merge, or discard this patch.
lib/WebMarketingROI/OptimizelyPHP/Service/v2/Audiences.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -35,13 +35,13 @@
 block discarded – undo
35 35
      * @return array[Audience]
36 36
      * @throws \Exception
37 37
      */
38
-    public function listAll($projectId, $page=0, $perPage=10)
38
+    public function listAll($projectId, $page = 0, $perPage = 10)
39 39
     {
40
-        if ($page<0) {
40
+        if ($page < 0) {
41 41
             throw new \Exception('Invalid page number passed');
42 42
         }
43 43
         
44
-        if ($perPage<0) {
44
+        if ($perPage < 0) {
45 45
             throw new \Exception('Invalid page size passed');
46 46
         }
47 47
         
Please login to merge, or discard this patch.
lib/WebMarketingROI/OptimizelyPHP/Resource/v2/CampaignResults.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
                 }
67 67
                 case 'start_time': $this->setStartTime($value); break;
68 68
                 default:
69
-                    throw new \Exception('Unknown option: ' . $name);
69
+                    throw new \Exception('Unknown option: '.$name);
70 70
             }
71 71
         }
72 72
     }
@@ -91,7 +91,7 @@  discard block
 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)
94
+            if ($value !== null)
95 95
                 $cleanedOptions[$name] = $value;
96 96
         }
97 97
         
Please login to merge, or discard this patch.
lib/WebMarketingROI/OptimizelyPHP/Resource/v2/ExperimentMetricResults.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@
 block discarded – undo
72 72
                 case 'unit': $this->setUnit($value); break;
73 73
                 case 'variation_results': $this->setVariationResults($value); break;
74 74
                 default:
75
-                    throw new \Exception('Unknown option: ' . $name);
75
+                    throw new \Exception('Unknown option: '.$name);
76 76
             }
77 77
         }
78 78
     }
Please login to merge, or discard this patch.
lib/WebMarketingROI/OptimizelyPHP/Resource/v2/VariantResults.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
                 case 'value': $this->setValue($value); break;
88 88
                 case 'variation_id': $this->setVariationId($value); break;
89 89
                 default:
90
-                    throw new \Exception('Unknown option: ' . $name);
90
+                    throw new \Exception('Unknown option: '.$name);
91 91
             }
92 92
         }
93 93
     }
@@ -100,11 +100,11 @@  discard block
 block discarded – undo
100 100
         $options = array(
101 101
             'experiment_id' => $this->getExperimentId(),
102 102
             'is_baseline' => $this->getIsBaseline(),
103
-            'lift' => $this->getLift()?$this->getLift()->toArray():null,
103
+            'lift' => $this->getLift() ? $this->getLift()->toArray() : null,
104 104
             'name' => $this->getName(),
105 105
             'rate' => $this->getRate(),
106 106
             'scope' => $this->getScope(),
107
-            'total_increase' => $this->getTotalIncrease()?$this->getTotalIncrease()->toArray():null,
107
+            'total_increase' => $this->getTotalIncrease() ? $this->getTotalIncrease()->toArray() : null,
108 108
             'value' => $this->getValue(),
109 109
             'variation_id' => $this->getVariationId()
110 110
         );
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
         // Remove options with empty values
113 113
         $cleanedOptions = array();
114 114
         foreach ($options as $name=>$value) {
115
-            if ($value!==null)
115
+            if ($value !== null)
116 116
                 $cleanedOptions[$name] = $value;
117 117
         }
118 118
         
Please login to merge, or discard this patch.