public function __toString() { $base = parent::__toString(); $expected = implode(" or ", $this->expected); $base .= "Expected: {$expected}\nFound:{$this->found}"; return $base; }
public function __toString() { $base = parent::__toString(); $expected = implode(" or ", $this->expected); if (!trim($expected) == '') { $base .= "Expected: {$expected}\n"; } if (!trim($this->found) == '') { $base .= "Found:{$this->found}\n"; } return $base; }