Completed
Push — master ( 84750e...bb7498 )
by Marcin
02:41
created

Dictionary   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 40
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 4
dl 0
loc 40
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A PobierzSlownikRodzajowJednostek() 0 5 1
A PobierzSlownikRodzajowSIMC() 0 9 2
A PobierzSlownikCechULIC() 0 5 1
1
<?php
2
/**
3
 * TERYT-API
4
 *
5
 * Copyright (c) 2017 pudelek.org.pl
6
 *
7
 * For the full copyright and license information, please view source file
8
 * that is bundled with this package in the file LICENSE
9
 *
10
 * Author Marcin Pudełek <[email protected]>
11
 *
12
 */
13
14
/**
15
 * Created by Marcin.
16
 * Date: 10.09.2017
17
 * Time: 12:47
18
 */
19
20
namespace mrcnpdlk\Teryt\Api;
21
22
23
use mrcnpdlk\Teryt\Client;
24
use mrcnpdlk\Teryt\Helper;
25
26
class Dictionary
27
{
28
    /**
29
     * Zwraca listę rodzajów jednostek
30
     *
31
     * @return string[]
32
     */
33
    public static function PobierzSlownikRodzajowJednostek()
34
    {
35
        $res = Client::getInstance()->request('PobierzSlownikRodzajowJednostek');
36
37
        return Helper::getPropertyAsArray($res, 'string');
38
    }
39
40
    /**
41
     * Zwraca listę rodzajów miejscowości
42
     *
43
     * @return RodzajMiejscowosci[]
44
     */
45
    public static function PobierzSlownikRodzajowSIMC()
46
    {
47
        $answer = [];
48
        $res    = Client::getInstance()->request('PobierzSlownikRodzajowSIMC');
49
        foreach (Helper::getPropertyAsArray($res, 'RodzajMiejscowosci') as $p) {
50
            $answer[] = new RodzajMiejscowosci($p);
0 ignored issues
show
Bug introduced by
The type mrcnpdlk\Teryt\Api\RodzajMiejscowosci was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
51
        };
52
53
        return $answer;
54
    }
55
56
    /**
57
     * Zwraca listę cech obiektów z katalogu ulic
58
     *
59
     * @return string[]
60
     */
61
    public static function PobierzSlownikCechULIC()
62
    {
63
        $res = Client::getInstance()->request('PobierzSlownikCechULIC');
64
65
        return Helper::getPropertyAsArray($res, 'string');
66
    }
67
}
68