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

Email   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 2
Bugs 1 Features 0
Metric Value
wmc 2
eloc 6
dl 0
loc 18
ccs 0
cts 5
cp 0
rs 10
c 2
b 1
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A validation() 0 7 1
A initialize() 0 3 1
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