Returns null instead of false for Redis driver
@param mixed $result
@return mixed
181501
private function convertFalseToNull($result)
    {
        return $this->actualDriver() === self::DRIVER_REDIS && $result === false ? null : $result;
    }
1174500
protected function filterModelEventResults($result)
    {
        if (is_array($result)) {
            $result = array_filter($result, function ($response) {
                return ! is_null($response);
            });
        }

        return $result;
    }
845620
protected function finalize($result) {
        $this->eagerLoad = [];
        $this->criteria->reset();
        $this->scope = null;
        return $result;
    }
1066031
final public function getResult($result = '')
    {
        $result.= $this->generate();
        if ($this->successor !== null) {
            return $this->successor->getResult($result);
        }

        return $result;
    }
1371374
protected function filter($result, $choices)
    {
        foreach ($choices as $key => $regex) {
            if ($result->is($key) and stripos($key, 'generic') === false) {
                return $key;
            }
        }

        return null;
    }
295430
public function fetchAssoc($result = null)
    {
        $result = $result ? $result : $this->getResult();

        $rows = [];

        if ($result->rowCount() > 0) {
            $results = $result->fetchAll(\PDO::FETCH_ASSOC);
            foreach ($results as $key => $value) {
                $rows[$key] = $value;
            }
        }

        return $rows;
    }
402920
public function process(\Controller $controller, $result = null)
    {
        if ($controller->getRequest()->isAjax()) {
            $response = $controller->getResponse();
            $response->setStatusCode(200);

            if (is_array($result)) {
                $response->addHeader('Content-Type', 'application/json');
                $response->setBody(json_encode($result));
            }

            return $response;
        } else {
            $controller->redirectBack();
        }

        return null;
    }
857893
final public function get($key) {
		$res = $this->connection->get($key);
		self::$logger->info(sprintf(
			"Redis: get %s: '%s'.", $key, $res));
		if ($this->redistype == 'predis' && $res == null)
			$res = false;
		return $res;
	}
748213
protected function _makeResult(array $result) {
        return Result::make($result, $this->getClient())->setModelClass($this->_fullModelClass());
    }
603431
public function collect($result = null)
    {
        $result = $result ? $result : $this->getResult();

        if ($result->rowCount() > 0) {
            $collection = new Collection();
            foreach ($result->fetchAll(\PDO::FETCH_ASSOC) as $row) {
                $collection->add($row);
            }

            return $collection;
        }

        return null;
    }
1215960
public function encodeResult($result)
	{
		$string = $this->encoder->encodeResult($result);

		return $this->encrypt($string);
	}
1341568
final protected function verifyResult($result)
    {
        $returnType = $this->returnType;
        if ($returnType === null) {
            if ($result !== null) {
                throw TypeMismatchException::format(
                        'Invalid return type from action handler %s: expecting null, %s given',
                        get_class($this), Debug::getType($result)
                );
            }

            return $result;
        }

        if (!($result instanceof $returnType)) {
            throw TypeMismatchException::format(
                    'Invalid return value from action handler %s: expecting %s, %s given',
                    get_class($this), $returnType, Debug::getType($result)
            );
        }

        return $result;
    }
956580
private function getResultIfArgsEmptyForBeforeSave($result)
    {
        //save template id for email sending to update the sender name and sender email saved on template level.
        if (isset($result['template_id'])) {
            $result = $this->saveTemplateIdInRegistry($result['template_id']);
        }
        if (isset($result['template_text'])) {
            $templateText = $result['template_text'];
            //compress text
            if (!$this->isStringCompressed($templateText) &&
                $this->transactionalHelper->isDotmailerTemplate($result['template_code'])) {
                $result['template_text'] = $this->compressString($templateText);
            }
        }

        return $result;
    }
345374
private function getResultIfArgsEmptyForPreviewAndOther($result)
    {
        if (isset($result['template_id'])) {
            $this->saveTemplateIdInRegistry($result['template_id']);
        }
        if (isset($result['template_text'])) {
            $templateText = $result['template_text'];
            if ($this->isStringCompressed($templateText)) {
                $result['template_text'] = $this->decompressString($templateText);
            }
        }

        return $result;
    }
590530
protected function processResult($result)
    {
        $output = Helper::objectToArray($result);

        if (! is_array($output)) {
            throw new Error\Api($output);
        }

        if (isset($output['result'])) {
            return $output;
        }

        if (
            isset($output['request']) &&
            $output['request']['result'] != 1 &&
            $output['request']['result'] !== 'TRUE') {
            throw new Error\Api($output['request']['errorId'] . ' - ' . $output['request']['errorMessage']);
        }

        return $output;
    }
261605
public function affected_rows($result = null)
    {
        if ($result || ($result === null && ($result = $this->last_result))) {
            if ($result !== true) {
                return $result->rowCount();
            }
        }

        return 0;
    }
298754
final public static function adapter($result)
    {
        if (is_array($result)) {
            $arr = [];
            foreach ($result as $key => $value) {
                $arr[$key] = self::makeObject($value);
            }
            return $arr;
        }

        return self::makeObject($result);
    }