diff --git a/src/Agent.php b/src/Agent.php index 8bed2bd..088c9e3 100644 --- a/src/Agent.php +++ b/src/Agent.php @@ -149,6 +149,8 @@ public function getMbox_sha1sum() { if (isset($this->mbox)) { return sha1($this->mbox); } + + return null; } public function setOpenid($value) { $this->openid = $value; return $this; } public function getOpenid() { return $this->openid; } diff --git a/src/Map.php b/src/Map.php index 09eff6e..1b26bdd 100644 --- a/src/Map.php +++ b/src/Map.php @@ -33,9 +33,7 @@ public function __construct() { } public function asVersion($version = null) { - if (! $this->isEmpty()) { - return $this->_map; - } + return $this->isEmpty() ? null : $this->_map; } public function set($code, $value) { diff --git a/src/RemoteLRS.php b/src/RemoteLRS.php index 9f47257..aff94ee 100644 --- a/src/RemoteLRS.php +++ b/src/RemoteLRS.php @@ -163,7 +163,7 @@ function ($errno, $errstr, $errfile, $errline, array $errcontext) { $metadata = stream_get_meta_data($fp); $content = stream_get_contents($fp); - $response = $this->_parseMetadata($metadata, $options); + $response = $this->_parseMetadata($metadata); // // keep a copy of the raw content, the methods expecting diff --git a/src/Statement.php b/src/Statement.php index c7673e3..c150522 100644 --- a/src/Statement.php +++ b/src/Statement.php @@ -194,7 +194,7 @@ public function sign($privateKeyFile, $privateKeyPass, $options = array()) { } $jws = new JWS($jwsHeader); - $jws->setPayload($serialization, false); + $jws->setPayload($serialization); $jws->sign($privateKey); $attachment = array( diff --git a/tests/StatementTest.php b/tests/StatementTest.php index ba04c09..ddc7d24 100644 --- a/tests/StatementTest.php +++ b/tests/StatementTest.php @@ -803,7 +803,7 @@ public function testVerifyInvalidX5cErrorToException() { 'x5c' => ['notAValidCertificate'] ] ); - $content->setPayload(['prop' => 'val'], false); + $content->setPayload(['prop' => 'val']); $content->sign(openssl_pkey_get_private('file://' . $GLOBALS['KEYs']['private'], $GLOBALS['KEYs']['password'])); $obj = new Statement( @@ -833,7 +833,7 @@ public function testVerifyInvalidX5cNoError() { 'x5c' => ['notAValidCertificate'] ] ); - $content->setPayload(['prop' => 'val'], false); + $content->setPayload(['prop' => 'val']); $content->sign(openssl_pkey_get_private('file://' . $GLOBALS['KEYs']['private'], $GLOBALS['KEYs']['password'])); $obj = new Statement( @@ -865,7 +865,7 @@ public function testVerifyNoPubKey() { 'alg' => 'RS256' ] ); - $content->setPayload(['prop' => 'val'], false); + $content->setPayload(['prop' => 'val']); $content->sign(openssl_pkey_get_private('file://' . $GLOBALS['KEYs']['private'], $GLOBALS['KEYs']['password'])); $obj = new Statement( @@ -897,7 +897,7 @@ public function testVerifyIncorrectPubKey() { 'alg' => 'RS256' ] ); - $content->setPayload(['prop' => 'val'], false); + $content->setPayload(['prop' => 'val']); $content->sign(openssl_pkey_get_private('file://' . $GLOBALS['KEYs']['private'], $GLOBALS['KEYs']['password'])); $obj = new Statement(