Skip to content

bug: phpstan-codeigniter forces a model class extends CodeIgniter\Model #8

Description

@kenjis

PHP Version

8.1

PHPStan CodeIgniter Version

v1.4.2.70400

PHPStan Version

1.10.39

What happened?

 ------ ---------------------------------------------------------------------------------------------------- 
  Line   app/Controllers/ActionsController.php                                                               
 ------ ---------------------------------------------------------------------------------------------------- 
  46     Argument #1 $name ('App\\Models\\NotificationMutedModel') passed to function model does not extend  
         CodeIgniter\\Model.                                                                                 
 ------ ----------------------------------------------------------------------------------------------------

https://github.com/kenjis/forum-example/blob/37a339f050ee2c40ed452e6570cef188dc0f90a0/app/Controllers/ActionsController.php#L46
https://github.com/kenjis/forum-example/blob/37a339f050ee2c40ed452e6570cef188dc0f90a0/app/Models/NotificationMutedModel.php#L11

Minimum Reproduction Script

git clone https://github.com/kenjis/forum-example --branch=add-phpstan-codeigniter
cd forum-example/
composer install
vendor/bin/phpstan

Expected Output

No error on ActionsController

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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