placeholderRequired()   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 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Yokai\EnumBundle\Exception;
6
7
use InvalidArgumentException;
8
9
/**
10
 * @author Yann Eugoné <[email protected]>
11
 */
12
class InvalidTranslatePatternException extends InvalidArgumentException
13
{
14
    /**
15
     * @param string $transPattern
16
     *
17
     * @return InvalidTranslatePatternException
0 ignored issues
show
Documentation introduced by
Should the return type not be \self?

This check compares the return type specified in the @return annotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.

Loading history...
18
     */
19
    public static function placeholderRequired(string $transPattern): self
20
    {
21
        return new self(sprintf('Translation pattern "%s" must contain %%s placeholder', $transPattern));
22
    }
23
}
24