protected function getBoolFromStringInt($value) { if (!($value == '0' || $value == '1')) { $this->throwException(sprintf('Expected "0" or "1" but got: %s', $value)); } return (bool) $value; }