Code Duplication    Length = 10-16 lines in 2 locations

src/mrcnpdlk/Teryt/Api/Search.php 2 locations

@@ 52-61 (lines=10) @@
49
     *
50
     * @return Miejscowosc[]
51
     */
52
    public static function WyszukajMiejscowosc(string $cityName = null, string $cityId = null)
53
    {
54
        $answer = [];
55
        $res    = Client::getInstance()->request('WyszukajMiejscowosc', ['nazwaMiejscowosci' => $cityName, 'identyfikatorMiejscowosci' => $cityId]);
56
        foreach (Helper::getPropertyAsArray($res, 'Miejscowosc') as $p) {
57
            $answer[] = new Miejscowosc($p);
58
        };
59
60
        return $answer;
61
    }
62
63
    /**
64
     * Zwaraca listę znalezionych miejscowości we wskazanej
@@ 112-127 (lines=16) @@
109
     *
110
     * @return Ulica[]
111
     */
112
    public static function WyszukajUlice(string $streetName = null, string $streetIdentityName = null, string $cityName = null)
113
    {
114
        $answer = [];
115
        $res    = Client::getInstance()->request('WyszukajUlice',
116
            [
117
                'nazwaulicy'        => $streetName,
118
                'cecha'             => $streetIdentityName,
119
                'nazwamiejscowosci' => $cityName,
120
            ])
121
        ;
122
        foreach (Helper::getPropertyAsArray($res, 'Ulica') as $p) {
123
            $answer[] = new Ulica($p);
124
        };
125
126
        return $answer;
127
    }
128
129
    /**
130
     * Zwraca listę znalezionych jednostek w katalagu TERC