Factory/TopFactory.php
public function createRanks(array $ranks)
    {
        $tmp = [];
        foreach ($ranks as $entry) {
            $tmp[] = (new RankFactory())->createEntity($entry);
        }

        return $tmp;
    }
public function createRanks(array $ranks)
    {
        $tmp = [];
        foreach ($ranks as $entry) {
            $tmp[] = (new RankFactory())->createEntity($entry);
        }

        return $tmp;
    }
@param array $ranks

@return array