@@ -87,7 +87,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 | |
@@ -112,8 +112,9 @@ |
||
| 112 | 112 | // Remove options with empty values |
| 113 | 113 | $cleanedOptions = array(); |
| 114 | 114 | foreach ($options as $name=>$value) { |
| 115 | - if ($value!==null) |
|
| 116 | - $cleanedOptions[$name] = $value; |
|
| 115 | + if ($value!==null) { |
|
| 116 | + $cleanedOptions[$name] = $value; |
|
| 117 | + } |
|
| 117 | 118 | } |
| 118 | 119 | |
| 119 | 120 | return $cleanedOptions; |
@@ -123,7 +123,7 @@ discard block |
||
| 123 | 123 | case 'is_classic': $this->setIsClassic($value); break; |
| 124 | 124 | case 'is_editable': $this->setIsEditable($value); break; |
| 125 | 125 | default: |
| 126 | - throw new \Exception('Unknown option: ' . $name); |
|
| 126 | + throw new \Exception('Unknown option: '.$name); |
|
| 127 | 127 | } |
| 128 | 128 | } |
| 129 | 129 | } |
@@ -139,7 +139,7 @@ discard block |
||
| 139 | 139 | 'category' => $this->getCategory(), |
| 140 | 140 | 'created' => $this->getCreated(), |
| 141 | 141 | 'description' => $this->getDescription(), |
| 142 | - 'event_filter' => $this->getEventFilter()?$this->getEventFilter()->toArray():null, |
|
| 142 | + 'event_filter' => $this->getEventFilter() ? $this->getEventFilter()->toArray() : null, |
|
| 143 | 143 | 'event_type' => $this->getEventType(), |
| 144 | 144 | 'key' => $this->getKey(), |
| 145 | 145 | 'name' => $this->getName(), |
@@ -153,7 +153,7 @@ discard block |
||
| 153 | 153 | // Remove options with empty values |
| 154 | 154 | $cleanedOptions = array(); |
| 155 | 155 | foreach ($options as $name=>$value) { |
| 156 | - if ($value!==null) |
|
| 156 | + if ($value !== null) |
|
| 157 | 157 | $cleanedOptions[$name] = $value; |
| 158 | 158 | } |
| 159 | 159 | |
@@ -153,8 +153,9 @@ |
||
| 153 | 153 | // Remove options with empty values |
| 154 | 154 | $cleanedOptions = array(); |
| 155 | 155 | foreach ($options as $name=>$value) { |
| 156 | - if ($value!==null) |
|
| 157 | - $cleanedOptions[$name] = $value; |
|
| 156 | + if ($value!==null) { |
|
| 157 | + $cleanedOptions[$name] = $value; |
|
| 158 | + } |
|
| 158 | 159 | } |
| 159 | 160 | |
| 160 | 161 | return $cleanedOptions; |
@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | case 'value': $this->setValue($value); break; |
| 67 | 67 | case 'visitors_remaining': $this->setVisitorsRemaining($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 | } |
@@ -88,7 +88,7 @@ discard block |
||
| 88 | 88 | // Remove options with empty values |
| 89 | 89 | $cleanedOptions = array(); |
| 90 | 90 | foreach ($options as $name=>$value) { |
| 91 | - if ($value!==null) |
|
| 91 | + if ($value !== null) |
|
| 92 | 92 | $cleanedOptions[$name] = $value; |
| 93 | 93 | } |
| 94 | 94 | |
@@ -88,8 +88,9 @@ |
||
| 88 | 88 | // Remove options with empty values |
| 89 | 89 | $cleanedOptions = array(); |
| 90 | 90 | foreach ($options as $name=>$value) { |
| 91 | - if ($value!==null) |
|
| 92 | - $cleanedOptions[$name] = $value; |
|
| 91 | + if ($value!==null) { |
|
| 92 | + $cleanedOptions[$name] = $value; |
|
| 93 | + } |
|
| 93 | 94 | } |
| 94 | 95 | |
| 95 | 96 | return $cleanedOptions; |
@@ -114,7 +114,7 @@ discard block |
||
| 114 | 114 | case 'last_modified': $this->setLastModified($value); break; |
| 115 | 115 | case 'socket_token': $this->setSocketToken($value); break; |
| 116 | 116 | default: |
| 117 | - throw new \Exception('Unknown option: ' . $name); |
|
| 117 | + throw new \Exception('Unknown option: '.$name); |
|
| 118 | 118 | } |
| 119 | 119 | } |
| 120 | 120 | } |
@@ -131,7 +131,7 @@ discard block |
||
| 131 | 131 | 'dcp_service_id' => $this->getDcpServiceId(), |
| 132 | 132 | 'platform' => $this->getPlatform(), |
| 133 | 133 | 'status' => $this->getStatus(), |
| 134 | - 'web_snippet' => $this->getWebSnippet()?$this->getWebSnippet()->toArray():null, |
|
| 134 | + 'web_snippet' => $this->getWebSnippet() ? $this->getWebSnippet()->toArray() : null, |
|
| 135 | 135 | 'created' => $this->getCreated(), |
| 136 | 136 | 'id' => $this->getId(), |
| 137 | 137 | 'is_classic' => $this->getIsClassic(), |
@@ -142,7 +142,7 @@ discard block |
||
| 142 | 142 | // Remove options with empty values |
| 143 | 143 | $cleanedOptions = array(); |
| 144 | 144 | foreach ($options as $name=>$value) { |
| 145 | - if ($value!==null) |
|
| 145 | + if ($value !== null) |
|
| 146 | 146 | $cleanedOptions[$name] = $value; |
| 147 | 147 | } |
| 148 | 148 | |
@@ -142,8 +142,9 @@ |
||
| 142 | 142 | // Remove options with empty values |
| 143 | 143 | $cleanedOptions = array(); |
| 144 | 144 | foreach ($options as $name=>$value) { |
| 145 | - if ($value!==null) |
|
| 146 | - $cleanedOptions[$name] = $value; |
|
| 145 | + if ($value!==null) { |
|
| 146 | + $cleanedOptions[$name] = $value; |
|
| 147 | + } |
|
| 147 | 148 | } |
| 148 | 149 | |
| 149 | 150 | return $cleanedOptions; |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | case 'stop_time': $this->setStopTime($value); break; |
| 41 | 41 | case 'time_zone': $this->setTimezone($value); break; |
| 42 | 42 | default: |
| 43 | - throw new \Exception('Unknown option: ' . $name); |
|
| 43 | + throw new \Exception('Unknown option: '.$name); |
|
| 44 | 44 | } |
| 45 | 45 | } |
| 46 | 46 | } |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | // Remove options with empty values |
| 60 | 60 | $cleanedOptions = array(); |
| 61 | 61 | foreach ($options as $name=>$value) { |
| 62 | - if ($value!==null) |
|
| 62 | + if ($value !== null) |
|
| 63 | 63 | $cleanedOptions[$name] = $value; |
| 64 | 64 | } |
| 65 | 65 | |
@@ -59,8 +59,9 @@ |
||
| 59 | 59 | // Remove options with empty values |
| 60 | 60 | $cleanedOptions = array(); |
| 61 | 61 | foreach ($options as $name=>$value) { |
| 62 | - if ($value!==null) |
|
| 63 | - $cleanedOptions[$name] = $value; |
|
| 62 | + if ($value!==null) { |
|
| 63 | + $cleanedOptions[$name] = $value; |
|
| 64 | + } |
|
| 64 | 65 | } |
| 65 | 66 | |
| 66 | 67 | return $cleanedOptions; |
@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | case 'code_revision': $this->setCodeRevision($value); break; |
| 97 | 97 | case 'js_file_size': $this->setJsFileSize($value); break; |
| 98 | 98 | default: |
| 99 | - throw new \Exception('Unknown option: ' . $name); |
|
| 99 | + throw new \Exception('Unknown option: '.$name); |
|
| 100 | 100 | } |
| 101 | 101 | } |
| 102 | 102 | } |
@@ -122,7 +122,7 @@ discard block |
||
| 122 | 122 | // Remove options with empty values |
| 123 | 123 | $cleanedOptions = array(); |
| 124 | 124 | foreach ($options as $name=>$value) { |
| 125 | - if ($value!==null) |
|
| 125 | + if ($value !== null) |
|
| 126 | 126 | $cleanedOptions[$name] = $value; |
| 127 | 127 | } |
| 128 | 128 | |
@@ -122,8 +122,9 @@ |
||
| 122 | 122 | // Remove options with empty values |
| 123 | 123 | $cleanedOptions = array(); |
| 124 | 124 | foreach ($options as $name=>$value) { |
| 125 | - if ($value!==null) |
|
| 126 | - $cleanedOptions[$name] = $value; |
|
| 125 | + if ($value!==null) { |
|
| 126 | + $cleanedOptions[$name] = $value; |
|
| 127 | + } |
|
| 127 | 128 | } |
| 128 | 129 | |
| 129 | 130 | return $cleanedOptions; |
@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | case 'value': $this->setValue($value); break; |
| 102 | 102 | case 'id': $this->setId($value); break; |
| 103 | 103 | default: |
| 104 | - throw new \Exception('Unknown option: ' . $name); |
|
| 104 | + throw new \Exception('Unknown option: '.$name); |
|
| 105 | 105 | } |
| 106 | 106 | } |
| 107 | 107 | } |
@@ -128,7 +128,7 @@ discard block |
||
| 128 | 128 | // Remove options with empty values |
| 129 | 129 | $cleanedOptions = array(); |
| 130 | 130 | foreach ($options as $name=>$value) { |
| 131 | - if ($value!==null) |
|
| 131 | + if ($value !== null) |
|
| 132 | 132 | $cleanedOptions[$name] = $value; |
| 133 | 133 | } |
| 134 | 134 | |
@@ -128,8 +128,9 @@ |
||
| 128 | 128 | // Remove options with empty values |
| 129 | 129 | $cleanedOptions = array(); |
| 130 | 130 | foreach ($options as $name=>$value) { |
| 131 | - if ($value!==null) |
|
| 132 | - $cleanedOptions[$name] = $value; |
|
| 131 | + if ($value!==null) { |
|
| 132 | + $cleanedOptions[$name] = $value; |
|
| 133 | + } |
|
| 133 | 134 | } |
| 134 | 135 | |
| 135 | 136 | return $cleanedOptions; |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | case 'reach': $this->setReach(new ExperimentVariationReach($value)); break; |
| 75 | 75 | case 'start_time': $this->setStartTime($value); break; |
| 76 | 76 | default: |
| 77 | - throw new \Exception('Unknown option: ' . $name); |
|
| 77 | + throw new \Exception('Unknown option: '.$name); |
|
| 78 | 78 | } |
| 79 | 79 | } |
| 80 | 80 | } |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | 'end_time' => $this->getEndTime(), |
| 90 | 90 | 'experiment_id' => $this->getExperimentId(), |
| 91 | 91 | 'metrics' => array(), |
| 92 | - 'reach' => $this->getReach()?$this->getReach()->toArray():null, |
|
| 92 | + 'reach' => $this->getReach() ? $this->getReach()->toArray() : null, |
|
| 93 | 93 | 'start_time' => $this->getStartTime() |
| 94 | 94 | ); |
| 95 | 95 | |
@@ -100,7 +100,7 @@ discard block |
||
| 100 | 100 | // Remove options with empty values |
| 101 | 101 | $cleanedOptions = array(); |
| 102 | 102 | foreach ($options as $name=>$value) { |
| 103 | - if ($value!==null) |
|
| 103 | + if ($value !== null) |
|
| 104 | 104 | $cleanedOptions[$name] = $value; |
| 105 | 105 | } |
| 106 | 106 | |
@@ -100,8 +100,9 @@ |
||
| 100 | 100 | // Remove options with empty values |
| 101 | 101 | $cleanedOptions = array(); |
| 102 | 102 | foreach ($options as $name=>$value) { |
| 103 | - if ($value!==null) |
|
| 104 | - $cleanedOptions[$name] = $value; |
|
| 103 | + if ($value!==null) { |
|
| 104 | + $cleanedOptions[$name] = $value; |
|
| 105 | + } |
|
| 105 | 106 | } |
| 106 | 107 | |
| 107 | 108 | return $cleanedOptions; |
@@ -87,7 +87,7 @@ discard block |
||
| 87 | 87 | } |
| 88 | 88 | case 'unit': $this->setUnit($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 | } |
@@ -114,7 +114,7 @@ discard block |
||
| 114 | 114 | // Remove options with empty values |
| 115 | 115 | $cleanedOptions = array(); |
| 116 | 116 | foreach ($options as $name=>$value) { |
| 117 | - if ($value!==null) |
|
| 117 | + if ($value !== null) |
|
| 118 | 118 | $cleanedOptions[$name] = $value; |
| 119 | 119 | } |
| 120 | 120 | |
@@ -114,8 +114,9 @@ |
||
| 114 | 114 | // Remove options with empty values |
| 115 | 115 | $cleanedOptions = array(); |
| 116 | 116 | foreach ($options as $name=>$value) { |
| 117 | - if ($value!==null) |
|
| 118 | - $cleanedOptions[$name] = $value; |
|
| 117 | + if ($value!==null) { |
|
| 118 | + $cleanedOptions[$name] = $value; |
|
| 119 | + } |
|
| 119 | 120 | } |
| 120 | 121 | |
| 121 | 122 | return $cleanedOptions; |