Git Product home page Git Product logo

Comments (4)

povils avatar povils commented on August 15, 2024

@Asera thank for suggestion :)
To be honest I was thinking about this feature from beginning. With many things I agree. About 1 group:
And what do you think about constants that are not in you project but they are as your dependency(in your vendor).
About second one yes it is practically impossible. But I think there are numbers where we could probable hint. For example: 404 -> HTTP_NOT_FOUND, 200 -> HTTP_OK and all other http response codes. Or 3306 -> MYSQL_PORT and so on.

from phpmnd.

Asera avatar Asera commented on August 15, 2024

First group
I think all the constants that can be extracted from user source files including vendor folder must be indexed.
Also PHP itself has some constants and I saw some cases when magic numbers were PHP predefined constants.

Second group
We could make hints for common and widespread numbers. I was thinking about custom user dictionary for magic numbers, but i found it useless as all the constants are already included in project files. And if user needs dictionary he can define constants in his project, this will be the best solution.

from phpmnd.

povils avatar povils commented on August 15, 2024

I dont think so that vendor should be included. Firstly it would increase analysis time dramatically. Secondly it is very hard to determine is the constant was found in direct dependency.

from phpmnd.

povils avatar povils commented on August 15, 2024

#49

from phpmnd.

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.