Completed
Pull Request — master (#18)
by
unknown
13:28
created

MissingTranslationEvent   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
eloc 3
dl 0
loc 14
rs 10
c 1
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A hasFallback() 0 3 1
A fallback() 0 3 1
A __construct() 0 2 1
1
<?php
2
3
namespace Yiisoft\I18n\Event;
4
5
class MissingTranslationEvent
6
{
7
    public function __construct(string $category, string $language, string $message)
0 ignored issues
show
Unused Code introduced by
The parameter $category is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

7
    public function __construct(/** @scrutinizer ignore-unused */ string $category, string $language, string $message)

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $message is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

7
    public function __construct(string $category, string $language, /** @scrutinizer ignore-unused */ string $message)

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $language is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

7
    public function __construct(string $category, /** @scrutinizer ignore-unused */ string $language, string $message)

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
8
    {
9
    }
10
11
    public function fallback(): ?string
12
    {
13
        return null;
14
    }
15
16
    public function hasFallback(): bool
17
    {
18
        return true;
19
    }
20
}
21