Completed
Pull Request — master (#140)
by ARCANEDEV
17:13
created

UntranslatableAttributeException::make()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 2
dl 0
loc 8
ccs 4
cts 4
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php namespace Arcanedev\Localization\Exceptions;
2
3
/**
4
 * Class     UntranslatableAttributeException
5
 *
6
 * @package  Arcanedev\Localization\Exceptions
7
 * @author   ARCANEDEV <[email protected]>
8
 */
9
class UntranslatableAttributeException extends LocalizationException 
10
{
11 4
    public static function make(string $key, array $translatableAttributes)
12
    {
13 4
        $translatableAttributes = implode(', ', $translatableAttributes);
14
15 4
        return new static(
16 4
            "The attribute `{$key}` is untranslatable because it's not available in the translatable array: `$translatableAttributes`"
17
        );
18
    }
19
}
20