Passed
Push — master ( c72848...3af666 )
by Stephen
03:25 queued 01:13
created

AbstractPublicViewModel::__construct()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 2
eloc 4
c 1
b 0
f 0
nc 2
nop 3
dl 0
loc 7
rs 10
1
<?php
2
3
namespace Sfneal\ViewModels;
4
5
abstract class AbstractPublicViewModel extends AbstractViewModel
6
{
7
    public $limit = null;
8
    public $learn_more = false;
9
    public $public = true;
10
11
    public function __construct($limit=100, $learn_more=false, $public=true)
12
    {
13
        $this->limit = $limit;
14
        $this->learn_more = $learn_more;
15
16
        $this->public = $public;
17
        $this->view = ($public == true)?"public.{$this->view}":"{$this->view}";
18
    }
19
}
20