TypeHints mystery #4475
-
Why is this passing without errors: And why does this give me errors: The second code was adapted by me from the first version because in my project also the second code throws errors. How can the first code run without complaints about typehints, although there are none? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
You're running level 5 - missing typehints are reported on level 6: https://phpstan.org/r/fdc810d6-34a3-4def-8e08-85af642a9093 But if you add wrong typehints (like an unknown class), it's reported earlier, that's why your 2nd link reports errors. |
Beta Was this translation helpful? Give feedback.
You're running level 5 - missing typehints are reported on level 6: https://phpstan.org/r/fdc810d6-34a3-4def-8e08-85af642a9093
But if you add wrong typehints (like an unknown class), it's reported earlier, that's why your 2nd link reports errors.