IndexAction::initialize()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 1
dl 0
loc 5
rs 10
c 0
b 0
f 0
1
<?php
2
/**
3
 * Copyright 2016 - 2018, Cake Development Corporation (http://cakedc.com)
4
 *
5
 * Licensed under The MIT License
6
 * Redistributions of files must retain the above copyright notice.
7
 *
8
 * @copyright Copyright 2016 - 2018, Cake Development Corporation (http://cakedc.com)
9
 * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
10
 */
11
12
namespace CakeDC\Api\Test\App\Service\Action\Author;
13
14
use CakeDC\Api\Exception\ValidationException;
15
use CakeDC\Api\Service\Action\CrudAction;
16
use Cake\Http\Exception\NotImplementedException;
17
use Cake\Validation\Validator;
18
19
class IndexAction extends CrudAction
20
{
21
22
    public function initialize(array $config)
23
    {
24
        parent::initialize($config);
25
        $this->Auth->allow($this->getName());
26
    }
27
28
    /**
29
     * Apply validation process.
30
     *
31
     * @return bool
32
     */
33
    public function validates()
34
    {
35
        return true;
36
    }
37
38
    public function execute()
39
    {
40
        return 'custom action applied';
41
    }
42
}
43