public function getAll() : array
    {
        $convertedClaims = [];
        $timeFields = ['exp', 'nbf', 'iat'];

        // Convert date times to timestamps
        foreach ($this->claims as $name => $value) {
            if ($value !== null && in_array($name, $timeFields)) {
                /** @var DateTimeImmutable $value */
                $value = $value->getTimestamp();
            }

            $convertedClaims[$name] = $value;
        }

        if (!isset($this->claims['jti'])) {
            $convertedClaims['jti'] = $this->getId();
        }

        return $convertedClaims;
    }
public function getAll() : array
    {
        $convertedClaims = [];
        $timeFields = ['exp', 'nbf', 'iat'];

        // Convert date times to timestamps
        foreach ($this->claims as $name => $value) {
            if ($value !== null && in_array($name, $timeFields)) {
                /** @var DateTimeImmutable $value */
                $value = $value->getTimestamp();
            }

            $convertedClaims[$name] = $value;
        }

        if (!isset($this->claims['jti'])) {
            $convertedClaims['jti'] = $this->getId();
        }

        return $convertedClaims;
    }
public function getAll ( ) : array { $ convertedClaims = [ ] ; $ timeFields = [ 'exp' , 'nbf' , 'iat' ] ; // Convert date times to timestamps foreach ( $ this -> claims as $ name => $ value ) { if ( $ value !== null && in_array ( $ name , $ timeFields ) ) { /** @var DateTimeImmutable $value */ $ value = $ value -> getTimestamp ( ) ; } $ convertedClaims [ $ name ] = $ value ; } if ( ! isset ( $ this -> claims [ 'jti' ] ) ) { $ convertedClaims [ 'jti' ] = $ this -> getId ( ) ; } return $ convertedClaims ; }
Gets the value for all the claims

@return array The mapping of set claims to their values
Gets the value for all the claims