Passed
Push — master ( 636052...60f6c1 )
by Julien
05:04
created

Email::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
dl 0
loc 7
ccs 0
cts 3
cp 0
rs 10
c 1
b 0
f 0
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\Db\Column;
14
use Zemit\Models\Abstracts\AbstractEmail;
15
use Phalcon\Incubator\Mailer\Manager;
16
use Phalcon\Messages\Message;
17
use Phalcon\Filter\Validation\Validator\PresenceOf;
18
use Phalcon\Filter\Validation\Validator\StringLength\Max;
19
use Phalcon\Filter\Validation\Validator\Uniqueness;
20
use Phalcon\Filter\Validation\Validator\Numericality;
21
use Zemit\Models\Interfaces\EmailInterface;
22
23
/**
24
 * @property Template $TemplateEntity
25
 * @method Template getTemplateEntity(?array $params = null)
26
 * 
27
 * @property EmailFile $FileNode
28
 * @method EmailFile getFileNode(?array $params = null)
29
 * 
30
 * @property File $FileList
31
 * @method File getFileList(?array $params = null)
32
 */
33
class Email extends AbstractEmail implements EmailInterface
34
{
35
    protected $deleted = self::NO;
36
    protected $sent = self::NO;
37
    
38
    public function initialize(): void
39
    {
40
        parent::initialize();
41
        // @todo relationships
42
    }
43
    
44
    public function validation(): bool
45
    {
46
        $validator = $this->genericValidation();
47
        
48
        // @todo validations
49
        
50
        return $this->validate($validator);
51
    }
52
}
53