Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
rawilk committed Mar 10, 2024
1 parent 4e569cd commit eb3912f
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/Contracts/ContextSerializer.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@

interface ContextSerializer
{
public function serialize(?Context $context = null): string;
public function serialize(Context $context = null): string;
}
2 changes: 1 addition & 1 deletion src/Contracts/KeyGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

interface KeyGenerator
{
public function generate(string $key, ?Context $context = null): string;
public function generate(string $key, Context $context = null): string;

public function removeContextFromKey(string $key): string;

Expand Down
4 changes: 2 additions & 2 deletions src/Drivers/Factory.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public function __construct(protected Application $app)
{
}

public function driver(?string $driver = null): Driver
public function driver(string $driver = null): Driver
{
return $this->resolveDriver($driver);
}
Expand Down Expand Up @@ -64,7 +64,7 @@ protected function getDriverConfig(string $driver): ?array
return $this->app['config']["settings.drivers.{$driver}"];
}

protected function resolveDriver(?string $driver = null): Driver
protected function resolveDriver(string $driver = null): Driver
{
$driver = $driver ?: $this->getDefaultDriver();

Expand Down
2 changes: 1 addition & 1 deletion src/Settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public function getDriver(): Driver
* Pass in `false` for context when calling `all()` to only return results
* that do not have context.
*/
public function context(Context|bool|null $context = null): self
public function context(Context|bool $context = null): self
{
$this->context = $context;

Expand Down
2 changes: 1 addition & 1 deletion src/Support/ContextSerializers/ContextSerializer.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

class ContextSerializer implements ContextSerializerContract
{
public function serialize(?Context $context = null): string
public function serialize(Context $context = null): string
{
return serialize($context);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

class DotNotationContextSerializer implements ContextSerializerContract
{
public function serialize(?Context $context = null): string
public function serialize(Context $context = null): string
{
if (is_null($context)) {
return '';
Expand Down
2 changes: 1 addition & 1 deletion src/Support/KeyGenerators/Md5KeyGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class Md5KeyGenerator implements KeyGeneratorContract
{
protected ContextSerializer $serializer;

public function generate(string $key, ?Context $context = null): string
public function generate(string $key, Context $context = null): string
{
return md5($key . $this->serializer->serialize($context));
}
Expand Down
2 changes: 1 addition & 1 deletion src/Support/KeyGenerators/ReadableKeyGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class ReadableKeyGenerator implements KeyGeneratorContract
{
protected ContextSerializer $serializer;

public function generate(string $key, ?Context $context = null): string
public function generate(string $key, Context $context = null): string
{
$key = $this->normalizeKey($key);

Expand Down

0 comments on commit eb3912f

Please sign in to comment.