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

Variable named class #182

Closed
szepeviktor opened this issue Mar 11, 2015 · 9 comments
Closed

Variable named class #182

szepeviktor opened this issue Mar 11, 2015 · 9 comments

Comments

@szepeviktor
Copy link
Contributor

new $class_loader( $root, $extra_classes );

A variable named function/class looks like malware. $a='ev'; $b='al'; $c=$a.$b; $c('php code');

@afragen
Copy link
Owner

afragen commented Mar 11, 2015

Even when that variable is defined in the line preceding line? I get the point. 😉

@szepeviktor
Copy link
Contributor Author

@szepeviktor
Copy link
Contributor Author

off: This is a new frontend debugger:
https://wordpress.org/plugins/frontend-debugger/
@afragen Maybe it proves useful.

@szepeviktor
Copy link
Contributor Author

Isn't it the second item here https://github.com/afragen/github-updater/blob/develop/CHANGES.md#430?

don't use variable for calling a class. bad Andy

@szepeviktor
Copy link
Contributor Author

Yes, it is. eb2a887
Somehow reverted.

@szepeviktor
Copy link
Contributor Author

Reverted here 04c5b01

@szepeviktor
Copy link
Contributor Author

Please consider developing Travis CI. Only basic unit testing, and maybe code styling checks (PHP_CodeSniffer).
See PHPCI's plugins: https://www.phptesting.org/wiki

@afragen
Copy link
Owner

afragen commented Mar 17, 2015

I just saw that. I've done some refactoring and will push a fix with that soon.

I'm very open to unit testing. I just don't really know how to go about it. PRs welcome.

@szepeviktor
Copy link
Contributor Author

Simply call your own functions and test the returned values.
https://phpunit.de/getting-started.html

@afragen afragen closed this as completed Mar 17, 2015
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