Completed
Push — master ( bfc368...43106f )
by Shcherbak
02:26
created

LineTokenData   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 54
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1
Metric Value
wmc 5
lcom 0
cbo 1
dl 0
loc 54
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 2
A getLinesNum() 0 3 1
A getToken() 0 3 1
A getWhitespace() 0 3 1
1
<?
0 ignored issues
show
Security Best Practice introduced by
It is not recommend to use PHP's short opening tag <?, better use <?php, or <?= in case of outputting.

Short opening tags are disabled in PHP’s default configuration. In such a case, all content of this file is output verbatim to the browser without being parsed, or executed.

As a precaution to avoid these problems better use the long opening tag <?php.

Loading history...
2
3
  namespace Funivan\Cs\Tools\Php\LineAfterOpenTag;
4
5
  use Funivan\PhpTokenizer\Token;
6
7
  /**
8
   *
9
   */
10
  class LineTokenData {
11
12
    /**
13
     * @var int
14
     */
15
    private $linesNum;
16
17
    /**
18
     * @var Token
19
     */
20
    private $token;
21
22
    /**
23
     * @var Token
24
     */
25
    private $whitespace;
26
27
28
    /**
29
     * @param int $linesNum
30
     * @param Token $token
31
     * @param Token $whitespace
32
     */
33
    public function __construct($linesNum, Token $token, Token $whitespace = null) {
34
      $this->linesNum = $linesNum;
35
      $this->token = $token;
36
      $this->whitespace = $whitespace ? $whitespace : new Token();
37
    }
38
39
40
    /**
41
     * @return int
42
     */
43
    public function getLinesNum() {
44
      return $this->linesNum;
45
    }
46
47
48
    /**
49
     * @return Token
50
     */
51
    public function getToken() {
52
      return $this->token;
53
    }
54
55
56
    /**
57
     * @return Token
58
     */
59
    public function getWhitespace() {
60
      return $this->whitespace;
61
    }
62
63
  }