Skip to content

Commit

Permalink
Make codestyle happy
Browse files Browse the repository at this point in the history
  • Loading branch information
SvenRtbg committed Jan 14, 2025
1 parent 523e13c commit a636d4e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/Pattern/CallbackCache.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,9 @@ public function generateKey(callable $callback, array $args = []): string
*/
protected function generateCallbackKey(callable $callback, array $args): string
{
if (! is_callable($callback, false, $callbackKey)) {
throw new Exception\InvalidArgumentException('Invalid callback');
}

// Create a cache key for the ObjectCache use case.
$options = $this->getOptions();
Expand All @@ -120,9 +123,6 @@ protected function generateCallbackKey(callable $callback, array $args): string
return $callbackKey . $argumentKey;
}

Check failure on line 125 in src/Pattern/CallbackCache.php

View workflow job for this annotation

GitHub Actions / ci / QA Checks (PHPCodeSniffer [8.1, locked], ubuntu-latest, laminas/laminas-continuous-integration-ac...

Unexpected blank line found
if (! is_callable($callback, false, $callbackKey)) {
throw new Exception\InvalidArgumentException('Invalid callback');
}

// functions, methods and classnames are case-insensitive
$callbackKey = strtolower($callbackKey);
Expand Down
4 changes: 3 additions & 1 deletion test/Pattern/TestAsset/TestObjectCache.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

namespace LaminasTest\Cache\Pattern\TestAsset;

use Closure;

use function func_get_args;
use function implode;

Expand All @@ -22,7 +24,7 @@ final class TestObjectCache
/** @var string */
public $property = 'testProperty';

private \Closure $closure;
private Closure $closure;

Check failure on line 27 in test/Pattern/TestAsset/TestObjectCache.php

View workflow job for this annotation

GitHub Actions / ci / QA Checks (Psalm [8.1, locked], ubuntu-latest, laminas/laminas-continuous-integration-action@v1, ...

UnusedProperty

test/Pattern/TestAsset/TestObjectCache.php:27:21: UnusedProperty: Cannot find any references to private property LaminasTest\Cache\Pattern\TestAsset\TestObjectCache::$closure (see https://psalm.dev/150)

public function __construct()
{
Expand Down

0 comments on commit a636d4e

Please sign in to comment.