Skip to content

Commit

Permalink
Finalize all internal classes
Browse files Browse the repository at this point in the history
  • Loading branch information
danog committed Oct 26, 2023
1 parent 2726ad4 commit ec23f99
Show file tree
Hide file tree
Showing 368 changed files with 370 additions and 370 deletions.
2 changes: 1 addition & 1 deletion examples/TemplateChecker.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
use function strtolower;
use function trim;

class TemplateAnalyzer extends Psalm\Internal\Analyzer\FileAnalyzer
final class TemplateAnalyzer extends Psalm\Internal\Analyzer\FileAnalyzer
{
const VIEW_CLASS = 'Your\\View\\Class';

Expand Down
2 changes: 1 addition & 1 deletion examples/TemplateScanner.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
use function preg_match;
use function trim;

class TemplateScanner extends Psalm\Internal\Scanner\FileScanner
final class TemplateScanner extends Psalm\Internal\Scanner\FileScanner
{
const VIEW_CLASS = 'Your\\View\\Class';

Expand Down
2 changes: 1 addition & 1 deletion examples/plugins/ClassUnqualifier.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
use function strpos;
use function strtolower;

class ClassUnqualifier implements AfterClassLikeExistenceCheckInterface
final class ClassUnqualifier implements AfterClassLikeExistenceCheckInterface
{
public static function afterClassLikeExistenceCheck(
AfterClassLikeExistenceCheckEvent $event
Expand Down
4 changes: 2 additions & 2 deletions examples/plugins/FunctionCasingChecker.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
/**
* Checks that functions and methods are correctly-cased
*/
class FunctionCasingChecker implements AfterFunctionCallAnalysisInterface, AfterMethodCallAnalysisInterface
final class FunctionCasingChecker implements AfterFunctionCallAnalysisInterface, AfterMethodCallAnalysisInterface
{
public static function afterMethodCallAnalysis(AfterMethodCallAnalysisEvent $event): void
{
Expand Down Expand Up @@ -99,6 +99,6 @@ public static function afterFunctionCallAnalysis(AfterFunctionCallAnalysisEvent
}
}

class IncorrectFunctionCasing extends PluginIssue
final class IncorrectFunctionCasing extends PluginIssue
{
}
2 changes: 1 addition & 1 deletion examples/plugins/InternalChecker.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

use function strpos;

class InternalChecker implements AfterClassLikeAnalysisInterface
final class InternalChecker implements AfterClassLikeAnalysisInterface
{
/** @return null|false */
public static function afterStatementAnalysis(AfterClassLikeAnalysisEvent $event): ?bool
Expand Down
4 changes: 2 additions & 2 deletions examples/plugins/PreventFloatAssignmentChecker.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
/**
* Prevents any assignment to a float value
*/
class PreventFloatAssignmentChecker implements AfterExpressionAnalysisInterface
final class PreventFloatAssignmentChecker implements AfterExpressionAnalysisInterface
{
/**
* Called after an expression has been checked
Expand Down Expand Up @@ -40,6 +40,6 @@ public static function afterExpressionAnalysis(AfterExpressionAnalysisEvent $eve
}
}

class NoFloatAssignment extends PluginIssue
final class NoFloatAssignment extends PluginIssue
{
}
2 changes: 1 addition & 1 deletion examples/plugins/SafeArrayKeyChecker.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
use Psalm\Plugin\EventHandler\Event\AddRemoveTaintsEvent;
use Psalm\Plugin\EventHandler\RemoveTaintsInterface;

class SafeArrayKeyChecker implements RemoveTaintsInterface
final class SafeArrayKeyChecker implements RemoveTaintsInterface
{
/**
* Called to see what taints should be removed
Expand Down
2 changes: 1 addition & 1 deletion examples/plugins/StringChecker.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
use function strpos;
use function strtolower;

class StringChecker implements AfterExpressionAnalysisInterface
final class StringChecker implements AfterExpressionAnalysisInterface
{
/**
* Called after an expression has been checked
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
use Psalm\Type\Atomic\TLiteralString;
use Psalm\Type\Atomic\TString;

class EchoChecker implements AfterStatementAnalysisInterface
final class EchoChecker implements AfterStatementAnalysisInterface
{
/**
* Called after a statement has been checked
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
use Psalm\Plugin\RegistrationInterface;
use SimpleXMLElement;

class PluginEntryPoint implements PluginEntryPointInterface
final class PluginEntryPoint implements PluginEntryPointInterface
{
public function __invoke(RegistrationInterface $registration, ?SimpleXMLElement $config = null): void
{
Expand Down
2 changes: 1 addition & 1 deletion src/Psalm/Internal/Algebra.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
/**
* @internal
*/
class Algebra
final class Algebra
{
/**
* @param array<string, non-empty-list<non-empty-list<Assertion>>> $all_types
Expand Down
2 changes: 1 addition & 1 deletion src/Psalm/Internal/Algebra/FormulaGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
/**
* @internal
*/
class FormulaGenerator
final class FormulaGenerator
{
/**
* @return list<Clause>
Expand Down
2 changes: 1 addition & 1 deletion src/Psalm/Internal/Analyzer/AlgebraAnalyzer.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
/**
* @internal
*/
class AlgebraAnalyzer
final class AlgebraAnalyzer
{
/**
* This looks to see if there are any clauses in one formula that contradict
Expand Down
2 changes: 1 addition & 1 deletion src/Psalm/Internal/Analyzer/AttributesAnalyzer.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
/**
* @internal
*/
class AttributesAnalyzer
final class AttributesAnalyzer
{
private const TARGET_DESCRIPTIONS = [
1 => 'class',
Expand Down
2 changes: 1 addition & 1 deletion src/Psalm/Internal/Analyzer/ClassAnalyzer.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
/**
* @internal
*/
class ClassAnalyzer extends ClassLikeAnalyzer
final class ClassAnalyzer extends ClassLikeAnalyzer
{
/**
* @var array<string, Union>
Expand Down
2 changes: 1 addition & 1 deletion src/Psalm/Internal/Analyzer/ClassLikeNameOptions.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
/**
* @internal
*/
class ClassLikeNameOptions
final class ClassLikeNameOptions
{
public bool $inferred;

Expand Down
2 changes: 1 addition & 1 deletion src/Psalm/Internal/Analyzer/ClosureAnalyzer.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
* @internal
* @extends FunctionLikeAnalyzer<PhpParser\Node\Expr\Closure|PhpParser\Node\Expr\ArrowFunction>
*/
class ClosureAnalyzer extends FunctionLikeAnalyzer
final class ClosureAnalyzer extends FunctionLikeAnalyzer
{
/**
* @param PhpParser\Node\Expr\Closure|PhpParser\Node\Expr\ArrowFunction $function
Expand Down
2 changes: 1 addition & 1 deletion src/Psalm/Internal/Analyzer/CommentAnalyzer.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
/**
* @internal
*/
class CommentAnalyzer
final class CommentAnalyzer
{
public const TYPE_REGEX = '(\??\\\?[\(\)A-Za-z0-9_&\<\.=,\>\[\]\-\{\}:|?\\\\]*|\$[a-zA-Z_0-9_]+)';

Expand Down
2 changes: 1 addition & 1 deletion src/Psalm/Internal/Analyzer/DataFlowNodeData.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* @psalm-immutable
* @internal
*/
class DataFlowNodeData
final class DataFlowNodeData
{
use ImmutableNonCloneableTrait;

Expand Down
2 changes: 1 addition & 1 deletion src/Psalm/Internal/Analyzer/FunctionAnalyzer.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* @internal
* @extends FunctionLikeAnalyzer<PhpParser\Node\Stmt\Function_>
*/
class FunctionAnalyzer extends FunctionLikeAnalyzer
final class FunctionAnalyzer extends FunctionLikeAnalyzer
{
public function __construct(PhpParser\Node\Stmt\Function_ $function, SourceAnalyzer $source)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
/**
* @internal
*/
class ReturnTypeAnalyzer
final class ReturnTypeAnalyzer
{
/**
* @param Closure|Function_|ClassMethod|ArrowFunction $function
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
*
* @internal
*/
class ReturnTypeCollector
final class ReturnTypeCollector
{
/**
* Gets the return types from a list of statements
Expand Down
2 changes: 1 addition & 1 deletion src/Psalm/Internal/Analyzer/InterfaceAnalyzer.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
/**
* @internal
*/
class InterfaceAnalyzer extends ClassLikeAnalyzer
final class InterfaceAnalyzer extends ClassLikeAnalyzer
{
public function __construct(
PhpParser\Node\Stmt\Interface_ $interface,
Expand Down
2 changes: 1 addition & 1 deletion src/Psalm/Internal/Analyzer/IssueData.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
/**
* @internal
*/
class IssueData
final class IssueData
{
public const SEVERITY_INFO = 'info';
public const SEVERITY_ERROR = 'error';
Expand Down
2 changes: 1 addition & 1 deletion src/Psalm/Internal/Analyzer/MethodAnalyzer.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
* @internal
* @extends FunctionLikeAnalyzer<PhpParser\Node\Stmt\ClassMethod>
*/
class MethodAnalyzer extends FunctionLikeAnalyzer
final class MethodAnalyzer extends FunctionLikeAnalyzer
{
// https://github.com/php/php-src/blob/a83923044c48982c80804ae1b45e761c271966d3/Zend/zend_enum.c#L77-L95
private const FORBIDDEN_ENUM_METHODS = [
Expand Down
2 changes: 1 addition & 1 deletion src/Psalm/Internal/Analyzer/MethodComparator.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
/**
* @internal
*/
class MethodComparator
final class MethodComparator
{
/**
* @param string[] $suppressed_issues
Expand Down
2 changes: 1 addition & 1 deletion src/Psalm/Internal/Analyzer/NamespaceAnalyzer.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
/**
* @internal
*/
class NamespaceAnalyzer extends SourceAnalyzer
final class NamespaceAnalyzer extends SourceAnalyzer
{
use CanAlias;

Expand Down
2 changes: 1 addition & 1 deletion src/Psalm/Internal/Analyzer/ProjectAnalyzer.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
/**
* @internal
*/
class ProjectAnalyzer
final class ProjectAnalyzer
{
/**
* Cached config
Expand Down
2 changes: 1 addition & 1 deletion src/Psalm/Internal/Analyzer/ScopeAnalyzer.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
/**
* @internal
*/
class ScopeAnalyzer
final class ScopeAnalyzer
{
public const ACTION_END = 'END';
public const ACTION_BREAK = 'BREAK';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
/**
* @internal
*/
class DoAnalyzer
final class DoAnalyzer
{
public static function analyze(
StatementsAnalyzer $statements_analyzer,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
/**
* @internal
*/
class ForAnalyzer
final class ForAnalyzer
{
/**
* @return false|null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
/**
* @internal
*/
class ForeachAnalyzer
final class ForeachAnalyzer
{
/**
* @return false|null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
/**
* @internal
*/
class IfConditionalAnalyzer
final class IfConditionalAnalyzer
{
public static function analyze(
StatementsAnalyzer $statements_analyzer,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
/**
* @internal
*/
class ElseAnalyzer
final class ElseAnalyzer
{
/**
* @return false|null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
/**
* @internal
*/
class ElseIfAnalyzer
final class ElseIfAnalyzer
{
/**
* @return false|null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
/**
* @internal
*/
class IfAnalyzer
final class IfAnalyzer
{
/**
* @param array<string, Union> $pre_assignment_else_redefined_vars
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
/**
* @internal
*/
class IfElseAnalyzer
final class IfElseAnalyzer
{
/**
* System of type substitution and deletion
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
/**
* @internal
*/
class LoopAnalyzer
final class LoopAnalyzer
{
/**
* Checks an array of statements in a loop
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
/**
* @internal
*/
class SwitchAnalyzer
final class SwitchAnalyzer
{
public static function analyze(
StatementsAnalyzer $statements_analyzer,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
/**
* @internal
*/
class SwitchCaseAnalyzer
final class SwitchCaseAnalyzer
{
/**
* @return null|false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
/**
* @internal
*/
class TryAnalyzer
final class TryAnalyzer
{
/**
* @return false|null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
/**
* @internal
*/
class WhileAnalyzer
final class WhileAnalyzer
{
/**
* @return false|null
Expand Down
Loading

0 comments on commit ec23f99

Please sign in to comment.