Passed
Push — master ( f1d673...c425eb )
by mcfog
01:06
created

TwigViewBuilderTrait.php (1 issue)

Labels
Severity
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Lit\View\Twig;
6
7
trait TwigViewBuilderTrait
8
{
9
    /**
10
     * @var TwigViewFactory
11
     */
12
    protected $twigViewFactory;
13
14
    public function injectTwigViewFactory(TwigViewFactory $twigViewFactory)
15
    {
16
        $this->twigViewFactory = $twigViewFactory;
17
        return $this;
18
    }
19
20
    protected function twig(string $name)
21
    {
22
        return $this->attachView($this->twigViewFactory->load($name));
0 ignored issues
show
It seems like attachView() 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

22
        return $this->/** @scrutinizer ignore-call */ attachView($this->twigViewFactory->load($name));
Loading history...
23
    }
24
}
25