stmts as $stmt) { if ($stmt instanceof Property && $stmt->type) { $typed []= $stmt; } } if (empty($typed)) { return; } if foreach ($typed as $property) { } } }