Completed
Push — master ( d7f072...e80481 )
by Shcherbak
05:37
created

Message::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 6
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 7
ccs 6
cts 6
cp 1
rs 9.4285
cc 1
eloc 5
nc 1
nop 4
crap 1
1
<?php
2
3
  namespace Funivan\Cs\Report;
4
5
  use Funivan\Cs\FileFinder\File;
6
  use Funivan\Cs\FileTool\FileTool;
7
8
  /**
9
   * @author Ivan Shcherbak <[email protected]> 2016
10
   */
11
  class Message {
12
13
    /**
14
     * @var File
15
     */
16
    private $file;
17
18
    /**
19
     * @var string
20
     */
21
    private $text;
22
23
24
    /**
25
     * @var FileTool
26
     */
27
    private $tool;
28
29
    /**
30
     * @var int|null
31
     */
32
    private $line;
33
34
35
    /**
36
     * @param File $file
37
     * @param FileTool $tool
38
     * @param $text
39
     * @param int|null $line
40
     * @param int $level
0 ignored issues
show
Bug introduced by
There is no parameter named $level. Was it maybe removed?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.

Consider the following example. The parameter $italy is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $island
 * @param array $italy
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was removed, but the annotation was not.

Loading history...
41
     */
42 18
    public function __construct(File $file, FileTool $tool, $text, $line) {
43
44 18
      $this->file = $file;
45 18
      $this->text = $text;
46 18
      $this->tool = $tool;
47 18
      $this->line = $line;
48 18
    }
49
50
51
    /**
52
     * @return string
53
     */
54
    public function getText() {
55
      return $this->text;
56
    }
57
58
59
    /**
60
     * @return File
61
     */
62
    public function getFile() {
63
      return $this->file;
64
    }
65
66
67
    /**
68
     * @return int|null
69
     */
70 7
    public function getLine() {
71 7
      return $this->line;
72
    }
73
74
75
    /**
76
     * @return FileTool
77
     */
78
    public function getTool() {
79
      return $this->tool;
80
    }
81
82
  }