Passed
Push — master ( afc50f...67ec34 )
by Mihail
04:58
created

FormContentPublish::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 1 Features 0
Metric Value
cc 1
eloc 3
c 1
b 1
f 0
nc 1
nop 1
dl 0
loc 5
rs 9.4285
1
<?php
2
3
namespace Apps\Model\Admin\Content;
4
5
use Ffcms\Core\Arch\Model;
6
7
class FormContentPublish extends Model
8
{
9
    /** @var \Apps\ActiveRecord\Content */
10
    private $_records;
11
12
    /**
13
     * FormContentPublish constructor. Pass records inside
14
     * @param $records
15
     */
16
    public function __construct($records)
17
    {
18
        $this->_records = $records;
19
        parent::__construct();
20
    }
21
22
    /**
23
     * Update records and set display = 1
24
     */
25
    public function make()
26
    {
27
        $this->_records->update(['display' => 1]);
28
    }
29
}