1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-14 10:17:33 +01:00
psalm/src/Psalm/Issue/CodeIssue.php

59 lines
987 B
PHP
Raw Normal View History

2016-06-10 00:08:25 +02:00
<?php
2016-07-26 00:37:44 +02:00
namespace Psalm\Issue;
2016-06-10 00:08:25 +02:00
abstract class CodeIssue
{
const CODE_EXCEPTION = 1;
2016-11-02 07:29:00 +01:00
/**
* @var string
*/
2016-06-10 00:08:25 +02:00
protected $file_name;
2016-11-01 05:39:41 +01:00
2016-11-02 07:29:00 +01:00
/**
* @var int
*/
2016-06-10 00:08:25 +02:00
protected $line_number;
2016-11-01 05:39:41 +01:00
2016-11-02 07:29:00 +01:00
/**
* @var string
*/
2016-06-10 00:08:25 +02:00
protected $message;
2016-11-01 05:39:41 +01:00
/**
* @param string $message
* @param string $file_name
* @param int $line_number
*/
2016-06-10 00:08:25 +02:00
public function __construct($message, $file_name, $line_number)
{
$this->line_number = $line_number;
$this->file_name = $file_name;
$this->message = $message;
}
2016-11-02 07:29:00 +01:00
/**
* @return int
*/
2016-06-10 00:08:25 +02:00
public function getLineNumber()
{
2016-11-01 05:39:41 +01:00
return $this->line_number;
2016-06-10 00:08:25 +02:00
}
2016-11-02 07:29:00 +01:00
/**
* @return string
*/
2016-06-10 00:08:25 +02:00
public function getFileName()
{
return $this->file_name;
}
2016-11-02 07:29:00 +01:00
/**
* @return string
*/
2016-06-10 00:08:25 +02:00
public function getMessage()
{
return $this->file_name . ':' . $this->line_number .' - ' . $this->message;
}
}