public function check(array $claims, array $mandatoryClaims = []): array
    {
        $this->checkMandatoryClaims($mandatoryClaims, $claims);
        $checkedClaims = [];
        foreach ($this->checkers as $claim => $checker) {
            if (\array_key_exists($claim, $claims)) {
                $checker->checkClaim($claims[$claim]);
                $checkedClaims[$claim] = $claims[$claim];
            }
        }

        return $checkedClaims;
    }
public function check(array $claims, array $mandatoryClaims = []): array
    {
        $this->checkMandatoryClaims($mandatoryClaims, $claims);
        $checkedClaims = [];
        foreach ($this->checkers as $claim => $checker) {
            if (\array_key_exists($claim, $claims)) {
                $checker->checkClaim($claims[$claim]);
                $checkedClaims[$claim] = $claims[$claim];
            }
        }

        return $checkedClaims;
    }
public function check ( array $ claims , array $ mandatoryClaims = [ ] ) : array { $ this -> checkMandatoryClaims ( $ mandatoryClaims , $ claims ) ; $ checkedClaims = [ ] ; foreach ( $ this -> checkers as $ claim => $ checker ) { if ( \ array_key_exists ( $ claim , $ claims ) ) { $ checker -> checkClaim ( $ claims [ $ claim ] ) ; $ checkedClaims [ $ claim ] = $ claims [ $ claim ] ; } } return $ checkedClaims ; }
This method checks all the claims passed as argument.
All claims are checked against the claim checkers.
If one fails, the InvalidClaimException is thrown.

This method returns an array with all checked claims.
It is up to the implementor to decide use the claims that have not been checked.

@param string[] $mandatoryClaims

@throws InvalidClaimException
@throws MissingMandatoryClaimException
This method checks all the claims passed as argument . All claims are checked against the claim checkers . If one fails the InvalidClaimException is thrown .