Skip to content

Commit

Permalink
PHPStan level 8.
Browse files Browse the repository at this point in the history
  • Loading branch information
dereuromark committed Nov 16, 2024
1 parent dfbf20a commit 284c2ba
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 6 deletions.
3 changes: 0 additions & 3 deletions phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,3 @@ parameters:
- '#Parameter \#4 \$flags of function preg_match expects TFlags of 0\|256\|512\|768, int given.#'
- '#Parameter \#2 \$\w+ of function datefmt_format expects .+, DateTimeInterface given.#'
- '#Unsafe usage of new static\(\)#'
services:
-
class: Cake\PHPStan\AssociationTableMixinClassReflectionExtension
2 changes: 1 addition & 1 deletion src/Model/Behavior/TypographicBehavior.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class TypographicBehavior extends Behavior {
public const BEFORE_SAVE = 'save';

/**
* @var array
* @var array<string, array<string, string>>
*/
protected array $_map = [
'in' => [
Expand Down
2 changes: 1 addition & 1 deletion src/View/Helper/TextHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public function minimizeUrl(string $url, ?int $max = null, array $options = []):
$url = Utility::stripProtocol($url);
// cut the parameters
if (mb_strpos($url, '/') !== false) {
/** @var string $url */
/** @var non-empty-string $url */
$url = strtok($url, '/');
}
// return if the url is short enough
Expand Down
2 changes: 1 addition & 1 deletion src/View/Icon/Collector/MaterialIconCollector.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public static function collect(string $filePath): array {
throw new RuntimeException('Cannot parse content: ' . $filePath);
}

/** @var array<string> */
/** @var array<non-empty-string> */
return $matches[1];
}

Expand Down

0 comments on commit 284c2ba

Please sign in to comment.