since you are using max level I really hope you are actually using larastan
PHPStan Level 9 is killing me with DTOs — please roast my code (GitHub link inside)
I’m extremely confused about my code structure and I’m hoping a senior developer can help me out.
My confusion: I’m using PHPStan at the maximum level, which means I have to write a lot of heavy annotations just to satisfy PHPStan. Also, I’ve never used DTOs before — this is my first project using them — so I’m not even sure if I’m following the correct approach.
What’s troubling me the most is that after validating the data, when I pass it into the DTO, PHPStan keeps giving warnings because of mixed values.
I’m sharing my project’s GitHub link below. If anyone kind-hearted could take a look at my code, point out where I’m going wrong, and guide me toward the proper way to structure things, I would really appreciate it.
github.com/shahriarshaon1993/myfinance
Please or to participate in this conversation.