Welcome Guest, Not a member yet? Register   Sign In
How to detect fake function with PHPStan
#1

(This post was last modified: 08-20-2024, 07:41 AM by libsys. Edit Reason: different bootstrapFiles )

I'm using phpstan-codeigniter and it seems to work fine, except for the `fake' function, which is not recognized wherever I use it. It says "Function fake not found".

This is my phpstan.neon:

Code:
includes:
  - vendor/codeigniter/phpstan-codeigniter/extension.neon

parameters:
  level: 6
  paths:
    - app/
    - tests/
  bootstrapFiles:
    -  vendor/codeigniter4/framework/system/Test/bootstrap.php
  excludePaths:
    - app/Views/*

How to make PHPStan detect the fake function?
Reply
#2

This is a sample.
https://github.com/codeigniter4/devkit/b....neon.dist
Reply
#3

(08-19-2024, 11:48 PM)kenjis Wrote: This is a sample.
https://github.com/codeigniter4/devkit/b....neon.dist
Nice, I was missing

Code:
scanDirectories:
- vendor/codeigniter4/framework/system/Helpers

Thanks!
Reply




Theme © iAndrew 2016 - Forum software by © MyBB