Code Duplication    Length = 10-10 lines in 4 locations

src/Client.php 4 locations

@@ 63-72 (lines=10) @@
60
     * @return \stdClass
61
     * @throws \RuntimeException
62
     */
63
    public function getCalendar(DateTime $startDate, DateTime $endDate)
64
    {
65
        $params = [
66
            'SelectDateBegin' => $startDate->format('d/m/Y'),
67
            'SelectDateEnd' => $endDate->format('d/m/Y'),
68
        ];
69
        return $this->launcher
70
            ->launchRequest(self::ENDPOINT . '/emt-proxy-server/last/bus/GetCalendar.php', $params)
71
            ->resultValues;
72
    }
73
74
    /**
75
     * Return a list with line details.
@@ 82-91 (lines=10) @@
79
     * @return \stdClass
80
     * @throws \RuntimeException
81
     */
82
    public function getListLines(array $lines, DateTime $date)
83
    {
84
        $params = [
85
            'Lines' => join('|', $lines),
86
            'SelectDate' => $date->format('d/m/Y'),
87
        ];
88
        return $this->launcher
89
            ->launchRequest(self::ENDPOINT . '/emt-proxy-server/last/bus/GetListLines.php', $params)
90
            ->resultValues;
91
    }
92
93
    /**
94
     * Return details about all line groups.
@@ 114-123 (lines=10) @@
111
     * @return \stdClass
112
     * @throws \RuntimeException
113
     */
114
    public function getTimesLines(array $lines, DateTime $date)
115
    {
116
        $params = [
117
            'Lines' => join('|', $lines),
118
            'SelectDate' => $date->format('d/m/Y'),
119
        ];
120
        return $this->launcher
121
            ->launchRequest(self::ENDPOINT . '/emt-proxy-server/last/bus/GetTimesLines.php', $params)
122
            ->resultValues;
123
    }
124
125
    /**
126
     * Return timetable details of one or more lines.
@@ 133-142 (lines=10) @@
130
     * @return \stdClass
131
     * @throws \RuntimeException
132
     */
133
    public function getTimeTableLines(array $lines, DateTime $date)
134
    {
135
        $params = [
136
            'Lines' => join('|', $lines),
137
            'SelectDate' => $date->format('d/m/Y'),
138
        ];
139
        return $this->launcher
140
            ->launchRequest(self::ENDPOINT . '/emt-proxy-server/last/bus/GetTimeTableLines.php', $params)
141
            ->resultValues;
142
    }
143
144
    /**
145
     * Return details of one or more bus stops including name, served lines