Completed
Branch refactor/model-abstraction (ca5995)
by Evan
02:38
created

Action::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 1
eloc 2
c 1
b 0
f 1
nc 1
nop 1
dl 0
loc 4
rs 10
1
<?php
2
3
namespace Silk\Database;
4
5
abstract class Action implements Executable
6
{
7
    /**
8
     * The model instance
9
     * @var ActiveRecord
10
     */
11
    protected $model;
12
13
    /**
14
     * Action Constructor.
15
     *
16
     * @param ActiveRecord $model The model performing the action
17
     */
18
    public function __construct(ActiveRecord $model)
19
    {
20
        $this->model = $model;
21
    }
22
23
    /**
24
     * Execute the action.
25
     * 
26
     * @return void
27
     */
28
    abstract public function execute();
29
}
30