ServiceExists::validatedBy()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace Storeman\Validation\Constraints;
4
5
use Symfony\Component\Validator\Constraint;
6
7
abstract class ServiceExists extends Constraint
8
{
9
    /**
10
     * Has to return a string prefix which in conjunction with the validated value has to exist as a service name.
11
     *
12
     * @return string
13
     */
14
    abstract public function getPrefix(): string;
15
16
    /**
17
     * @return string
18
     */
19
    abstract public function getMessage(): string;
20
21
    /**
22
     * {@inheritdoc}
23
     */
24
    final public function validatedBy()
25
    {
26
        return ExistingServiceValidator::class;
27
    }
28
}
29