Skip to content

Commit e1e8302

Browse files
committed
Solve some cases of dead code
1 parent df4c1f3 commit e1e8302

File tree

6 files changed

+27
-48
lines changed

6 files changed

+27
-48
lines changed

build/phpstan.neon

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ parameters:
6161
- 'PHPStan\Reflection\MissingPropertyFromReflectionException'
6262
- 'PHPStan\Reflection\MissingConstantFromReflectionException'
6363
- 'PHPStan\Type\CircularTypeAliasDefinitionException'
64-
- 'PHPStan\Broker\ClassAutoloadingException'
6564
- 'LogicException'
6665
- 'Error'
6766
check:

src/Analyser/UndefinedVariableException.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@
55
use PHPStan\AnalysedCodeException;
66
use function sprintf;
77

8+
/**
9+
* @api
10+
*
11+
* Unchecked exception thrown from `PHPStan\Analyser\Scope::getVariableType()`
12+
* in case the user doesn't check `hasVariableType()` is not `no()`.
13+
*/
814
final class UndefinedVariableException extends AnalysedCodeException
915
{
1016

src/Broker/ClassAutoloadingException.php

Lines changed: 0 additions & 47 deletions
This file was deleted.

src/Broker/ClassNotFoundException.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@
55
use PHPStan\AnalysedCodeException;
66
use function sprintf;
77

8+
/**
9+
* @api
10+
*
11+
* Unchecked exception thrown from `ReflectionProvider` and other places
12+
* in case the user does not check the existence of the class beforehand
13+
* with `hasClass()` or similar.
14+
*/
815
final class ClassNotFoundException extends AnalysedCodeException
916
{
1017

src/Broker/ConstantNotFoundException.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@
55
use PHPStan\AnalysedCodeException;
66
use function sprintf;
77

8+
/**
9+
* @api
10+
*
11+
* Unchecked exception thrown from `ReflectionProvider`
12+
* in case the user does not check the existence of the constant beforehand
13+
* with `hasConstant()`.
14+
*/
815
final class ConstantNotFoundException extends AnalysedCodeException
916
{
1017

src/Broker/FunctionNotFoundException.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@
55
use PHPStan\AnalysedCodeException;
66
use function sprintf;
77

8+
/**
9+
* @api
10+
*
11+
* Unchecked exception thrown from `ReflectionProvider`
12+
* in case the user does not check the existence of the function beforehand
13+
* with `hasFunction()`.
14+
*/
815
final class FunctionNotFoundException extends AnalysedCodeException
916
{
1017

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy