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

PrimaryTrait::setPrimaryKey()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 4
rs 10
c 0
b 0
f 0
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
}