SelfRecipient   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 1
dl 0
loc 20
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A validatedBy() 0 4 1
A getTargets() 0 4 1
1
<?php
2
3
/*
4
 * This file is part of the MilioooMessageBundle package.
5
 *
6
 * (c) Michiel boeckaert <[email protected]>
7
 * This source file is subject to the MIT license that is bundled
8
 * with this source code in the file LICENSE.
9
 */
10
11
namespace Miliooo\MessagingBundle\Validator\Constraint;
12
13
use Symfony\Component\Validator\Constraint;
14
15
/**
16
 * Self recipient constraint.
17
 *
18
 * @author Michiel Boeckaert <[email protected]>
19
 */
20
class SelfRecipient extends Constraint
21
{
22
    public $message = 'validate.author_not_recipient';
23
24
    /**
25
     * {@inheritdoc}
26
     */
27
    public function validatedBy()
28
    {
29
        return 'miliooo_messaging.validator.self_recipient';
30
    }
31
32
    /**
33
     * {@inheritDoc}
34
     */
35
    public function getTargets()
36
    {
37
        return self::PROPERTY_CONSTRAINT;
38
    }
39
}
40