Repository Analysis

phpstan/phpstan

PHP Static Analysis Tool - discover bugs in your code without running it!

0.3 Likely human-written View on GitHub
0.3
Adjusted Score
0.3
Raw Score
100%
Time Factor
2026-05-30
Last Push
13,972
Stars
PHP
Language
139,581
Lines of Code
1568
Files
40
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 0HIGH 0MEDIUM 1LOW 39

Pattern Findings

40 matches across 4 categories. Click a row to expand file-level details.

Hyper-Verbose Identifiers18 hits · 18 pts
SeverityFileLineSnippet
LOWwebsite/errors/impure.functionCall.md13function computeAndLog(int $value): int
LOWwebsite/errors/impure.functionCall.md49 function computeAndLog(int $value): int
LOW…oping-extensions/additional-constructors-extensions.md30 public function getAdditionalConstructors(ClassReflection $classReflection): array;
LOW…oping-extensions/additional-constructors-extensions.md48 public function getAdditionalConstructors(ClassReflection $classReflection): array
LOWwebsite/src/developing-extensions/closure-extensions.md25 public function getTypeTypeFromMethodCall(
LOWwebsite/src/developing-extensions/closure-extensions.md71 public function getClosureThisTypeFromMethodCall(
LOW…developing-extensions/dynamic-throw-type-extensions.md25 public function getThrowTypeFromMethodCall(
LOW…developing-extensions/dynamic-throw-type-extensions.md64public function getThrowTypeFromMethodCall(
LOW…developing-extensions/parameter-out-type-extensions.md27 public function getParameterOutTypeFromMethodCall(
LOW…developing-extensions/parameter-out-type-extensions.md70 public function getParameterOutTypeFromMethodCall(
LOW…c/developing-extensions/class-reflection-extensions.md54 public function canChangeTypeAfterAssignment(): bool;
LOW…c/developing-extensions/restricted-usage-extensions.md86 public function isRestrictedClassNameUsage(
LOW…c/developing-extensions/restricted-usage-extensions.md137 public function isRestrictedPropertyUsage(
LOW…c/developing-extensions/restricted-usage-extensions.md169 public function isRestrictedClassConstantUsage(
LOW…c/developing-extensions/restricted-usage-extensions.md199 public function isRestrictedFunctionUsage(
LOW…bsite/src/_posts/preprocessing-ast-for-custom-rules.md75private function isUnhandledMatchErrorCaught(Node $node): bool
LOW…bsite/src/_posts/preprocessing-ast-for-custom-rules.md113private function isUnhandledMatchErrorCaught(Node $node): bool
LOWwebsite/src/writing-php-code/phpdocs-basics.md130function acceptCallableAndCallLater(callable $cb): void
Over-Commented Block13 hits · 13 pts
SeverityFileLineSnippet
LOWwebsite/infra/lib/website-stack.ts21 readonly testDomain: string;
LOWwebsite/infra/functions/phpstan-org-edge.js1// CloudFront Function (runtime cloudfront-js-2.0), viewer-request.
LOWwebsite/scripts/build-wasm.sh1#!/usr/bin/env bash
LOWwebsite/src/js/codeMirror.ts41 }),
LOWwebsite/src/js/phpantom/worker.ts1// Web Worker hosting the PHPantom language server (compiled to wasm32-wasip1)
LOWwebsite/src/js/editor/occurrences.ts1import {Decoration, DecorationSet, EditorView, ViewPlugin, ViewUpdate, keymap} from '@codemirror/view';
LOWwebsite/src/js/editor/docBlock.ts61};
LOW.github/actionlint.yaml1self-hosted-runner:
LOW.github/workflows/integration-tests.yml401 setup: |
LOWe2e/symfony-event/config/routes.yaml1#index:
LOWe2e/symfony-event/config/packages/cache.yaml1framework:
LOWe2e/undiscoverable-symbols-3/config/routes.yaml1#index:
LOWe2e/undiscoverable-symbols-3/config/packages/cache.yaml1framework:
Fake / Example Data8 hits · 11 pts
SeverityFileLineSnippet
LOWwebsite/errors/propertyGetHook.noRead.md17 return "John Doe";
LOWwebsite/errors/propertyGetHook.noRead.md50- return "John Doe";
LOWwebsite/errors/propertyGetHook.noRead.md76- return "John Doe";
LOW…c/_posts/remembering-and-forgetting-returned-values.md165 $person->setName('John Doe');
LOW…why-is-instanceof-type-wrong-and-getting-deprecated.md54Another example of a deprecated check is `instanceof ConstantStringType` which represents a literal string like `'lorem
LOW…why-is-instanceof-type-wrong-and-getting-deprecated.md61// do something with $type->getValue() (which is 'lorem ipsum')
LOW…why-is-instanceof-type-wrong-and-getting-deprecated.md64PHPStan 1.10 wants you to use `Type::getConstantStrings(): list<ConstantStringType>`. It's plural because it wants you t
LOW…why-is-instanceof-type-wrong-and-getting-deprecated.md64PHPStan 1.10 wants you to use `Type::getConstantStrings(): list<ConstantStringType>`. It's plural because it wants you t
Self-Referential Comments1 hit · 3 pts
SeverityFileLineSnippet
MEDIUMe2e/symfony-event/config/services.yaml1# This file is the entry point to configure your own services.