Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add --custom-function parameter to check #33

Open
umutphp opened this issue Dec 13, 2018 · 1 comment
Open

Add --custom-function parameter to check #33

umutphp opened this issue Dec 13, 2018 · 1 comment

Comments

@umutphp
Copy link

umutphp commented Dec 13, 2018

In one of the projects that I have been working for a while, there are some legacy dump functions created and used frequently by the team. A sample function is;

function pre_dump( $var ) { echo '<pre>'; var_dump( $var ); echo '</pre>'; }
The check can not be able to find the usage of such kind of functions. A sample usage might be;

$ ./vendor/bin/var-dump-check --no-colors --tracy --custom-function pre_dump,echo_dump .

I have created a pull request for this case.

#32

@AlgyTaylor
Copy link

This would be really helpful. I often write a little custom function myself like

function pretty_dump($var) {
    echo "<pre>" . json_encode($var, JSON_PRETTY_PRINT) . "</pre>";
}

It'd be handy to be able to check for something like that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants