Coder Social home page Coder Social logo

envsync's People

Contributors

bmitch avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

envsync's Issues

Fix PHPMD issues

$ vendor/bin/phpmd src text codesize,unusedcode,naming

/home/travis/build/bmitch/envsync/src/SyncerCommand.php:18  The method handle() has an NPath complexity of 1252. The configured NPath complexity threshold is 200.
/home/travis/build/bmitch/envsync/src/SyncerCommand.php:28  Avoid unused local variables such as '$index'.
/home/travis/build/bmitch/envsync/src/SyncerCommand.php:46  Avoid unused local variables such as '$tableData'.

Expand command to 3 modes

  • Check that any env variables defined in the source code are also defined in the .env.example. If not, then exit with 1 so it fails in a CI build.
  • Check that any env variables defined in the source code are defined in the .env file.
  • Default version where it just shows a report of variables in source, in env file and in .example.
    • Maybe also show their value?

Fix PHPCS errors

FILE: /home/travis/build/bmitch/envsync/src/SyncerCommand.php
----------------------------------------------------------------------
FOUND 12 ERRORS AFFECTING 9 LINES
----------------------------------------------------------------------
 24 | ERROR | [x] Space before opening parenthesis of function call
    |       |     prohibited
 24 | ERROR | [x] Space before opening parenthesis of function call
    |       |     prohibited
 25 | ERROR | [x] Space before opening parenthesis of function call
    |       |     prohibited
 25 | ERROR | [x] Space before opening parenthesis of function call
    |       |     prohibited
 34 | ERROR | [x] Blank line found at end of control structure
 55 | ERROR | [x] Function closing brace must go on the next line
    |       |     following the body; found 3 blank lines before
    |       |     brace
 61 | ERROR | [x] Whitespace found at end of line
 63 | ERROR | [x] Blank line found at start of control structure
 65 | ERROR | [x] Expected 1 space after closing parenthesis; found 0
 65 | ERROR | [x] Whitespace found at end of line
 72 | ERROR | [x] Whitespace found at end of line
 73 | ERROR | [x] Blank line found at end of control structure
----------------------------------------------------------------------
PHPCBF CAN FIX THE 12 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------

Refactor code

Extract a lot of the functionality to other methods or classes.

Tests for these classes.

Test cases to handle.

  • What if no PHP files found?
  • What if no .env.example file found?
  • What if no .env file found?

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.