A
A
AlpineMilk2018-04-03 19:44:56
phpstorm
AlpineMilk, 2018-04-03 19:44:56

Why is phpStorm highlighting Exception?

There is a validation function that processes the file. PHPStorm why highlights exceptions
for clarity, I made a screen in which you can see how the storm reacts and what error it writes
5ac3ae967d346262916519.png
. Although I process these exceptions when calling, please tell me what he doesn’t like?

try{
    $this->validate($file_csv);
}catch (\Exception $e){
    echo $e->getMessage();
    die;
}

Answer the question

In order to leave comments, you need to log in

1 answer(s)
J
jasonOk, 2018-04-03
@AlpineMilk

Add a comment (annotation) to the validate method.
To do this, place the cursor on the line before enter and press Enter. Should workprivate function validate/**

/**
* @param $file
* @throws Exception
*
**/
private function validate ($file) {

It won't light up anymore.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question