Completed
Push — master ( 045130...aef0e3 )
by Andrés
03:17
created

OrganismoTransito   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 1
dl 0
loc 19
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getDatasetIdentifier() 0 4 1
A getByCodDivipola() 0 5 1
1
<?php
2
3
namespace Andreshg112\DatosAbiertos\Datasets;
4
5
class OrganismoTransito extends BaseDataset
6
{
7
    protected function getDatasetIdentifier()
8
    {
9
        return 'nnja-ngwf';
10
    }
11
12
    /**
13
     * Consulta los datos de un organismo de tránsito por su código.
14
     *
15
     * @param string $codMpio
16
     * @return array|null
17
     */
18
    public function getByCodDivipola(string $codMpio)
19
    {
20
        $data = $this->getData(['cod_divipola' => $codMpio]);
21
        return $data[0] ?? null;
22
    }
23
}
24