exit() and die() functions should be avoided

  • Major
  • Bugrisk

More information: https://insight.symfony.com/what-we-analyse/php.use_exit_function

in app.php, line 102
  1. * To generate a hashed url when security key is enabled
  2. * Example usage: php app.php encrypt w_200,h_200,c_1/Rovinj-Croatia.jpg
  3. */
  4. if (!empty($argv[1]) && !empty($argv[2]) && $argv[1] == 'encrypt') {
  5. printf("Hashed request: %s\n", $app['image.handler']->getSecurityHandler()->encrypt($argv[2]));
  6. exit;

    This line stops the execution flow, without explanation. If this is for debug, you should remove it. If this is to deal with an error, use exceptions instead.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by sadok
  7. }
  8. /** debug conf */
  9. $app['debug'] = $app['params']->get('debug');

User specific files should not appear in .gitignore

  • Minor
  • Codestyle

More information: https://insight.symfony.com/what-we-analyse/git.user_specific_ignored_file

in .gitignore, line 13
  1. .elasticbeanstalk/*
  2. !.elasticbeanstalk/*.cfg.yml
  3. !.elasticbeanstalk/*.global.yml
  4. # OS files
  5. .DS_Store

    .DS_Store is user-specific and should not appear in a project .gitignore. Consider adding it to the user global .gitignore instead.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by Agustin Amenabar

Text files should end with a newline character 2

  • Info
  • Codestyle

More information: https://insight.symfony.com/what-we-analyse/missing_e_o_l

in .gitignore, line 13
  1. .elasticbeanstalk/*
  2. !.elasticbeanstalk/*.cfg.yml
  3. !.elasticbeanstalk/*.global.yml
  4. # OS files
  5. .DS_Store

    This file ends with no newline character. It won't render properly on a terminal, and it's considered a bad practice. Add a simple line feed as the last character to fix it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by Agustin Amenabar
in CHANGELOG.md, line 107
  1. - [#2](https://github.com/flyimg/flyimg/pull/2) merge from upstream (@sadok-f)
  2. - [#2](https://github.com/flyimg/flyimg/pull/2) merge from upstream (@sadok-f)
  3. - [#1](https://github.com/flyimg/flyimg/pull/1) pulling upstream (@sadok-f)
  4. - [#1](https://github.com/flyimg/flyimg/pull/1) pulling upstream (@sadok-f)
  5. - [#2](https://github.com/flyimg/flyimg/pull/2) Update READ.me (@baamenabar)
  6. - [#2](https://github.com/flyimg/flyimg/pull/2) Update READ.me (@baamenabar)

    This file ends with no newline character. It won't render properly on a terminal, and it's considered a bad practice. Add a simple line feed as the last character to fix it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by sadok