Passed
Pull Request — master (#77)
by Björn
02:32
created

File::harmonizeFindResult()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 1
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
ccs 1
cts 1
cp 1
cc 2
nc 2
nop 1
crap 2
1
<?php
2
3
declare(strict_types=1);
4
5
namespace BestIt\CodeSniffer;
6
7
use http\Exception;
8
use PHP_CodeSniffer\Files\File as BaseFile;
9
use PHP_CodeSniffer\Fixer;
10
use function func_get_args;
11
12
/**
13
 * Class File
14
 *
15
 * Wrapper Class for PhpCsFile to provide a consistent way to replace int|bool returns
16
 * with int|bool returns false
17
 * Additionally there could be some architecture changes in the future, like Token-Objects and so on.
18
 *
19
 * @author Nick Lubisch <[email protected]>
20
 * @package BestIt\CodeSniffer
21
 */
22
class File extends AbstractFileDecorator
23
{
24
    /**
25
     * Returns the eol char of the file
26
     *
27
     * @return string Returns the EndOfLine-Character of the processed file
28
     */
29
    public function getEolChar(): string
30
    {
31
        return $this->getBaseFile()->eolChar;
32
    }
33
34
    /**
35
     * Returns the Wrapped PHP_CodeSniffer_Fixer
36
     *
37
     * @return Fixer Returns the fixer class.
38
     */
39
    public function getFixer(): Fixer
40
    {
41
        return $this->getBaseFile()->fixer;
42
    }
43
}
44