Completed
Branch master (06cb84)
by Tomáš
06:00
created

CheckFileTokenEvent   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 1
dl 0
loc 31
ccs 8
cts 8
cp 1
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getFile() 0 4 1
A getStackPointer() 0 4 1
1
<?php
2
3
/*
4
 * This file is part of Symplify
5
 * Copyright (c) 2016 Tomas Votruba (http://tomasvotruba.cz).
6
 */
7
8
namespace Symplify\PHP7_CodeSniffer\Event;
9
10
use PHP_CodeSniffer\Files\File;
11
use Symfony\Component\EventDispatcher\Event;
12
use Symplify\PHP7_CodeSniffer\Contract\File\FileInterface;
13
14
final class CheckFileTokenEvent extends Event
15
{
16
    /**
17
     * @var FileInterface
18
     */
19
    private $file;
20
21
    /**
22
     * @var int
23
     */
24
    private $stackPointer;
25
26 1
    public function __construct(FileInterface $file, int $stackPointer)
27
    {
28 1
        $this->file = $file;
29 1
        $this->stackPointer = $stackPointer;
30 1
    }
31
32
    /**
33
     * @return FileInterface|File
34
     */
35 1
    public function getFile() : FileInterface
36
    {
37 1
        return $this->file;
38
    }
39
40 1
    public function getStackPointer() : int
41
    {
42 1
        return $this->stackPointer;
43
    }
44
}
45