TysonAndre / phan

Phan is a static analyzer for PHP. Phan prefers to avoid false-positives and attempts to prove incorrectness rather than correctness.
Other
0 stars 0 forks source link

This fork should not infer overly specific shapes from parameter defaults #140

Closed TysonAndre closed 6 years ago

TysonAndre commented 6 years ago

Currently, phan warns. This check for union type compatibility might need to check for mixed, or mixed may need to be added to the default.

<?php
function create_list(string $a, $extensions = ['php', 'html']) {
    return [];
}
create_list('dir', ['php']);