Completed
Branch feature/pre-split (c69968)
by Anton
21:25
created

PrimaryTrait   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A primaryKey() 0 4 1
A setPrimaryKey() 0 4 1
1
<?php
2
/**
3
 * components
4
 *
5
 * @author    Wolfy-J
6
 */
7
namespace Spiral\ORM\Commands\Traits;
8
9
trait PrimaryTrait
10
{
11
    /**
12
     * Primary key value (from previous command), promised on execution!.
13
     *
14
     * @var mixed
15
     */
16
    private $primaryKey;
17
18
    /**
19
     * Promised on execute.
20
     *
21
     * @return mixed|null
22
     */
23
    public function primaryKey()
24
    {
25
        return $this->primaryKey;
26
    }
27
28
    /**
29
     * @param mixed $primaryKey
30
     */
31
    public function setPrimaryKey($primaryKey)
32
    {
33
        $this->primaryKey = $primaryKey;
34
    }
35
}