It seems like getContainer() 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
17
$this->/** @scrutinizer ignore-call */
18
getContainer()->share('hello.keys.private', function () {
Loading history...
18
return $this->makeCryptKey('private');
19
2
});
20
2
$this->getContainer()->share('hello.keys.public', function () {
21
return $this->makeCryptKey('public');
22
2
});
23
2
}
24
25
/**
26
* @param $return
27
* @return array
28
*/
29
protected function appendCryptKeysToProvide($return)
30
{
31
$return[] = 'hello.keys.private';
32
$return[] = 'hello.keys.public';
33
return $return;
34
}
35
36
/**
37
* Create a CryptKey instance without permissions check