ParameterAwareTrait   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getParameter() 0 4 1
A initParameter() 0 5 1
1
<?php
2
/**
3
 * Phossa Project
4
 *
5
 * PHP version 5.4
6
 *
7
 * @category  Library
8
 * @package   Phossa2\Query
9
 * @copyright Copyright (c) 2016 phossa.com
10
 * @license   http://mit-license.org/ MIT License
11
 * @link      http://www.phossa.com/
12
 */
13
/*# declare(strict_types=1); */
14
15
namespace Phossa2\Query\Traits;
16
17
use Phossa2\Query\Misc\Parameter;
18
use Phossa2\Query\Interfaces\ParameterAwareInterface;
19
20
/**
21
 * ParameterAwareTrait
22
 *
23
 * @package Phossa2\Query
24
 * @author  Hong Zhang <[email protected]>
25
 * @see     ParameterAwareInterface
26
 * @version 2.0.0
27
 * @since   2.0.0 added
28
 */
29
trait ParameterAwareTrait
30
{
31
    /**
32
     * the Parameter object
33
     *
34
     * @var    Parameter
35
     * @access protected
36
     */
37
    protected $parameter;
38
39
    /**
40
     * {@inheritDoc}
41
     */
42
    public function getParameter()/*# : Parameter */
43
    {
44
        return $this->parameter;
45
    }
46
47
    /**
48
     * Create Parameter object
49
     *
50
     * @return $this
51
     * @access protected
52
     */
53
    protected function initParameter()
54
    {
55
        $this->parameter = new Parameter();
56
        return $this;
57
    }
58
}
59