Passed
Push — master ( 9e0df9...182fd8 )
by
unknown
01:26 queued 11s
created

File::findPrevious()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 12

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 1
CRAP Score 1

Importance

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