Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
Signed-off-by: Mior Muhammad Zaki <crynobone@gmail.com>
  • Loading branch information
crynobone committed Oct 1, 2024
1 parent dbdde87 commit f151e0a
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 26 deletions.
13 changes: 0 additions & 13 deletions src/SerializableClosure.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

use Closure;
use Laravel\SerializableClosure\Exceptions\InvalidSignatureException;
use Laravel\SerializableClosure\Exceptions\PhpVersionNotSupportedException;
use Laravel\SerializableClosure\Serializers\Signed;
use Laravel\SerializableClosure\Signers\Hmac;

Expand All @@ -25,10 +24,6 @@ class SerializableClosure
*/
public function __construct(Closure $closure)
{
if (\PHP_VERSION_ID < 70400) {
throw new PhpVersionNotSupportedException();
}

$this->serializable = Serializers\Signed::$signer
? new Serializers\Signed($closure)
: new Serializers\Native($closure);
Expand All @@ -41,10 +36,6 @@ public function __construct(Closure $closure)
*/
public function __invoke()
{
if (\PHP_VERSION_ID < 70400) {
throw new PhpVersionNotSupportedException();
}

return call_user_func_array($this->serializable, func_get_args());
}

Expand All @@ -55,10 +46,6 @@ public function __invoke()
*/
public function getClosure()
{
if (\PHP_VERSION_ID < 70400) {
throw new PhpVersionNotSupportedException();
}

return $this->serializable->getClosure();
}

Expand Down
13 changes: 0 additions & 13 deletions src/UnsignedSerializableClosure.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
namespace Laravel\SerializableClosure;

use Closure;
use Laravel\SerializableClosure\Exceptions\PhpVersionNotSupportedException;

class UnsignedSerializableClosure
{
Expand All @@ -22,10 +21,6 @@ class UnsignedSerializableClosure
*/
public function __construct(Closure $closure)
{
if (\PHP_VERSION_ID < 70400) {
throw new PhpVersionNotSupportedException();
}

$this->serializable = new Serializers\Native($closure);
}

Expand All @@ -36,10 +31,6 @@ public function __construct(Closure $closure)
*/
public function __invoke()
{
if (\PHP_VERSION_ID < 70400) {
throw new PhpVersionNotSupportedException();
}

return call_user_func_array($this->serializable, func_get_args());
}

Expand All @@ -50,10 +41,6 @@ public function __invoke()
*/
public function getClosure()
{
if (\PHP_VERSION_ID < 70400) {
throw new PhpVersionNotSupportedException();
}

return $this->serializable->getClosure();
}

Expand Down

0 comments on commit f151e0a

Please sign in to comment.