Yubico / php-u2flib-server

(OBSOLETE) U2F library in PHP
https://developers.yubico.com/php-u2flib-server/
BSD 2-Clause "Simplified" License
288 stars 68 forks source link

Make functions non-static #37

Closed LukasReschke closed 9 years ago

klali commented 9 years ago

What's the upside of changing these to be non-static?

LukasReschke commented 9 years ago

Actually there is not much of a difference as the PHP VM will handle private methods the same than non-static referenced ones. So mostly personal preference, this gets more relevant as I'm considering to split up the single classes (for example \u2flib_server\Error) into it's own files to be compliant with PSR-1.

Then it is, in my opinion, with $this much easier to see that the call is to a function defined within the same file instead of having to remember all possible classes and know in which one you are.

klali commented 9 years ago

Fair enough. Merging.