Issues (22)

src/Traits/Containers/Pathable.php (2 issues)

Labels
Severity
1
<?php
2
3
namespace Helldar\LaravelLangPublisher\Traits\Containers;
4
5
use Helldar\LaravelLangPublisher\Contracts\Pathable as PathableContract;
6
use Helldar\LaravelLangPublisher\Support\Path\Json as JsonPath;
7
use Helldar\LaravelLangPublisher\Support\Path\Php as PhpPath;
8
9
trait Pathable
10
{
11 102
    protected function getPath(): PathableContract
12
    {
13 102
        return $this->wantsJson()
0 ignored issues
show
It seems like wantsJson() must be provided by classes using this trait. How about adding it as abstract method to this trait? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

13
        return $this->/** @scrutinizer ignore-call */ wantsJson()
Loading history...
14 54
            ? $this->container(JsonPath::class)
0 ignored issues
show
It seems like container() must be provided by classes using this trait. How about adding it as abstract method to this trait? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

14
            ? $this->/** @scrutinizer ignore-call */ container(JsonPath::class)
Loading history...
15 102
            : $this->container(PhpPath::class);
16
    }
17
}
18