Issues (367)

app/Providers/ShaHashServiceProvider.php (2 issues)

Labels
1
<?php
2
3
4
namespace App\Providers;
5
6
7
use App\Libraries\ShaHash\SHAHasher as SHAHasher;
8
use Illuminate\Hashing\HashServiceProvider;
9
10
class ShaHashServiceProvider extends HashServiceProvider
11
{
12
13
    public function register()
14
    {
15
        $this->app->singleton('hash',function (){
0 ignored issues
show
The method singleton() does not exist on Tests\Laravel\App. ( Ignorable by Annotation )

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

15
        $this->app->/** @scrutinizer ignore-call */ 
16
                    singleton('hash',function (){

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...
16
            return new SHAHasher($this->app);
0 ignored issues
show
$this->app of type Tests\Laravel\App is incompatible with the type Illuminate\Contracts\Foundation\Application expected by parameter $app of App\Libraries\ShaHash\SHAHasher::__construct(). ( Ignorable by Annotation )

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

16
            return new SHAHasher(/** @scrutinizer ignore-type */ $this->app);
Loading history...
17
        });
18
    }
19
20
    public function provides() {
21
        return array('hash');
22
    }
23
24
25
}
26