Casts bool parameters to integer if set to false

@param array $params Parameters
@return array $params
327679
private function boolParams($params)
    {
        if (isset($params['lowquality']) && $params['lowquality']===false)
            $params['lowquality'] = (int) $params['lowquality'];

        if (isset($params['images']) && $params['images']===false)
            $params['images'] = (int) $params['images'];

        if (isset($params['outline']) && $params['outline']===false)
            $params['outline'] = (int) $params['outline'];

        if (isset($params['javascript']) && $params['javascript']===false)
            $params['javascript'] = (int) $params['javascript'];

        if (isset($params['internal_links']) && $params['internal_links']===false)
            $params['internal_links'] = (int) $params['internal_links'];

        if (isset($params['external_links']) && $params['external_links']===false)
            $params['external_links'] = (int) $params['external_links'];

        if (isset($params['use_print_media']) && $params['use_print_media']===false)
            $params['use_print_media'] = (int) $params['use_print_media'];

        if (isset($params['background']) && $params['background']===false)
            $params['background'] = (int) $params['background'];

        return $params;
    }
461901
private function fixParams(array $params)
    {
        $qualityOverride = false;

        foreach ($params as $key => $value) {
            if ($key === 'xmethod') {
                $params['method'] = $value;
                unset($params['xmethod']);
            } elseif ($key === 'backgroundcolor' && !preg_match('/^\#[0-9A-Za-z]{6}$/', $value)) {
                $params['backgroundcolor'] = '';
            } elseif ($key === 'compression') {
                if (!$qualityOverride) {
                    $params['quality'] = 0;
                }
                $params['quality'] = $params['quality'] + $value * 10;
                $qualityOverride = true;
                unset($params['compression']);
            } elseif ($key === 'filtertype') {
                if (!$qualityOverride) {
                    $params['quality'] = 0;
                }
                $params['quality'] = $params['quality'] + $value;
                $qualityOverride = true;
                unset($params['filtertype']);
            }
        }

        return $params;
    }
450420
private static function getParamValues($params, $inputs) {
        foreach ($params as $key => $param) {
            if (preg_match("#^:([\[\]a-zA-Z0-9_]+)$#", $param, $param_type)) {
                $params[$key] = @$inputs[(string) $param_type[1]];
            }
        }
        return $params;
    }
1355416
public function filterItineraryParamsToPropagate($params)
    {
        $res = [];

        foreach ($params as $key => $value) {
            if (!empty($value) && is_string($value)) {
                $res[$key] = $value;
            }
        }

        return $res;
    }
109859
public function create($params = array())
	{
		$response = $this->api->request('PUT', $this->getUrl(), $params, $this->toXML(), $this->format);
		return $this->parseResponse($response) ? true : false;
	}
690804
private function filterParameters(array $params): array
    {
        return
            array_filter(
                $params,
                function (&$value) {
                    if (is_array($value)) {
                        $value = $this->filterParameters($value);

                        return count($value) > 0;
                    } else {
                        return !is_null($value);
                    }
                }
            );
    }
40456
public function getDataTypeParams(array $params)
    {
        $type = $this->getEloquentDataMethod();
        if (in_array($type, ['char', 'string']) && isset($params[0]) && ($length = intval($params[0])) > 0) {
            return [$length];
        }

        if (in_array($type, ['decimal', 'double', 'float'])
            && isset($params[0]) && ($length = intval($params[0])) > 0 && isset($params[1]) && ($decimal = intval($params[1])) > 0) {
            return [$length, $decimal];
        }

        if ($type == 'enum') {
            return $params;
        }

        return [];
    }
1029423
public function decodeParameters($types, $param)
    {
        if (!is_string($param)) {
            throw new InvalidArgumentException('The type or param to decodeParameters must be string.');
        }

        // change json to array
        if ($types instanceof stdClass && isset($types->outputs)) {
            $types = Utils::jsonToArray($types, 2);
        }
        if (is_array($types) && isset($types['outputs'])) {
            $outputTypes = $types;
            $types = [];

            foreach ($outputTypes['outputs'] as $output) {
                if (isset($output['type'])) {
                    $types[] = $output['type'];
                }
            }
        }
        $typesLength = count($types);
        $solidityTypes = $this->getSolidityTypes($types);
        $offsets = array_fill(0, $typesLength, 0);

        for ($i=0; $i<$typesLength; $i++) {
            $offsets[$i] = $solidityTypes[$i]->staticPartLength($types[$i]);
        }
        for ($i=1; $i<$typesLength; $i++) {
            $offsets[$i] += $offsets[$i - 1];
        }
        for ($i=0; $i<$typesLength; $i++) {
            $offsets[$i] -= $solidityTypes[$i]->staticPartLength($types[$i]);
        }
        $result = [];
        $param = mb_strtolower(Utils::stripZero($param));

        for ($i=0; $i<$typesLength; $i++) {
            if (isset($outputTypes['outputs'][$i]['name']) && empty($outputTypes['outputs'][$i]['name']) === false) {
                $result[$outputTypes['outputs'][$i]['name']] = $solidityTypes[$i]->decode($param, $offsets[$i], $types[$i]);
            } else {
                $result[$i] = $solidityTypes[$i]->decode($param, $offsets[$i], $types[$i]);
            }
        }

        return $result;
    }
726073
public function setParams(array $params = [])
    {

        //Process Params
        $params = $this->processParams($params);

        //Set the params
        $this->params = $params;

        return $this;
    }
1024268
public static function offset($params) {
        $offset = $params['args'][0];
        $ormObject = !is_null($params['ormObject']) ? $params['ormObject'] : ORM::for_table($params['table']);
        
        return $ormObject->offset($offset);
    }
57495
public function setParameters(array $params)
    {
        foreach ($params as $name => $value) {
            $this->getParameterContainer()->add($name, $value);
        }
        return $this;
    }
318595
public function setParams($params)
		{
			$this->params = [];
			foreach ($params as $param)
			{
				// variables
				$name = $param['name'];
				$type = $param['type'];
				$value = $param['value'];

				// properties
				$this->params[$name] = $this->convert($type, $value);
			}

			// return
			return $this;
		}
1320992
public function create(array $params = [])
    {
        return $this->executeRequest(
            RequestMethodEnum::POST,
            ResourceMethodEnum::CREATE,
            $params,
            null
        );
    }
439178
protected function fill(&$params)
    {
        if (is_null($this->model->new_value)) {
            return false;
        }
        foreach ($params as $index => $value) {
            if (isset($params[$index])) {
                continue;
            }
            $params[$index] = array_get($this->model->new_value, $index);
        }
        return $params;
    }
1113980
public static function fromArray(array $params)
    {
        $options = new Options();

        if (isset($params['verbose'])) {
            $options->verbose = (bool) $params['verbose'];
        }

        if (isset($params['generate-imported'])) {
            $options->generateImported = (bool) $params['generate-imported'];
        }

        if (isset($params['psr4'])) {
            $options->psr4 = $params['psr4'];
        }

        return $options;
    }
956413
private function setSaltFromParams(array $params)
    {
        $salt = $this->getMatchingData($params, '/^[\.\\A-Za-z0-9]{22}$/');
        $this->salt = (! empty($salt)) ? $salt : self::DEFAULT_SALT;
    }
1233507
public function setParameters(array $params): self
    {
        foreach ($params as $key => $value) {
            $this->parameters[$key] = $value;
        }
        return $this;
    }