Ciudad   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
dl 0
loc 12
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A allByComuna() 0 3 1
1
<?php
2
3
/**
4
 * Clase para manejar las ciudades, tabla 'ciudad'
5
 * 
6
 * PHP version 7.1
7
 * 
8
 * @category    App
9
 * @package     Models
10
 * @author      Henry Stivens Adarme Muñoz <[email protected]>
11
 * @copyright   2017
12
 */
13
class Ciudad extends ActiveRecord
14
{
15
16
    /**
17
     * Lista todas las ciudades de una comuna
18
     * 
19
     * @param int $region_id
20
     * @return array
21
     */
22
    public function allByComuna(int $comuna_id)//validación int de PHP7
23
    {
24
        return $this->find("comuna_id = $comuna_id", 'order: nombre');
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->find(EncapsedNode, 'order: nombre') returns the type ActiveRecord which is incompatible with the documented return type array.
Loading history...
25
    }
26
}
27