Skip to content

PHPStan: Write-only properties never read in multiple classes #4

@Vitexus

Description

@Vitexus

PHPStan level 5 reports several properties that are written but never read, indicating dead code or missing functionality.

Found running PHPStan 2.x with PHP 8.4.

Affected files

  • DataObjects/SubscribeWebHook.php:40$jsonContent is never read, only written
  • DataObjects/UnsubscribeWebHook.php:42$jsonContent is never read, only written
  • Exceptions/InvalidResponseException.php:22$response is never read, only written
  • Exceptions/UnsupportedLanguageException.php:20$language is never read, only written
  • Exceptions/User/UserCreationBadEmailSyntaxException.php:22$emailAddress is never read, only written
  • RPC/Client.php:25$jsonAdapter is never read, only written

How to reproduce

vendor/bin/phpstan analyse --level=5 src/

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions