move code to repository root

This commit is contained in:
lubiana 2023-01-25 22:09:06 +01:00
parent 47e227257c
commit 9ce2c0ae4c
No known key found for this signature in database
35 changed files with 2025 additions and 0 deletions

View file

@ -0,0 +1,23 @@
<?php declare(strict_types=1);
namespace Lubian\AttributeMagic\Infrastructure;
use function array_filter;
use function array_values;
/**
* @template T
* @param array<T> $input
* @return array<int, T>
*/
function arrayFilter(
array $input,
callable $callable
): array {
return array_values(
array_filter(
$input,
$callable,
)
);
}