Hal\MutaTesting\Specification\ScoreSpecification::isSatisfedBy PHP Метод

isSatisfedBy() публичный Метод

public isSatisfedBy ( Hal\MutaTesting\Mutation\MutationInterface $mutation, $index )
$mutation Hal\MutaTesting\Mutation\MutationInterface
    public function isSatisfedBy(MutationInterface $mutation, $index)
    {
        $filename = $mutation->getSourceFile();
        //
        // Avoid to make same mutations
        if (!isset($this->alreadyMuted[$filename])) {
            $this->alreadyMuted[$filename] = array();
        }
        foreach ($mutation->getMutedTokensIndexes() as $index) {
            if (isset($this->alreadyMuted[$filename][$index])) {
                return false;
            }
            $this->alreadyMuted[$filename][$index] = 1;
        }
        //
        // keep only complex files
        if (!isset($this->notes[$filename])) {
            $bugs = $this->halstead->calculate($filename)->getBugs();
            $this->notes[$filename] = $bugs;
        }
        return $this->notes[$filename] > $this->limit;
    }