GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

Issues (389)

Branch: master

src/Traits/Renderable.php (2 issues)

Labels
Severity
1
<?php
2
3
namespace SleepingOwl\Admin\Traits;
4
5
use Illuminate\View\View;
6
7
trait Renderable
8
{
9
    /**
10
     * @var string
11
     */
12
    protected $viewPath;
13
14
    /**
15
     * @param string|View $view
16
     *
17
     * @return $this
18
     */
19 4
    public function setView($view)
20
    {
21 4
        $this->viewPath = $view;
22
23 4
        return $this;
24
    }
25
26
    /**
27
     * @return View|string
28
     */
29 12
    public function getView()
30
    {
31 12
        if (empty($this->viewPath) && property_exists($this, 'view')) {
32 7
            return $this->view;
33
        }
34
35 7
        return $this->viewPath;
36
    }
37
38
    /**
39
     * @return string
40
     */
41 1
    public function __toString()
42
    {
43 1
        return (string) $this->render();
44
    }
45
46
    /**
47
     * @return \Illuminate\View\View|\Illuminate\Contracts\View\Factory
48
     */
49 5
    public function render()
50
    {
51 5
        return app('sleeping_owl.template')->view(
0 ignored issues
show
The method view() does not exist on Illuminate\Contracts\Foundation\Application. ( Ignorable by Annotation )

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

51
        return app('sleeping_owl.template')->/** @scrutinizer ignore-call */ view(

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
52 5
            $this->getView(),
53 5
            $this->toArray()
0 ignored issues
show
It seems like toArray() 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

53
            $this->/** @scrutinizer ignore-call */ 
54
                   toArray()
Loading history...
54 5
        );
55
    }
56
}
57