Completed
Push — master ( a99496...5c0b02 )
by Oleg
02:28
created
lib/WebMarketingROI/OptimizelyPHP/Resource/v2/InPageEventConfig.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
             switch ($name) {                
29 29
                 case 'selector': $this->setSelector($value); break;
30 30
                 default:
31
-                    throw new Exception('Unknown option found in the InPageConfig entity: ' . $name);
31
+                    throw new Exception('Unknown option found in the InPageConfig entity: '.$name);
32 32
             }
33 33
         }
34 34
     }
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
         // Remove options with empty values
46 46
         $cleanedOptions = array();
47 47
         foreach ($options as $name=>$value) {
48
-            if ($value!==null)
48
+            if ($value !== null)
49 49
                 $cleanedOptions[$name] = $value;
50 50
         }
51 51
         
Please login to merge, or discard this patch.
lib/WebMarketingROI/OptimizelyPHP/Resource/v2/Event.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
                 case 'is_editable': $this->setIsEditable($value); break;                
133 133
                 case 'config': $this->setConfig(new InPageEventConfig($value)); break;
134 134
                 default:
135
-                    throw new Exception('Unknown option found in the Event entity: ' . $name);
135
+                    throw new Exception('Unknown option found in the Event entity: '.$name);
136 136
             }
137 137
         }
138 138
     }
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
             'category' => $this->getCategory(),
149 149
             'created' => $this->getCreated(),
150 150
             'description' => $this->getDescription(),
151
-            'event_filter' => $this->getEventFilter()?$this->getEventFilter()->toArray():null,
151
+            'event_filter' => $this->getEventFilter() ? $this->getEventFilter()->toArray() : null,
152 152
             'event_type' => $this->getEventType(),
153 153
             'key' => $this->getKey(),
154 154
             'name' => $this->getName(),
@@ -157,13 +157,13 @@  discard block
 block discarded – undo
157 157
             'id' => $this->getId(),
158 158
             'is_classic' => $this->getIsClassic(),
159 159
             'is_editable' => $this->getIsEditable(),            
160
-            'config' => $this->getConfig()?$this->getConfig()->toArray():null,
160
+            'config' => $this->getConfig() ? $this->getConfig()->toArray() : null,
161 161
         );
162 162
         
163 163
         // Remove options with empty values
164 164
         $cleanedOptions = array();
165 165
         foreach ($options as $name=>$value) {
166
-            if ($value!==null)
166
+            if ($value !== null)
167 167
                 $cleanedOptions[$name] = $value;
168 168
         }
169 169
         
Please login to merge, or discard this patch.
tests/OptimizelyPHPTest/Service/v2/AttributesTest.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -39,9 +39,9 @@  discard block
 block discarded – undo
39 39
         $result = $attributesService->listAll(0);
40 40
         $attributes = $result->getPayload();
41 41
         
42
-        $this->assertTrue(count($attributes)==1);
42
+        $this->assertTrue(count($attributes) == 1);
43 43
         $this->assertTrue($attributes[0] instanceOf Attribute);
44
-        $this->assertTrue($attributes[0]->getName()=='Subscriber Status');        
44
+        $this->assertTrue($attributes[0]->getName() == 'Subscriber Status');        
45 45
     }
46 46
     
47 47
     /**
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
         $attribute = $result->getPayload();
102 102
         
103 103
         $this->assertTrue($attribute instanceOf Attribute);
104
-        $this->assertTrue($attribute->getName()=='Subscriber Status');        
104
+        $this->assertTrue($attribute->getName() == 'Subscriber Status');        
105 105
     }
106 106
     
107 107
     public function testCreate()
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
         $createdAttribute = $result->getPayload();
143 143
         
144 144
         $this->assertTrue($createdAttribute instanceOf Attribute);
145
-        $this->assertTrue($createdAttribute->getName()=='Subscriber Status');                
145
+        $this->assertTrue($createdAttribute->getName() == 'Subscriber Status');                
146 146
     }
147 147
     
148 148
     public function testUpdate()
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
         $createdAttribute = $result->getPayload();
184 184
         
185 185
         $this->assertTrue($createdAttribute instanceOf Attribute);
186
-        $this->assertTrue($createdAttribute->getName()=='Subscriber Status');                
186
+        $this->assertTrue($createdAttribute->getName() == 'Subscriber Status');                
187 187
     }
188 188
     
189 189
     public function testIntegration()
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
         $credentials = $this->loadCredentialsFromFile();
195 195
         
196 196
         $optimizelyClient = new OptimizelyApiClient($credentials, 'v2');
197
-        $this->assertTrue($optimizelyClient!=null);
197
+        $this->assertTrue($optimizelyClient != null);
198 198
         
199 199
         // Create new project        
200 200
         $curDate = date('Y-m-d H:i:s');
@@ -235,7 +235,7 @@  discard block
 block discarded – undo
235 235
         $createdAttribute = $result->getPayload();
236 236
         
237 237
         $this->assertTrue($createdAttribute instanceOf Attribute);
238
-        $this->assertTrue($createdAttribute->getName()=='Subscriber Status');  
238
+        $this->assertTrue($createdAttribute->getName() == 'Subscriber Status');  
239 239
         
240 240
         // List all existing attributes and try to find the created attribute
241 241
         $attributeFound = false;        
@@ -247,16 +247,16 @@  discard block
 block discarded – undo
247 247
                 $attributes = $result->getPayload();
248 248
 
249 249
                 foreach ($attributes as $attribute) {
250
-                    if ($attribute->getName()=="Subscriber Status") {
250
+                    if ($attribute->getName() == "Subscriber Status") {
251 251
                         $attributeFound = true;
252 252
                         break;
253 253
                     }
254 254
                 }
255 255
 
256
-                if ($result->getNextPage()==null)
256
+                if ($result->getNextPage() == null)
257 257
                     break;
258 258
 
259
-                $page ++;
259
+                $page++;
260 260
             }
261 261
         }
262 262
         catch (Exception $e) {
@@ -276,7 +276,7 @@  discard block
 block discarded – undo
276 276
         $updatedAttribute = $result->getPayload();                
277 277
         
278 278
         $this->assertTrue($updatedAttribute instanceOf Attribute);
279
-        $this->assertTrue($updatedAttribute->getName()=='Some new attribute name');  
279
+        $this->assertTrue($updatedAttribute->getName() == 'Some new attribute name');  
280 280
         
281 281
         // Make project archived
282 282
         
Please login to merge, or discard this patch.