Code Monkey home page Code Monkey logo

Comments (5)

TomasVotruba avatar TomasVotruba commented on May 27, 2024

Hi @mihaeu,

thanks for pointing that out. I see the missing "No", is that what you mean?

Personally I mostly agree with referenced article in the one you referenced - No setters allowed: http://whitewashing.de/2012/08/22/building_an_object_model__no_setters_allowed.html
I use that it practice already.

What changes you suggest? Step by step the best.

from phpcs-calisthenics-rules.

mihaeu avatar mihaeu commented on May 27, 2024
  • public properties should not be allowed
  • method definitions named setX should not be allowed
  • method definitions named getX should not be allowed OPTIONAL
  • I don't know how much information you have available, but if it's like an AST you can also check for setter logic (is method a one-liner? does it assign the provided value to an internal attribute)

from phpcs-calisthenics-rules.

TomasVotruba avatar TomasVotruba commented on May 27, 2024

Thanks for elaboration and clear points! It's very easy to read.

I would start with small steps.

  1. Agree. It is already implemented
  2. Agree. Could prepare PR for this? Would be happy to help you.

I would keep 3. and 4. to discuss after 2. is closed.

from phpcs-calisthenics-rules.

TomasVotruba avatar TomasVotruba commented on May 27, 2024

I think this can be closed, as 1. and 2. are implemented in #32

  1. seems to strict and useless in practice.

from phpcs-calisthenics-rules.

TomasVotruba avatar TomasVotruba commented on May 27, 2024

Related to last comment, closing for now.

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.