iron-io / iron_core_php

BSD 2-Clause "Simplified" License
19 stars 17 forks source link

PSR-2 Coding Style #7

Closed GrahamCampbell closed 10 years ago

GrahamCampbell commented 10 years ago

I've made this repo confirm to these standards where possible. Note that it still does not conform to the namespacing standards, and the exception classes do not conform to the StudlyCaps class naming standard. Also, PSR-2 says we should only have 1 class per file, but I have ignored that.

One other note, the json_decode function does not conform to the camelCase naming convention, but I have not renamed any functions to retain backwards compatibility. Also, this function makes more sense with the name it already had.

thousandsofthem commented 10 years ago

Looks great, thanks! Unfortunately, can't introduce namespaces because:

1) keeping compatibility with php-5.2 (will drop that, not sure about timing)

2) keeping backward compatibility, namespacing means huge change for existing end-user code. could be added as "2.0" or so in the future. Same for one-class-per-file rule.

GrahamCampbell commented 10 years ago

That's what I thought, which is why I didn't make those breaking changes. Thanks for the great package. I am working on the other 3 packages now to make them psr-2 compliant.