Git Product home page Git Product logo

Comments (8)

guilhermeblanco avatar guilhermeblanco commented on May 20, 2024

I have to remove it. It was part of original plan to include PSR-1, not PSR-2 as default.

from phpcs-calisthenics-rules.

guilhermeblanco avatar guilhermeblanco commented on May 20, 2024

Done. 9db4cf6

from phpcs-calisthenics-rules.

Rarst avatar Rarst commented on May 20, 2024

Doesn't same argument apply to PSR-1? Things like camelCase for naming aren't really part of calisthenics rules (from what I understand)?

from phpcs-calisthenics-rules.

guilhermeblanco avatar guilhermeblanco commented on May 20, 2024

@Rarst partially, yes.
PSR-1 should be the base line of every PHP project, and not only when really needed. I could remove it, but then I'd be forced to bring other elements to the game, such as only one class/interface/trait per file, etc.
My general sense is that if a project is not PSR-1 compliant, it's swimming against the tide.

from phpcs-calisthenics-rules.

Rarst avatar Rarst commented on May 20, 2024

My general sense is that if a project is not PSR-1 compliant, it's swimming against the tide.

Unfortunately there are rather large legacy projects around (cough WordPress cough).

only one class/interface/trait per file

This isn't actually PSR-1 requirement? As far as I remember all PSR's are fine with multiple definitions in file, it's just not common/convenient (Symfony does this in some places for example).

from phpcs-calisthenics-rules.

guilhermeblanco avatar guilhermeblanco commented on May 20, 2024

Unfortunately there are rather large legacy projects around (cough WordPress cough).

I know... I work on some too... =(

This isn't actually PSR-1 requirement? As far as I remember all PSR's are fine with multiple definitions in file, it's just not common/convenient (Symfony does this in some places for example).

IIRC, it was somehow demanded through the PSR-0 as it converted a class to be loaded into a file path. This almost surely enforces the 1 class 1 file rule, because from a vendor library, I could only include one class without loading the other.
I guess I should remove the PSR-1 requirement then... =(

from phpcs-calisthenics-rules.

guilhermeblanco avatar guilhermeblanco commented on May 20, 2024

Done as 5fd7ac0

from phpcs-calisthenics-rules.

Rarst avatar Rarst commented on May 20, 2024

Thank you for seeing it from my perspective. :)

from phpcs-calisthenics-rules.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.