move code to repository root
This commit is contained in:
parent
47e227257c
commit
9ce2c0ae4c
35 changed files with 2025 additions and 0 deletions
23
src/Infrastructure/functions.php
Normal file
23
src/Infrastructure/functions.php
Normal 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,
|
||||
)
|
||||
);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue