src/Matrix.php
public function process()
    {
        $orderedTasks = $this->_tasks;
        usort($orderedTasks, function($a, $b) {
            return $a->duration() > $b->duration() ? 1 : -1;
        });

        $this->_ranking = $orderedTasks;

        $matrix = [];
        foreach($this->_ranking as $task1) {
            $name1 = $task1->name();
            $matrix[$name1] = [];

            foreach($this->_ranking as $task2) {
                $name2 = $task2->name();
                $percent = intval(round($task1->duration() / $task2->duration() * 100));
                $matrix[$name1][$name2] = $percent;
            }
        }
        $this->_matrix = $matrix;
        return $this;
    }
public function process()
    {
        $orderedTasks = $this->_tasks;
        usort($orderedTasks, function($a, $b) {
            return $a->duration() > $b->duration() ? 1 : -1;
        });

        $this->_ranking = $orderedTasks;

        $matrix = [];
        foreach($this->_ranking as $task1) {
            $name1 = $task1->name();
            $matrix[$name1] = [];

            foreach($this->_ranking as $task2) {
                $name2 = $task2->name();
                $percent = intval(round($task1->duration() / $task2->duration() * 100));
                $matrix[$name1][$name2] = $percent;
            }
        }
        $this->_matrix = $matrix;
        return $this;
    }
Builds the matrix result.

@return self