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.

EncryptionVerifierStub   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
c 1
b 0
f 0
lcom 0
cbo 1
dl 0
loc 11
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 8 1
1
<?php
2
3
namespace Emarref\Jwt\Verification;
4
5
use Emarref\Jwt\Encoding;
6
use Emarref\Jwt\Encryption;
7
use Emarref\Jwt\Signature\SignerInterface;
8
9
class EncryptionVerifierStub extends EncryptionVerifier
10
{
11
    public function __construct(
12
        Encryption\EncryptionInterface $encryption,
13
        Encoding\EncoderInterface $encoder,
14
        SignerInterface $signer
15
    ) {
16
        parent::__construct($encryption, $encoder);
17
        $this->signer = $signer;
0 ignored issues
show
Documentation Bug introduced by
$signer is of type object<Emarref\Jwt\Signature\SignerInterface>, but the property $signer was declared to be of type object<Emarref\Jwt\Signature\Jws>. Are you sure that you always receive this specific sub-class here, or does it make sense to add an instanceof check?

Our type inference engine has found a suspicous assignment of a value to a property. This check raises an issue when a value that can be of a given class or a super-class is assigned to a property that is type hinted more strictly.

Either this assignment is in error or an instanceof check should be added for that assignment.

class Alien {}

class Dalek extends Alien {}

class Plot
{
    /** @var  Dalek */
    public $villain;
}

$alien = new Alien();
$plot = new Plot();
if ($alien instanceof Dalek) {
    $plot->villain = $alien;
}
Loading history...
18
    }
19
}
20