diff --git a/index.php b/index.php index 7f3f48f..884072b 100644 --- a/index.php +++ b/index.php @@ -71,26 +71,7 @@ function verificarSeEstaFinalizado($p) { } - function filtro($itens, $funcao) { - - $filtrados = []; - - foreach($itens as $item) { - - - if ($funcao($item)) { - - $filtrados[] = $item; - - } - - } - - return $filtrados; - - }; - - $projetosFiltrados = filtro($projetos, function($projeto) { + $projetosFiltrados = array_filter($projetos, function($projeto) { return $projeto['ano'] === 2024 || $projeto['ano'] === 2021;