Skip to main content

Example 3: Correct Data to Functions

Premium
2 min read

Have you ever encountered an issue where you accidentally passed the wrong data to your function?

This can happen not only with arrays but with any other data. And Larastan is here to help you catch those cases:

For this example we'll run it on level 5:

includes:
- ./vendor/nunomaduro/larastan/extension.neon
 
parameters:
paths:
- app/
# Level 9 is the highest level
level: 5

After running ./vendor/bin/phpstan analyze we'll see an error too:...

The Full Lesson is Only for Premium Members

Want to access all of our courses? (31 h 16 min)

You also get:

55 courses
Premium tutorials
Access to repositories
Private Discord
Get Premium for $129/year or $29/month

Already a member? Login here

Comments & Discussion

No comments yet…