butschster / LaravelMetaTags

The most powerful and extendable tools for managing SEO Meta Tags in your Laravel project
MIT License
540 stars 50 forks source link

Cannot call abstract method #40

Closed piep14 closed 1 year ago

piep14 commented 3 years ago

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

33Piter commented 2 years ago

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.

AbdullahFaqeir commented 2 years ago

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.