PHP 8.1 introduced the never type (https://php.watch/versions/8.1/never-return-type).
If I create a docblock for the following code, it should add @return never and not @return void
<?php
class User
{
public function getName()
{
exit();
}
}
Not really important for me, I just noticed it while I was playing around.
PHP 8.1 introduced the
nevertype (https://php.watch/versions/8.1/never-return-type).If I create a docblock for the following code, it should add
@return neverand not@return voidNot really important for me, I just noticed it while I was playing around.