Changeset View
Changeset View
Standalone View
Standalone View
src/lint/linter/__tests__/xhpast/invalid-default-parameter.lint-test
- This file was moved from src/lint/linter/__tests__/xhpast/invalid-default-paramter.lint-test.
<?php | <?php | ||||
function func_one(array $x) {} | function func_one(array $x) {} | ||||
function func_two(array $x = null) {} | function func_two(array $x = null) {} | ||||
function func_three(array $x = array()) {} | function func_three(array $x = array()) {} | ||||
function func_four(array $x = false) {} | function func_four(array $x = false) {} | ||||
function func_five(callable $x) {} | function func_five(callable $x) {} | ||||
function func_six(callable $x = null) {} | function func_six(callable $x = null) {} | ||||
function func_seven(callable $x = false) {} | function func_seven(callable $x = false) {} | ||||
function func_eight(stdClass $x) {} | function func_eight(stdClass $x) {} | ||||
function func_nine(stdClass $x = null) {} | function func_nine(stdClass $x = null) {} | ||||
function func_ten(stdClass $x = array()) {} | function func_ten(stdClass $x = array()) {} | ||||
~~~~~~~~~~ | ~~~~~~~~~~ | ||||
error:5:31 | error:6:31 | ||||
error:9:35 | error:10:35 | ||||
error:13:33 | error:14:33 |