Test Failed
Push — master ( 894c40...e5d2d2 )
by Julien
11:34
created

Expose   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 4
c 1
b 0
f 0
dl 0
loc 11
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A expose() 0 5 1
1
<?php
2
3
/**
4
 * This file is part of the Zemit Framework.
5
 *
6
 * (c) Zemit Team <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE.txt
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Zemit\Mvc\Model;
13
14
use Phalcon\Mvc\ModelInterface;
15
use Zemit\Support\Exposer\Exposer;
16
17
trait Expose
18
{
19
    /**
20
     * @todo refactor expose system
21
     * @return mixed
22
     */
23
    public function expose(?array $columns = null, ?bool $expose = null, ?bool $protected = null)
24
    {
25
        assert($this instanceof ModelInterface);
26
        $exposeBuilder = Exposer::createBuilder($this, $columns, $expose, $protected);
27
        return Exposer::expose($exposeBuilder);
28
    }
29
}
30