Skip to content

Commit

Permalink
Move from @immutable to more specific @psalm-immutable
Browse files Browse the repository at this point in the history
  • Loading branch information
Slamdunk committed Oct 28, 2024
1 parent 266b724 commit e4c80ce
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/Storageless/Http/ClientFingerprint/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

namespace PSR7Sessions\Storageless\Http\ClientFingerprint;

/** @psalm-immutable */
final readonly class Configuration
{
/** @var list<Source> */
Expand Down
1 change: 1 addition & 0 deletions src/Storageless/Http/ClientFingerprint/RemoteAddr.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
use function array_key_exists;
use function is_string;

/** @psalm-immutable */
final readonly class RemoteAddr implements Source
{
private const SERVER_PARAM_NAME = 'REMOTE_ADDR';
Expand Down
6 changes: 5 additions & 1 deletion src/Storageless/Http/ClientFingerprint/SameOriginRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@

use const JSON_THROW_ON_ERROR;

/** @internal */
/**
* @internal
*
* @psalm-immutable
*/
final readonly class SameOriginRequest implements Constraint
{
public const CLAIM = 'fp';
Expand Down
1 change: 1 addition & 0 deletions src/Storageless/Http/ClientFingerprint/UserAgent.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

use Psr\Http\Message\ServerRequestInterface;

/** @psalm-immutable */
final readonly class UserAgent implements Source
{
public function extractFrom(ServerRequestInterface $request): string
Expand Down
2 changes: 1 addition & 1 deletion src/Storageless/Http/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
use Lcobucci\JWT\Configuration as JwtConfig;
use PSR7Sessions\Storageless\Http\ClientFingerprint\Configuration as FingerprintConfig;

/** @immutable */
/** @psalm-immutable */
final class Configuration
{
private JwtConfig $jwtConfiguration;
Expand Down
1 change: 1 addition & 0 deletions src/Storageless/Http/SessionMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@

use function sprintf;

/** @psalm-immutable */
final readonly class SessionMiddleware implements MiddlewareInterface
{
public const SESSION_CLAIM = 'session-data';
Expand Down

0 comments on commit e4c80ce

Please sign in to comment.