@@ -43,11 +43,11 @@ |
||
43 | 43 | |
44 | 44 | private $groups = []; |
45 | 45 | |
46 | - function __construct(string $what = 'points', string $how = '>', $val = 0, $groups = []){ |
|
46 | + function __construct(string $what = 'points', string $how = '>', $val = 0, $groups = []) { |
|
47 | 47 | if (in_array(strtolower($what), ['points', 'score', 'wins', 'draws', 'losses', 'second', 'third', 'team', 'notprogressed', 'progressed'])) $this->what = strtolower($what); |
48 | 48 | if (in_array($how, ['>', '<', '>=', '<=', '=', '!='])) $this->how = $how; |
49 | 49 | if ((gettype($val) === 'integer' && strtolower($what) !== 'team') || ($val instanceof Team && strtolower($what) === 'team')) $this->val = $val; |
50 | - $this->groups = array_map(function($a) { return $a->id; }, array_filter($groups, function($a) {return ($a instanceof Group);})); |
|
50 | + $this->groups = array_map(function($a) { return $a->id; }, array_filter($groups, function($a) {return ($a instanceof Group); })); |
|
51 | 51 | } |
52 | 52 | public function __toString() { |
53 | 53 | return 'Filter: '.$this->what.' '.($this->what !== 'notprogressed' && $this->what !== 'progressed' ? $this->how.' '.$this->val : ''); |