Completed
Push — master ( db47a2...0cf60d )
by Neomerx
03:19
created
src/Package/SymmetricCryptContainerConfigurator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
     {
38 38
         $crypt = null;
39 39
 
40
-        $instanceFactory = function (PsrContainerInterface $container) use (&$crypt) {
40
+        $instanceFactory = function(PsrContainerInterface $container) use (&$crypt) {
41 41
             if ($crypt === null) {
42 42
                 $settings = $container->get(SettingsProviderInterface::class)->get(C::class);
43 43
                 $crypt    = new SymmetricCrypt($settings[C::KEY_METHOD], $settings[C::KEY_PASSWORD]);
Please login to merge, or discard this patch.
src/Package/HasherContainerConfigurator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
      */
35 35
     public static function configureContainer(LimoncelloContainerInterface $container): void
36 36
     {
37
-        $container[HasherInterface::class] = function (PsrContainerInterface $container): HasherInterface {
37
+        $container[HasherInterface::class] = function(PsrContainerInterface $container): HasherInterface {
38 38
             $settings = $container->get(SettingsProviderInterface::class)->get(C::class);
39 39
             $hasher   = new Hasher($settings[C::KEY_ALGORITHM], $settings[C::KEY_COST]);
40 40
 
Please login to merge, or discard this patch.
src/Package/AsymmetricPrivateEncryptPublicDecryptContainerConfigurator.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
      */
38 38
     public static function configureContainer(LimoncelloContainerInterface $container): void
39 39
     {
40
-        $container[EncryptInterface::class] = function (PsrContainerInterface $container): EncryptInterface {
40
+        $container[EncryptInterface::class] = function(PsrContainerInterface $container): EncryptInterface {
41 41
             $settings  = $container->get(SettingsProviderInterface::class)->get(C::class);
42 42
             $keyOrPath = $settings[C::KEY_PRIVATE_PATH_OR_KEY_VALUE] ?? null;
43 43
             if (empty($keyOrPath) === true) {
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
             return $crypt;
50 50
         };
51 51
 
52
-        $container[DecryptInterface::class] = function (PsrContainerInterface $container): DecryptInterface {
52
+        $container[DecryptInterface::class] = function(PsrContainerInterface $container): DecryptInterface {
53 53
             $settings  = $container->get(SettingsProviderInterface::class)->get(C::class);
54 54
             $keyOrPath = $settings[C::KEY_PUBLIC_PATH_OR_KEY_VALUE] ?? null;
55 55
             if (empty($keyOrPath) === true) {
Please login to merge, or discard this patch.
src/Package/AsymmetricPublicEncryptPrivateDecryptContainerConfigurator.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
      */
38 38
     public static function configureContainer(LimoncelloContainerInterface $container): void
39 39
     {
40
-        $container[EncryptInterface::class] = function (PsrContainerInterface $container): EncryptInterface {
40
+        $container[EncryptInterface::class] = function(PsrContainerInterface $container): EncryptInterface {
41 41
             $settings  = $container->get(SettingsProviderInterface::class)->get(C::class);
42 42
             $keyOrPath = $settings[C::KEY_PUBLIC_PATH_OR_KEY_VALUE] ?? null;
43 43
             if (empty($keyOrPath) === true) {
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
             return $crypt;
50 50
         };
51 51
 
52
-        $container[DecryptInterface::class] = function (PsrContainerInterface $container): DecryptInterface {
52
+        $container[DecryptInterface::class] = function(PsrContainerInterface $container): DecryptInterface {
53 53
             $settings  = $container->get(SettingsProviderInterface::class)->get(C::class);
54 54
             $keyOrPath = $settings[C::KEY_PRIVATE_PATH_OR_KEY_VALUE] ?? null;
55 55
             if (empty($keyOrPath) === true) {
Please login to merge, or discard this patch.
src/SymmetricCrypt.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
             // Though https://tools.ietf.org/html/rfc5084 do not directly says it should
158 158
             // be passed along with the encrypted message adding it is one of the possible
159 159
             // solutions.
160
-            $encrypted = $tag . $encrypted;
160
+            $encrypted = $tag.$encrypted;
161 161
         } else {
162 162
             $encrypted = $this->openSslEncrypt(
163 163
                 $data,
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
         // The IV need not be secret, so the IV, or information sufficient to determine the IV, may be
179 179
         // transmitted with the ciphertext.
180 180
         // ...
181
-        $result = $isAddIvToOutput === false ? $encrypted : $vector . $encrypted;
181
+        $result = $isAddIvToOutput === false ? $encrypted : $vector.$encrypted;
182 182
 
183 183
         return $result;
184 184
     }
@@ -519,7 +519,7 @@  discard block
 block discarded – undo
519 519
         int $options,
520 520
         string $initializationVector,
521 521
         string $aad,
522
-        string &$tag = null,
522
+        string & $tag = null,
523 523
         int $tagLength = 16
524 524
     ): string {
525 525
         $encrypted = $this->openSslEncryptAuthenticatedImpl(
@@ -668,7 +668,7 @@  discard block
 block discarded – undo
668 668
         int $options,
669 669
         string $initializationVector,
670 670
         string $aad,
671
-        string &$tag = null,
671
+        string & $tag = null,
672 672
         int $tagLength = 16
673 673
     ) {
674 674
         assert(PHP_VERSION_ID >= 70100);
Please login to merge, or discard this patch.
src/BaseCrypt.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -37,11 +37,11 @@
 block discarded – undo
37 37
     /**
38 38
      * @return null|string
39 39
      */
40
-    protected function getErrorMessage(): ?string
40
+    protected function getErrorMessage(): ? string
41 41
     {
42 42
         $message = null;
43 43
         while (($errorLine = $this->openSslErrorString()) !== false) {
44
-            $message .= ($message === null ? $errorLine : PHP_EOL . $errorLine);
44
+            $message .= ($message === null ? $errorLine : PHP_EOL.$errorLine);
45 45
         }
46 46
 
47 47
         return $message;
Please login to merge, or discard this patch.
src/BaseAsymmetricCrypt.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
     /**
83 83
      * @return int|null
84 84
      */
85
-    protected function getKeyBytes(): ?int
85
+    protected function getKeyBytes(): ? int
86 86
     {
87 87
         if ($this->keyBytes === null && $this->getKey() !== null) {
88 88
             $this->clearErrors();
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
     /**
98 98
      * @return int|null
99 99
      */
100
-    protected function getEncryptChunkSize(): ?int
100
+    protected function getEncryptChunkSize(): ? int
101 101
     {
102 102
         $keyBytes = $this->getKeyBytes();
103 103
 
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
     /**
111 111
      * @return int|null
112 112
      */
113
-    protected function getDecryptChunkSize(): ?int
113
+    protected function getDecryptChunkSize(): ? int
114 114
     {
115 115
         $keyBytes = $this->getKeyBytes();
116 116
         $result   = $keyBytes === null ? null : $keyBytes;
Please login to merge, or discard this patch.