PhpStorm version 2020.3 shows an error on $timestamps
property in my Laravel model:
{Model} and HasTimestamps define the same property timestamps
This is a bug and it's introduced in the new version of PhpStorm.
It's not possible to disable the warning since it's an annotator inspection. I also don't recommend changing your code for the sole purpose of fixing this warning since it's an IDE bug and will be addressed in their next patch. If it's not really causing any breaking side effects, just wait until the patch is released!
This bug has been fixed in PhpStorm 2020.3.1.
It seems like a PHPStorm bug.
If it bothers you, you can change public $timestamps = false;
to
public function usesTimestamps() : bool{
return false;
}
This is a PhpStorm bug, I fixed with define as property on class phpdoc.
Like this:
Also you can update your PhpStorm.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With