Test Failed
Push — master ( 741545...e25e21 )
by Julien
11:23
created

Field::validation()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 2
c 1
b 0
f 0
dl 0
loc 7
ccs 0
cts 3
cp 0
rs 10
cc 1
nc 1
nop 0
crap 2
1
<?php
2
/**
3
 * This file is part of the Zemit Framework.
4
 *
5
 * (c) Zemit Team <[email protected]>
6
 *
7
 * For the full copyright and license information, please view the LICENSE.txt
8
 * file that was distributed with this source code.
9
 */
10
11
namespace Zemit\Models;
12
13
use Zemit\Models\Base\AbstractField;
14
use Phalcon\Validation\Validator\PresenceOf;
15
use Phalcon\Validation\Validator\StringLength\Max;
16
17
/**
18
 * Class Field
19
 *
20
 * @package Zemit\Models
21
 */
22
class Field extends AbstractField
23
{
24
    protected $deleted = self::NO;
25
26
    public function initialize()
27
    {
28
        parent::initialize();
29
        // @todo relationships
30
    }
31
32
    public function validation()
33
    {
34
        $validator = $this->genericValidation();
35
36
        // @todo validations
37
38
        return $this->validate($validator);
39
    }
40
}
41