mramsden/tefel

View on GitHub
src/Tefel/JourneyPlanner/JourneyPlannerRepository.php

Summary

Maintainability
A
0 mins
Test Coverage
<?php
namespace Tefel\JourneyPlanner;

class JourneyPlannerRepository
{

    private $validLines = ["BAK", "CEN", "CIR", "DIS", "HAM", "JUB", "MET", "NTN",
        "PIC", "VIC", "WAT", "DLR"];

    /**
     * Gets all services for the supplied line identifer.
     *
     * @param string $line
     *
     * @return array|Service
     */
    public function getAllServices($line)
    {
        $this->checkLine($line);

        return [];
    }

    private function checkLine($line)
    {
        if (!in_array($line, $this->validLines)) {
            throw new UnrecognizedLineIdentifierException();
        }
    }

}