diff options
author | Thomas Steur <thomas.steur@googlemail.com> | 2014-09-30 09:37:32 +0400 |
---|---|---|
committer | Thomas Steur <thomas.steur@googlemail.com> | 2014-09-30 09:37:32 +0400 |
commit | a00487b0b841c4b15463b591c7f62176c4b84d15 (patch) | |
tree | 6eb893ce356a4740e044c9cdadaf84ffb2095b9d /core/Segment.php | |
parent | 0edef3332289a7cbe54b58084b967907d1086d29 (diff) |
coding style fixes, some PHPStorm inspection fixes, improved readability of code, few refactorings, all as part of our code cleanup strategy
Diffstat (limited to 'core/Segment.php')
-rw-r--r-- | core/Segment.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/core/Segment.php b/core/Segment.php index e12b165028..a0952f3bd7 100644 --- a/core/Segment.php +++ b/core/Segment.php @@ -70,6 +70,7 @@ class Segment * @param string $segmentCondition The segment condition, eg, `'browserCode=ff;countryCode=CA'`. * @param array $idSites The list of sites the segment will be used with. Some segments are * dependent on the site, such as goal segments. + * @throws Exception */ public function __construct($segmentCondition, $idSites) { @@ -155,10 +156,10 @@ class Segment throw new Exception("You do not have enough permission to access the segment " . $name); } - if($matchType != SegmentExpression::MATCH_IS_NOT_NULL_NOR_EMPTY + if ($matchType != SegmentExpression::MATCH_IS_NOT_NULL_NOR_EMPTY && $matchType != SegmentExpression::MATCH_IS_NULL_OR_EMPTY) { - if(isset($segment['sqlFilterValue'])) { + if (isset($segment['sqlFilterValue'])) { $value = call_user_func($segment['sqlFilterValue'], $value); } |