Just learned about the "@phpstan-assert-if-true" PHPStan annotation. Useful for creating custom type-checking functions that PHPStan can understand and use for type narrowing.

#PHP #PHPStan

image

46

Thrilled to announce that I'll be speaking at the next Laravel Ahmedabad Meetup! 🎉

I'll be diving into the world of PHP Types and exploring the power of PHPStan to enhance code quality. Whether you're new to static analysis or already using it, this talk will offer valuable insights to elevate your development process.

Join us on October 20th at 7Span HQ for a knowledge-packed talk! 💻

Date: October 20th, 10 AM
Venue: 7Span HQ, Ahmedabad

Looking forward to connecting with fellow developers and sharing ideas!

🎟️ bit.ly/laravel-meetup-ahmedabad-oct-2024

#Laravel #PHP #PHPStan
image

Improve your Laravel code,

Declaring @var @return annotations will improve IDE autocompletions. and get more clear idea what keys used.

If you have an array then you can use this.

#PHPStan

image

232

Up to Level 5 all checks are passed.

But in Level 6, facing this errors.

Any solution?

#PHPStan

image

192