Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,6 @@ examples/
/.windsurf/
# Pollora harness reports
/.harness/

# Mutation-testing artefacts
.mutant-*
208 changes: 0 additions & 208 deletions src/Auth/.mutant-98777-WordPressGuard.php

This file was deleted.

8 changes: 4 additions & 4 deletions src/Auth/WordPressGuard.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public function validate(array $credentials = []): bool
* @param bool $remember Whether to "remember" the user
* @return bool True if authentication successful
*/
public function attempt(array $credentials = [], $remember = false): bool
public function attempt(array $credentials = [], mixed $remember = false): bool
{
if ($this->validate($credentials)) {
$user = $this->lastAttempted;
Expand Down Expand Up @@ -131,7 +131,7 @@ public function once(array $credentials = []): bool
* @param Authenticatable $user The user to log in
* @param bool $remember Whether to "remember" the user
*/
public function login(Authenticatable $user, $remember = false): void
public function login(Authenticatable $user, mixed $remember = false): void
{
if ($user instanceof User) {
wp_set_auth_cookie($user->ID, $remember);
Expand All @@ -148,7 +148,7 @@ public function login(Authenticatable $user, $remember = false): void
* @param bool $remember Whether to "remember" the user
* @return Authenticatable|null The logged-in user or null
*/
public function loginUsingId($id, $remember = false): ?Authenticatable
public function loginUsingId(mixed $id, mixed $remember = false): ?Authenticatable
{
if ($user = User::find($id)) {
$this->login($user, $remember);
Expand All @@ -165,7 +165,7 @@ public function loginUsingId($id, $remember = false): ?Authenticatable
* @param mixed $id User ID
* @return bool True if successful
*/
public function onceUsingId($id): bool
public function onceUsingId(mixed $id): bool
{
if ($user = User::find($id)) {
wp_set_current_user($user->ID);
Expand Down
8 changes: 4 additions & 4 deletions src/Hashing/WordPressHasher.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class WordPressHasher implements HasherContract
*
* @param string $hashedValue
*/
public function info($hashedValue): array
public function info(mixed $hashedValue): array
{
return [];
}
Expand All @@ -37,7 +37,7 @@ public function info($hashedValue): array
*
* @throws RuntimeException
*/
public function make(#[\SensitiveParameter] $value, array $options = []): string
public function make(#[\SensitiveParameter] mixed $value, array $options = []): string
{
return wp_hash_password($value);
}
Expand All @@ -48,7 +48,7 @@ public function make(#[\SensitiveParameter] $value, array $options = []): string
* @param string $value
* @param string $hashedValue
*/
public function check(#[\SensitiveParameter] $value, $hashedValue, array $options = []): bool
public function check(#[\SensitiveParameter] mixed $value, mixed $hashedValue, array $options = []): bool
{
return wp_check_password($value, $hashedValue, $options['user_id'] ?? '');
}
Expand All @@ -58,7 +58,7 @@ public function check(#[\SensitiveParameter] $value, $hashedValue, array $option
*
* @param string $hashedValue
*/
public function needsRehash($hashedValue, array $options = []): bool
public function needsRehash(mixed $hashedValue, array $options = []): bool
{
// if the hashed value is md5 it needs rehashing.
return strlen($hashedValue) <= 32;
Expand Down
6 changes: 3 additions & 3 deletions src/Plugin/UI/Console/Commands/PluginListCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ protected function getFilteredAndSortedPlugins(): array
* @param PluginCollection $collection Plugin collection
* @return PluginCollection Filtered collection
*/
protected function applyFilters($collection)
protected function applyFilters(PluginCollection $collection): PluginCollection
{
if ($this->option('active')) {
$collection = $collection->active();
Expand Down Expand Up @@ -140,7 +140,7 @@ protected function applyFilters($collection)
* @param string $search Search term
* @return PluginCollection Filtered collection
*/
protected function applySearch($collection, string $search)
protected function applySearch(PluginCollection $collection, string $search): PluginCollection
{
return $collection->filter(function (PluginModuleInterface $plugin) use ($search): bool {
$searchLower = strtolower($search);
Expand All @@ -157,7 +157,7 @@ protected function applySearch($collection, string $search)
* @param PluginCollection $collection Plugin collection
* @return PluginCollection Sorted collection
*/
protected function applySorting($collection)
protected function applySorting(PluginCollection $collection): PluginCollection
{
$sortBy = $this->option('sort');
$direction = $this->option('direction');
Expand Down
18 changes: 9 additions & 9 deletions src/RedisObjectCache/Infrastructure/Cache/ObjectCacheStore.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public function __construct(private ObjectCache $cache, private string $group =
*
* @param string $key
*/
public function get($key): mixed
public function get(mixed $key): mixed
{
return $this->cache->get($key, $this->group, true)?->value;
}
Expand Down Expand Up @@ -60,7 +60,7 @@ public function many(array $keys): array
* @param string $key
* @param int $seconds
*/
public function put($key, $value, $seconds): bool
public function put(mixed $key, mixed $value, mixed $seconds): bool
{
if ($seconds <= 0) {
$this->forget($key);
Expand All @@ -80,7 +80,7 @@ public function put($key, $value, $seconds): bool
* @param string $key
* @param int $seconds
*/
public function add($key, $value, $seconds): bool
public function add(mixed $key, mixed $value, mixed $seconds): bool
{
if ($seconds <= 0) {
return false;
Expand All @@ -95,7 +95,7 @@ public function add($key, $value, $seconds): bool
* @param array<string, mixed> $values
* @param int $seconds
*/
public function putMany(array $values, $seconds): bool
public function putMany(array $values, mixed $seconds): bool
{
$stored = true;

Expand All @@ -112,7 +112,7 @@ public function putMany(array $values, $seconds): bool
* @param string $key
* @param int $value
*/
public function increment($key, $value = 1): int|float|false
public function increment(mixed $key, mixed $value = 1): int|float|false
{
return $this->cache->increment($key, $value, $this->group);
}
Expand All @@ -123,7 +123,7 @@ public function increment($key, $value = 1): int|float|false
* @param string $key
* @param int $value
*/
public function decrement($key, $value = 1): int|float|false
public function decrement(mixed $key, mixed $value = 1): int|float|false
{
return $this->cache->decrement($key, $value, $this->group);
}
Expand All @@ -133,7 +133,7 @@ public function decrement($key, $value = 1): int|float|false
*
* @param string $key
*/
public function forever($key, $value): bool
public function forever(mixed $key, mixed $value): bool
{
return $this->cache->set($key, $value, $this->group, 0);
}
Expand All @@ -147,7 +147,7 @@ public function forever($key, $value): bool
* @param string $key
* @param int $seconds
*/
public function touch($key, $seconds): bool
public function touch(mixed $key, mixed $seconds): bool
{
$current = $this->cache->get($key, $this->group, true);

Expand All @@ -163,7 +163,7 @@ public function touch($key, $seconds): bool
*
* @param string $key
*/
public function forget($key): bool
public function forget(mixed $key): bool
{
return $this->cache->delete($key, $this->group);
}
Expand Down
Loading