From 3745b5c215d30ca47a0f667b8784f2d07a546641 Mon Sep 17 00:00:00 2001 From: Miljan Ilic Date: Sun, 10 Mar 2024 13:27:18 +0100 Subject: [PATCH 1/3] Optimize Imports --- .../Exception/FailedCalculatingInitializationVectorLength.php | 1 - src/Cipher/Exception/FailedDecryptingValue.php | 1 - src/Cipher/Exception/FailedEncryptingValue.php | 1 - src/Cipher/Exception/FailedGeneratingInitializationVector.php | 1 - 4 files changed, 4 deletions(-) diff --git a/src/Cipher/Exception/FailedCalculatingInitializationVectorLength.php b/src/Cipher/Exception/FailedCalculatingInitializationVectorLength.php index 9223a08..3a044d0 100644 --- a/src/Cipher/Exception/FailedCalculatingInitializationVectorLength.php +++ b/src/Cipher/Exception/FailedCalculatingInitializationVectorLength.php @@ -2,7 +2,6 @@ namespace IlicMiljan\SecureProps\Cipher\Exception; -use LogicException; use RuntimeException; use Throwable; diff --git a/src/Cipher/Exception/FailedDecryptingValue.php b/src/Cipher/Exception/FailedDecryptingValue.php index 470aff4..7180202 100644 --- a/src/Cipher/Exception/FailedDecryptingValue.php +++ b/src/Cipher/Exception/FailedDecryptingValue.php @@ -2,7 +2,6 @@ namespace IlicMiljan\SecureProps\Cipher\Exception; -use LogicException; use RuntimeException; use Throwable; diff --git a/src/Cipher/Exception/FailedEncryptingValue.php b/src/Cipher/Exception/FailedEncryptingValue.php index 585366c..dde0274 100644 --- a/src/Cipher/Exception/FailedEncryptingValue.php +++ b/src/Cipher/Exception/FailedEncryptingValue.php @@ -2,7 +2,6 @@ namespace IlicMiljan\SecureProps\Cipher\Exception; -use LogicException; use RuntimeException; use Throwable; diff --git a/src/Cipher/Exception/FailedGeneratingInitializationVector.php b/src/Cipher/Exception/FailedGeneratingInitializationVector.php index e44e026..89c63d3 100644 --- a/src/Cipher/Exception/FailedGeneratingInitializationVector.php +++ b/src/Cipher/Exception/FailedGeneratingInitializationVector.php @@ -2,7 +2,6 @@ namespace IlicMiljan\SecureProps\Cipher\Exception; -use LogicException; use RuntimeException; use Throwable; From 208b2453db9c87682b5ae217ac3aae65339cecc5 Mon Sep 17 00:00:00 2001 From: Miljan Ilic Date: Sun, 10 Mar 2024 13:27:32 +0100 Subject: [PATCH 2/3] Remove Unnecessary Annotation --- tests/ObjectEncryptionServiceTest.php | 3 --- 1 file changed, 3 deletions(-) diff --git a/tests/ObjectEncryptionServiceTest.php b/tests/ObjectEncryptionServiceTest.php index 740fc39..3e59ede 100644 --- a/tests/ObjectEncryptionServiceTest.php +++ b/tests/ObjectEncryptionServiceTest.php @@ -27,9 +27,6 @@ class ObjectEncryptionServiceTest extends TestCase private $objectPropertiesReaderMock; private ObjectEncryptionService $service; - /** - * @throws Exception - */ protected function setUp(): void { $this->cipherMock = $this->createMock(Cipher::class); From b710aa6d3fbf53c7e65fd71853ff7b5466b2f6a9 Mon Sep 17 00:00:00 2001 From: Miljan Ilic Date: Sun, 10 Mar 2024 13:28:32 +0100 Subject: [PATCH 3/3] Optimize Imports --- tests/Cipher/AsymmetricEncryptionCipherTest.php | 7 ------- tests/ObjectEncryptionServiceTest.php | 3 +-- tests/Reader/RuntimeObjectPropertiesReaderTest.php | 1 - tests/StringEncryptionServiceTest.php | 2 +- 4 files changed, 2 insertions(+), 11 deletions(-) diff --git a/tests/Cipher/AsymmetricEncryptionCipherTest.php b/tests/Cipher/AsymmetricEncryptionCipherTest.php index 369bfc5..356ad23 100644 --- a/tests/Cipher/AsymmetricEncryptionCipherTest.php +++ b/tests/Cipher/AsymmetricEncryptionCipherTest.php @@ -2,14 +2,7 @@ namespace IlicMiljan\SecureProps\Tests\Cipher; -use IlicMiljan\SecureProps\Cipher\AdvancedEncryptionStandardCipher; use IlicMiljan\SecureProps\Cipher\AsymmetricEncryptionCipher; -use IlicMiljan\SecureProps\Cipher\Cipher; -use IlicMiljan\SecureProps\Reader\Exception\FailedCalculatingInitializationVectorLength; -use IlicMiljan\SecureProps\Reader\Exception\FailedDecryptingValue; -use IlicMiljan\SecureProps\Reader\Exception\FailedEncryptingValue; -use IlicMiljan\SecureProps\Reader\Exception\FailedGeneratingInitializationVector; -use InvalidArgumentException; use OpenSSLAsymmetricKey; use PHPUnit\Framework\TestCase; diff --git a/tests/ObjectEncryptionServiceTest.php b/tests/ObjectEncryptionServiceTest.php index 3e59ede..6b5dbd0 100644 --- a/tests/ObjectEncryptionServiceTest.php +++ b/tests/ObjectEncryptionServiceTest.php @@ -2,14 +2,13 @@ namespace IlicMiljan\SecureProps\Tests; +use IlicMiljan\SecureProps\Attribute\Encrypted; use IlicMiljan\SecureProps\Cipher\Cipher; use IlicMiljan\SecureProps\Cipher\Exception\CipherException; use IlicMiljan\SecureProps\ObjectEncryptionService; use IlicMiljan\SecureProps\Reader\Exception\ReaderException; use IlicMiljan\SecureProps\Reader\ObjectPropertiesReader; -use IlicMiljan\SecureProps\Attribute\Encrypted; use InvalidArgumentException; -use PHPUnit\Framework\MockObject\Exception; use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; use ReflectionException; diff --git a/tests/Reader/RuntimeObjectPropertiesReaderTest.php b/tests/Reader/RuntimeObjectPropertiesReaderTest.php index 8b044bd..f53cc10 100644 --- a/tests/Reader/RuntimeObjectPropertiesReaderTest.php +++ b/tests/Reader/RuntimeObjectPropertiesReaderTest.php @@ -2,7 +2,6 @@ namespace IlicMiljan\SecureProps\Tests\Reader; -use Attribute; use IlicMiljan\SecureProps\Reader\RuntimeObjectPropertiesReader; use IlicMiljan\SecureProps\Tests\Attribute\TestAttribute; use PHPUnit\Framework\TestCase; diff --git a/tests/StringEncryptionServiceTest.php b/tests/StringEncryptionServiceTest.php index 1ad6574..496a0ea 100644 --- a/tests/StringEncryptionServiceTest.php +++ b/tests/StringEncryptionServiceTest.php @@ -2,9 +2,9 @@ namespace IlicMiljan\SecureProps\Tests; +use IlicMiljan\SecureProps\Cipher\Cipher; use IlicMiljan\SecureProps\Cipher\Exception\CipherException; use IlicMiljan\SecureProps\StringEncryptionService; -use IlicMiljan\SecureProps\Cipher\Cipher; use InvalidArgumentException; use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase;