Test Failed
Push — master ( 507036...762659 )
by Julien
21:33
created

MinimumAction   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
eloc 7
c 0
b 0
f 0
dl 0
loc 25
ccs 0
cts 5
cp 0
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A minimumAction() 0 4 1
A minAction() 0 3 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\Controller\Traits\Actions\Rest;
13
14
use Exception;
15
use Phalcon\Http\ResponseInterface;
16
use Zemit\Mvc\Controller\Traits\Abstracts\AbstractInjectable;
17
use Zemit\Mvc\Controller\Traits\Abstracts\AbstractModel;
18
use Zemit\Mvc\Controller\Traits\Abstracts\AbstractQuery;
19
use Zemit\Mvc\Controller\Traits\Abstracts\AbstractRestResponse;
20
21
trait MinimumAction
22
{
23
    use AbstractInjectable;
24
    use AbstractQuery;
25
    use AbstractRestResponse;
26
    
27
    /**
28
     * Minimum value of a column
29
     * Alias for minimumAction
30
     * @link minimumAction()
31
     * @throws Exception
32
     */
33
    public function minAction(): ResponseInterface
34
    {
35
        return $this->minimumAction();
36
    }
37
    
38
    /**
39
     * Minimum value of a column
40
     * @throws Exception
41
     */
42
    public function minimumAction(): ResponseInterface
43
    {
44
        $this->view->setVar('minimum', $this->minimum());
45
        return $this->setRestResponse(true);
46
    }
47
}
48