Skip to content

Commit

Permalink
Merge pull request #25 from CodeLieutenant/chore/traits
Browse files Browse the repository at this point in the history
Chore/traits **BREAKING**
  • Loading branch information
CodeLieutenant committed Mar 5, 2024
2 parents 1e14008 + ca38d3a commit c61a569
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/Keys/AppKey.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

namespace CodeLieutenant\LaravelCrypto\Keys;

use CodeLieutenant\LaravelCrypto\Traits\LaravelKeyParser;
use Illuminate\Contracts\Config\Repository;

class AppKey implements Loader
Expand Down
2 changes: 1 addition & 1 deletion src/Keys/Generators/AppKeyGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
use CodeLieutenant\LaravelCrypto\Encryption\AesGcm256Encrypter;
use CodeLieutenant\LaravelCrypto\Encryption\XChaCha20Poly1305Encrypter;
use CodeLieutenant\LaravelCrypto\Enums\Encryption;
use CodeLieutenant\LaravelCrypto\Keys\EnvKeySaver;
use CodeLieutenant\LaravelCrypto\Traits\EnvKeySaver;
use Illuminate\Contracts\Config\Repository;
use Illuminate\Encryption\Encrypter;

Expand Down
2 changes: 1 addition & 1 deletion src/Keys/Generators/Blake2bHashingKeyGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

namespace CodeLieutenant\LaravelCrypto\Keys\Generators;

use CodeLieutenant\LaravelCrypto\Keys\EnvKeySaver;
use CodeLieutenant\LaravelCrypto\Support\Random;
use CodeLieutenant\LaravelCrypto\Traits\EnvKeySaver;
use Illuminate\Contracts\Config\Repository;

class Blake2bHashingKeyGenerator implements Generator
Expand Down
2 changes: 1 addition & 1 deletion src/Keys/EnvKeySaver.php → src/Traits/EnvKeySaver.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace CodeLieutenant\LaravelCrypto\Keys;
namespace CodeLieutenant\LaravelCrypto\Traits;

use CodeLieutenant\LaravelCrypto\Support\Base64;
use RuntimeException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace CodeLieutenant\LaravelCrypto\Keys;
namespace CodeLieutenant\LaravelCrypto\Traits;

use CodeLieutenant\LaravelCrypto\Support\Base64;
use Illuminate\Encryption\MissingAppKeyException;
Expand Down
3 changes: 3 additions & 0 deletions tests/Architecture/HashingTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<?php

declare(strict_types=1);
4 changes: 4 additions & 0 deletions tests/Architecture/SigningTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?php

declare(strict_types=1);

8 changes: 8 additions & 0 deletions tests/Architecture/TraitTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,11 @@
->expect('CodeLieutenant\LaravelCrypto\Traits')
->toBeTraits();

arch('hashing traits')
->expect('CodeLieutenant\LaravelCrypto\Hashing\Traits')
->toBeTraits();

arch('signing traits')
->expect('CodeLieutenant\LaravelCrypto\Signing\Traits')
->toBeTraits();

0 comments on commit c61a569

Please sign in to comment.