@param CoverFishResult $coverFishResult

@return CoverFishResult
518596
public function prepareCoverFishResult(CoverFishResult $coverFishResult)
    {
        $this->clearValidationErrors($coverFishResult);
        $this->clearValidationWarnings($coverFishResult);

        return $coverFishResult;
    }
532915
public function parseResults(LoopResult $loopResult)
    {
        foreach ($loopResult->getResultDataCollection() as $result) {
            $row = new LoopResultRow();

            foreach ($result as $key => $value) {
                $row->set($key, $value);
            }

            $loopResult->addRow($row);
        }

        return $loopResult;
    }
721191
private static function convertResult($result)
    {
        if (!is_array($result)) {
            return self::convert($result);
        }

        $results = [];

        foreach ($result as $item) {
            $results[] = self::convert($item);
        }

        return $results;
    }
811221
public function validateMapping(CoverFishMapping $coverMapping)
    {
        /** @var CoverFishResult $coverFishResult */
        $coverFishResult = new CoverFishResult();
        // prepare base results, clear all validation errors and warnings
        $coverFishResult = $this->prepareCoverFishResult($coverFishResult);
        // E-01: check for classFQN/DefaultCoverClass existence/mapping validation-error
        $coverFishResult = $this->validateDefaultCoverClassMapping($coverMapping, $coverFishResult);
        // E-02: check for invalid classFQN validation-error
        $coverFishResult = $this->validateClassFQNMapping($coverMapping, $coverFishResult);
        // E-03: check for invalid accessor validation-error
        $coverFishResult = $this->validateClassAccessorVisibility($coverMapping, $coverFishResult);
        // E-04: check for invalid method validation-error
        $coverFishResult = $this->validateClassMethod($coverMapping, $coverFishResult);

        return $coverFishResult;
    }
1249786
public function setFirstResult($firstResult)
    {
        $this->firstResult = $firstResult;
        $this->state       = self::STATE_DIRTY;

        return $this;
    }
1287497
private function getCover()
	{
		$get = new Cover($this);
		$get->action();
		$get->build();
		$this->buildContext($this->result = $get->get(), "cover");
		$this->tmpContainer['content_crawler'] = new Content($this);
		$this->tmpContainer['content_crawler']->setOffsetPoint($this->offset);
	}
1373128
protected function getMacroFileInfo(CoverFishPHPUnitTest $unitTest)
    {
        $fileInfoMacro = '%s%s%s: %s';
        return sprintf($fileInfoMacro,
            PHP_EOL,
            $this->setIndent(self::MACRO_CONFIG_DETAIL_LINE_INDENT),
            (false === $this->preventAnsiColors)
                ? Color::tplDarkGrayColor('File')
                : 'File'
            ,
            $unitTest->getFileAndPath()
        );
    }
204708
protected function collectionFromResult($result)
    {
        // If we have one result which is not an assoc array, make it the first element of an array for the
        // collectionFromResult function so we always return a collection from filter
        if ((bool) count(array_filter(array_keys($result), 'is_string'))) {
            $result = [$result];
        }

        $class = $this->class;
        $collection = [];

        foreach ($result as $r) {
            $collection[] = new $class($this->connection, $r);
        }

        return $collection;
    }
1137770
public function parseResults(LoopResult $loopResult)
    {
        /** @var \IndexEngine\Model\IndexEngineIndex $entry */
        foreach ($loopResult->getResultDataCollection() as $entry) {
            $row = new LoopResultRow($entry);

            $row
                ->set("ID", $entry->getId())
                ->set("VISIBLE", $entry->getVisible())
                ->set("CODE", $entry->getCode())
                ->set("TITLE", $entry->getTitle())
                ->set("TYPE", $entry->getType())
                ->set("ENTITY", $entry->getEntity())
                ->set("SERIALIZED_COLUMNS", $entry->getSerializedColumns())
                ->set("SERIALIZED_CONDITION", $entry->getSerializedCondition())
                ->set("INDEX_ENGINE_DRIVER_CONFIGURATION_ID", $entry->getIndexEngineDriverConfigurationId())
            ;

            $this->addMoreResults($row, $entry);

            $loopResult->addRow($row);
        }

        return $loopResult;
    }
693274
public function analyseCoverAnnotations($phpDocBlock, CoverFishPHPUnitTest $phpUnitTest)
    {
        $this->validatorCollection->clear();
        $phpUnitTest->clearCoverMappings();
        $phpUnitTest->clearCoverAnnotation();

        /** @var string $cover */
        foreach ($phpDocBlock['covers'] as $cover) {
            $phpUnitTest->addCoverAnnotation($cover);
            $this->addCoverageValidatorPoolForCover($cover);
        }

        $phpUnitTest = $this->validateAndReturnMapping($phpUnitTest);
        $this->phpUnitFile->addTest($phpUnitTest);
    }
369588
protected function writeScanPassStatistic(CoverFishResult $coverFishResult)
    {
        $passStatistic = '%s file(s) and %s method(s) scanned, scan succeeded, no problems found.%s';
        $passStatistic = sprintf($passStatistic,
            $coverFishResult->getFileCount(),
            $coverFishResult->getTestCount(),
            PHP_EOL
        );

        $scanResultMacro = '%s%s%s';
        $scanResult = sprintf($scanResultMacro,
            ($this->outputLevel === 0)
                ? PHP_EOL
                : null,
            PHP_EOL,
            (false === $this->preventAnsiColors)
                ? Color::tplGreenColor($passStatistic)
                : $passStatistic
        );

        $this->write($scanResult);
    }
180657
public function parseResults(LoopResult $loopResult)
    {
        /** @var FeatureType $entry */
        foreach ($loopResult->getResultDataCollection() as $entry) {
            $row = new LoopResultRow($entry);
            $row
                ->set("ID", $entry->getId())
                ->set("SLUG", $entry->getSlug())
                ->set("TITLE", $entry->getVirtualColumn('i18n_TITLE'))
                ->set("DESCRIPTION", $entry->getVirtualColumn('i18n_DESCRIPTION'))
                ->set("CSS_CLASS", $entry->getCssClass())
                ->set("PATTERN", $entry->getPattern())
                ->set("INPUT_TYPE", $entry->getInputType())
                ->set("MIN", $entry->getMin())
                ->set("MAX", $entry->getMax())
                ->set("STEP", $entry->getStep())
                ->set("IMAGE_MAX_WIDTH", $entry->getImageMaxWidth())
                ->set("IMAGE_MAX_HEIGHT", $entry->getImageMaxHeight())
                ->set("IMAGE_RATIO", $entry->getImageRatio())
                ->set("IS_MULTILINGUAL_FEATURE_AV_VALUE", $entry->getIsMultilingualFeatureAvValue())
                ->set("HAS_FEATURE_AV_VALUE", $entry->getHasFeatureAvValue())
            ;

            $this->addOutputFields($row, $entry);

            $loopResult->addRow($row);
        }

        return $loopResult;
    }
176052
public function buildResult($result)
    {
        $chatMembers = [];

        foreach ($result as $item) {
            $chatMembers[] = new ChatMember($item);
        }

        return $chatMembers;
    }
199269
public function validateReflectionClassForAccessorNotPublic(\ReflectionClass $reflectionClass)
    {
        $methods = array_merge(
            $reflectionClass->getMethods(\ReflectionMethod::IS_PRIVATE),
            $reflectionClass->getMethods(\ReflectionMethod::IS_PROTECTED)
        );

        if (empty($methods)) {
            return new CoverFishMessageError(
                CoverFishMessageError::PHPUNIT_REFLECTION_NO_NOT_PUBLIC_METHODS_FOUND, null
            );
        }

        return true;
    }
867746
private function buildItems(SearchResult $searchResult): array
    {
        return array_map(
            function (SearchHit $searchHit): Item {
                return $this->buildItem($searchHit);
            },
            $searchResult->searchHits
        );
    }
361786
public function getMapping(CoverFishPHPUnitFile $phpUnitFile)
    {
        $method = $this->getResult()['method'];
        $classFQN = $phpUnitFile->getCoversDefaultClass();
        $class = $this->coverFishHelper->getClassNameFromClassFQN($classFQN);

        $mappingOptions = array(
            'coverToken' => $this->coversToken,
            'coverMethod' => $method,
            'coverAccessor' => null,
            'coverClass' => $class,
            'coverClassFQN' => $classFQN,
            'validatorMatch' => $this->getValidationTag(),
            'validatorClass' => get_class($this)
        );

        return $this->setMapping($mappingOptions);
    }
569193
private function castResult($result)
    {
        try {
            $result = $this->typeAdapter->toArray($result);
        } catch (TypeCastException $exception) {
            return $result;
        }

        return $result;
    }