Neos.Diff/Classes/SequenceMatcher.php
public function ratio()
    {
        $matches = array_reduce($this->getMatchingBlocks(), [$this, 'ratioReduce'], 0);
        return $this->calculateRatio($matches, count($this->a) + count($this->b));
    }
public function ratio()
    {
        $matches = array_reduce($this->getMatchingBlocks(), [$this, 'ratioReduce'], 0);
        return $this->calculateRatio($matches, count($this->a) + count($this->b));
    }
public function ratio ( ) { $ matches = array_reduce ( $ this -> getMatchingBlocks ( ) , [ $ this , 'ratioReduce' ] , 0 ) ; return $ this -> calculateRatio ( $ matches , count ( $ this -> a ) + count ( $ this -> b ) ) ; }
Return a measure of the similarity between the two sequences.
This will be a float value between 0 and 1.

Out of all of the ratio calculation functions, this is the most
expensive to call if getMatchingBlocks or getOpCodes is yet to be
called. The other calculation methods (quickRatio and realquickRatio)
can be used to perform quicker calculations but may be less accurate.

The ratio is calculated as (2 * number of matches) / total number of
elements in both sequences.

@return float The calculated ratio.
Return a measure of the similarity between the two sequences . This will be a float value between 0 and 1 .