1
0
mirror of https://github.com/danog/psalm.git synced 2025-01-22 05:41:20 +01:00

Add no-returns et al to list of psalm-reserved words

This commit is contained in:
Brown 2019-01-02 17:26:05 -05:00
parent cca0070d38
commit 6a744c0f07
2 changed files with 11 additions and 0 deletions

View File

@ -66,6 +66,9 @@ abstract class Type
'static' => true,
'scalar' => true,
'numeric' => true,
'no-return' => true,
'never-return' => true,
'never-returns' => true,
];
/**

View File

@ -541,6 +541,7 @@ class ReturnTypeTest extends TestCase
],
'neverReturnsSimple' => [
'<?php
namespace Foo;
/**
* @return never-returns
*/
@ -550,6 +551,7 @@ class ReturnTypeTest extends TestCase
],
'neverReturnsCovariance' => [
'<?php
namespace Foo;
class A {
/**
* @return string
@ -570,6 +572,7 @@ class ReturnTypeTest extends TestCase
],
'noReturnCallReturns' => [
'<?php
namespace Foo;
/**
* @return never-returns
*/
@ -838,6 +841,7 @@ class ReturnTypeTest extends TestCase
],
'callNeverReturns' => [
'<?php
namespace Foo;
/**
* @return never-returns
*/
@ -850,6 +854,7 @@ class ReturnTypeTest extends TestCase
],
'returnNeverReturns' => [
'<?php
namespace Foo;
/**
* @return never-returns
*/
@ -864,6 +869,7 @@ class ReturnTypeTest extends TestCase
],
'useNeverReturnsAsArg' => [
'<?php
namespace Foo;
/**
* @return never-returns
*/
@ -878,6 +884,7 @@ class ReturnTypeTest extends TestCase
],
'invalidNoReturnType' => [
'<?php
namespace Foo;
/**
* @return never-returns
*/
@ -887,6 +894,7 @@ class ReturnTypeTest extends TestCase
],
'invalidNoReturnStatement' => [
'<?php
namespace Foo;
/**
* @return never-returns
*/