GeolocalizableCriteriaTrait   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A asGeolocalizable() 0 8 2
1
<?php
2
3
/**
4
 * This file is part of the Cubiche package.
5
 *
6
 * Copyright (c) Cubiche
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
namespace Cubiche\Domain\Geolocation\Specification;
12
13
use Cubiche\Domain\Geolocation\Selector\Geolocalizable;
14
15
/**
16
 * Geolocalizable Criteria Trait.
17
 *
18
 * @author Karel Osorio Ramírez <[email protected]>
19
 */
20
trait GeolocalizableCriteriaTrait
21
{
22
    /**
23
     * @var Geolocalizable
24
     */
25
    protected static $geolocalizable = null;
26
27
    /**
28
     * @return \Cubiche\Domain\Geolocation\Selector\Geolocalizable
29
     */
30
    public static function asGeolocalizable()
31
    {
32
        if (self::$geolocalizable === null) {
33
            self::$geolocalizable = new Geolocalizable();
34
        }
35
36
        return self::$geolocalizable;
37
    }
38
}
39