| 1 | <?php |
||
| 11 | class Report implements \IteratorAggregate, \Countable { |
||
| 12 | |||
| 13 | /** |
||
| 14 | * @var Message[] |
||
| 15 | */ |
||
| 16 | private $messages = []; |
||
| 17 | |||
| 18 | |||
| 19 | |||
| 20 | |||
| 21 | /** |
||
| 22 | * @param File $file |
||
| 23 | * @param FileTool $tool |
||
| 24 | * @param string $message |
||
| 25 | * @param int|null $line |
||
| 26 | * @return $this |
||
| 27 | */ |
||
| 28 | 18 | public function addMessage(File $file, FileTool $tool, $message, $line = null) { |
|
| 32 | |||
| 33 | |||
| 34 | /** |
||
| 35 | * @return Message[] |
||
| 36 | */ |
||
| 37 | 10 | public function getIterator() { |
|
| 40 | |||
| 41 | |||
| 42 | /** |
||
| 43 | * Count elements of an object |
||
| 44 | * @link http://php.net/manual/en/countable.count.php |
||
| 45 | * @return int The custom count as an integer. |
||
| 46 | * </p> |
||
| 47 | * <p> |
||
| 48 | * The return value is cast to an integer. |
||
| 49 | * @since 5.1.0 |
||
| 50 | */ |
||
| 51 | public function count() { |
||
| 54 | |||
| 55 | } |