| 1 | <?php |
||
| 23 | class FileError extends File |
||
| 24 | { |
||
| 25 | /** |
||
| 26 | * The error message from Exception |
||
| 27 | * @var string |
||
| 28 | **/ |
||
| 29 | private $errorMessage; |
||
| 30 | |||
| 31 | /** |
||
| 32 | * Constructor |
||
| 33 | * |
||
| 34 | * @param string $file |
||
| 35 | * @return void |
||
|
|
|||
| 36 | **/ |
||
| 37 | public function __construct($file, $errorMessage) |
||
| 42 | |||
| 43 | /** |
||
| 44 | * Get the error message |
||
| 45 | * |
||
| 46 | * @return string |
||
| 47 | */ |
||
| 48 | public function getErrorMessage() |
||
| 52 | } |
||
| 53 |
Adding a
@returnannotation to a constructor is not recommended, since a constructor does not have a meaningful return value.Please refer to the PHP core documentation on constructors.