laravel-langman icon indicating copy to clipboard operation
laravel-langman copied to clipboard

Add Support for PHP 7.4

Open muhammadn opened this issue 5 years ago • 4 comments

PHP 7.4 ternary operations works differently (ie. more explicit) with brackets.

muhammadn avatar Apr 21 '20 09:04 muhammadn

Brackets are inserted wrongly as far as I can see. This seems like a harmful thing to do. Why would you insert closing brackets halfway the ternary operation? Clearly they should be around the whole ternary operator in this visibly formatted expression.

muisit avatar May 09 '20 08:05 muisit

@muisit I'm using PHP 7.4 and trying to fix this issue. If you feel i am wrong, then i hope you can help fix it.

muhammadn avatar May 09 '20 12:05 muhammadn

As I wrote, the closing parenthesis should be at the end of the expression, not halfway the ternary operator. You have a double closing parenthesis at line 115. Remove one and add it at the very end of that same line (but obviously before the semi-colon...).
Clearly the isset condition check belongs to the expression on that whole line. Where you added the closing parenthesis makes absolutely no sense.

muisit avatar May 09 '20 12:05 muisit

do you invite PR?

daaner avatar Sep 30 '20 18:09 daaner