First pass of features
This commit is contained in:
1 parent
1a65e69d25
commit
6353f9c9b4
54 files changed
+5409
-128
No files matched your search
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @param mixed $raw
|
||||
* @return array<int, array<string, mixed>>
|
||||
*/
|
||||
function normalizeExpensesList($raw): array {
|
||||
if (!is_array($raw) || !array_is_list($raw)) {
|
||||
return [];
|
||||
}
|
||||
$out = [];
|
||||
foreach ($raw as $row) {
|
||||
if (is_array($row) && !empty($row['id']) && is_string($row['id'])) {
|
||||
$out[] = $row;
|
||||
}
|
||||
}
|
||||
return $out;
|
||||
}
|
||||
Reference in new issue
Block a user