LaravelMetaTags icon indicating copy to clipboard operation
LaravelMetaTags copied to clipboard

Cannot call abstract method

Open piep14 opened this issue 2 years ago • 2 comments

Hello,

If I write this code, as the doc says, I get this message returned by phpStorm. My page doesn't bug but the editor doesn't seem to like it.

use Butschster\Head\Facades\Meta;

Meta::setTitle('Dashboard')
            ->setDescription('Dashboard');

Cannot call abstract method 'MetaInterface::setTitle'

Is there anything I can do? Thank you

piep14 avatar Sep 01 '21 14:09 piep14

This is a bug from PhpStorm 2021.2.4 (and perhaps other earlier versions). I updated to 2021.3 (https://www.jetbrains.com/phpstorm/whatsnew/) and the issue is fixed.

33Piter avatar Dec 28 '21 18:12 33Piter

Hello @piep14,

As you are using the Facade class of this package, this will keep on showing because of the autocomplete feature of PHPStorm, a simple PR can be made to add PHPDocs to the facade class to point out the accessible methods and their type hinting accordingly.

I'll try to do this myself today.

AbdullahFaqeir avatar Mar 08 '22 07:03 AbdullahFaqeir