From 84b27b8fd5d8d9d9e7e32290e005a142d7ea2e89 Mon Sep 17 00:00:00 2001 From: Florent Morselli Date: Wed, 16 Dec 2015 20:56:28 +0100 Subject: [PATCH] Useless injections removed --- src/Loader.php | 14 -------------- src/Verifier.php | 12 ------------ tests/TestCase.php | 4 ---- 3 files changed, 30 deletions(-) diff --git a/src/Loader.php b/src/Loader.php index 6259e723..6b2e7f92 100644 --- a/src/Loader.php +++ b/src/Loader.php @@ -12,14 +12,9 @@ namespace Jose; use Base64Url\Base64Url; -use Jose\Algorithm\JWAManagerInterface; use Jose\Behaviour\HasCheckerManager; -use Jose\Behaviour\HasCompressionManager; -use Jose\Behaviour\HasJWAManager; -use Jose\Behaviour\HasKeyChecker; use Jose\Behaviour\HasPayloadConverter; use Jose\Checker\CheckerManagerInterface; -use Jose\Compression\CompressionManagerInterface; use Jose\Object\JWE; use Jose\Object\JWS; use Jose\Payload\PayloadConverterManagerInterface; @@ -31,29 +26,20 @@ */ final class Loader implements LoaderInterface { - use HasKeyChecker; - use HasJWAManager; use HasCheckerManager; use HasPayloadConverter; - use HasCompressionManager; /** * Loader constructor. * - * @param \Jose\Algorithm\JWAManagerInterface $jwa_manager * @param \Jose\Payload\PayloadConverterManagerInterface $payload_converter_manager - * @param \Jose\Compression\CompressionManagerInterface $compression_manager * @param \Jose\Checker\CheckerManagerInterface $checker_manager */ public function __construct( - JWAManagerInterface $jwa_manager, PayloadConverterManagerInterface $payload_converter_manager, - CompressionManagerInterface $compression_manager, CheckerManagerInterface $checker_manager) { - $this->setJWAManager($jwa_manager); $this->setPayloadConverter($payload_converter_manager); - $this->setCompressionManager($compression_manager); $this->setCheckerManager($checker_manager); } diff --git a/src/Verifier.php b/src/Verifier.php index 927d948e..7b4da3c7 100644 --- a/src/Verifier.php +++ b/src/Verifier.php @@ -14,15 +14,11 @@ use Jose\Algorithm\JWAManagerInterface; use Jose\Algorithm\Signature\SignatureInterface; use Jose\Behaviour\HasCheckerManager; -use Jose\Behaviour\HasCompressionManager; use Jose\Behaviour\HasJWAManager; use Jose\Behaviour\HasKeyChecker; -use Jose\Behaviour\HasPayloadConverter; use Jose\Checker\CheckerManagerInterface; -use Jose\Compression\CompressionManagerInterface; use Jose\Object\JWKSetInterface; use Jose\Object\JWSInterface; -use Jose\Payload\PayloadConverterManagerInterface; /** */ @@ -31,26 +27,18 @@ final class Verifier implements VerifierInterface use HasKeyChecker; use HasJWAManager; use HasCheckerManager; - use HasPayloadConverter; - use HasCompressionManager; /** * Loader constructor. * * @param \Jose\Algorithm\JWAManagerInterface $jwa_manager - * @param \Jose\Payload\PayloadConverterManagerInterface $payload_converter_manager - * @param \Jose\Compression\CompressionManagerInterface $compression_manager * @param \Jose\Checker\CheckerManagerInterface $checker_manager */ public function __construct( JWAManagerInterface $jwa_manager, - PayloadConverterManagerInterface $payload_converter_manager, - CompressionManagerInterface $compression_manager, CheckerManagerInterface $checker_manager) { $this->setJWAManager($jwa_manager); - $this->setPayloadConverter($payload_converter_manager); - $this->setCompressionManager($compression_manager); $this->setCheckerManager($checker_manager); } diff --git a/tests/TestCase.php b/tests/TestCase.php index 52bf5bee..bab00ff9 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -82,9 +82,7 @@ class TestCase extends \PHPUnit_Framework_TestCase protected function getLoader() { $loader = new Loader( - $this->getJWAManager(), $this->getPayloadConverterManager(), - $this->getCompressionManager(), $this->getCheckerManager() ); @@ -113,8 +111,6 @@ protected function getVerifier() { $loader = new Verifier( $this->getJWAManager(), - $this->getPayloadConverterManager(), - $this->getCompressionManager(), $this->getCheckerManager() );