Set whether or not to require indexes.

@param bool $bool

@return $this
356842
public function requireIndexes($bool = true)
    {
        if (!$this->isQueryOrScan()) {
            //TODO: exception
        }

        if ($bool) {
            $this->queryClass = Query::class;
        } else {
            $this->queryClass = Scan::class;
        }

        return $this;
    }
601199
public function consistent($bool = true)
    {
        if ($bool === false && $this->index->isSecondaryGlobal()) {
            throw ODMException::secondaryGlobalIndexConsistentReadNotSupported($this->index->getName());
        }

        return parent::consistent($bool);
    }
950544
private static function encodeBoolean($bool)
    {
        if ($bool)
        {
            return self::encodeFirstByte(MajorType::SIMPLE_AND_FLOAT, AdditionalType::SIMPLE_TRUE);
        }
        else
        {
            return self::encodeFirstByte(MajorType::SIMPLE_AND_FLOAT, AdditionalType::SIMPLE_FALSE);
        }
    }
691185
public function setBoolean($boolean = null)
    {
        $this->boolean = null !== $boolean ? (bool) $boolean : null;

        return $this;
    }
304295
public function allowCredentials($bool = true)
    {
        $this->response = $this->corsHandler->setResponse($this->response)
            ->allowCredentials($bool)
            ->getResponse();

        return $this;
    }
398462
protected function loadData(bool $autoload = true): self
    {
        if ($this->loaded) {
            return $this;
        }

        $this->loaded = true;

        if (empty($this->data) || !is_array($this->data)) {
            if ($this->autoload && $autoload) {
                //Only for non partial selections (excluded already selected)
                $this->data = $this->loadRelated();
            } else {
                $this->data = [];
            }
        }

        return $this->initInstances();
    }
1347282
public function isEnabled($bool = null)
    {
        if ($bool === true || $bool === false) {
            $this->isEnabled = $bool;
        }

        return $this->isEnabled;
    }
186566
public function denyAccess($bool = null)
	{
		if ($bool === null) {
			return $this->options['deny_access'];
		}

		return $this->options['deny_access'] = $bool;
	}
663104
public function showLine( $bool = true )
	{
	    if ( $this->jsWriter instanceOf \Altamira\JsWriter\Ability\Lineable ) {
    	    $this->jsWriter->setSeriesShowLine( $this->getTitle(), $bool );
	    }
	    return $this;
	}
1341991
public function dropIdSuffix($bool = null)
    {
        if ($bool === null) {
            return $this->drop_id;
        }

        return $this->drop_id = $bool;
    }
464436
public function caching($bool = null)
	{
		if (is_bool($bool))
		{
			$this->_config['enable_cache'] = $bool;
			return $this;
		}
		return \Arr::get($this->_config, 'enable_cache', true);
	}
887410
public function csrfProtect($bool = null)
    {
        if ($bool === null) {
            return $this->config->get('csrf_protect', true);
        }

        $this->config->set('csrf_protect', (bool) $bool);

        return $this;
    }
284286
public static function setRedirect($bool) {

		if(null !== $bool && false === is_bool($bool)) {
			return trigger_error(sprintf('Argument 1 passed to %s() must be of the type boolean, "%s" given', __METHOD__, gettype($bool)), E_USER_ERROR);
		}

		static :: $isRedirect = $bool;
	}
190470
public function setAsFailRoute($bool = true)
    {
        if(!$bool)
            return $this;

        $name = $this->name;

        if(!$name)
            throw new InvalidArgumentException('This route has to be named first.');

        $this->group->setFailRoute($name);

        return $this;
    }
545035
public function boolean()
    {
        $message = ['%s is {{not|}} a boolean', $this->value];
        $this->assert(is_bool($this->value), $message);

        return $this;
    }
1259966
public function statsOnly(bool $bool = true): Compare
    {
        $this->stats = $this->useOption('--numstat', $bool);
        return $this;
    }
1156077
public function isNormalized($bool = null)
	{
		if (isset($bool))
		{
			$this->isNormalized = $bool;
		}

		return $this->isNormalized;
	}