protected function setAllowCredentials($allowCredentials) { if (!is_bool($allowCredentials)) { throw new InvalidArgument('Allow credentials must be a boolean.'); } $this->allowCredentials = $allowCredentials; }