Unused method, property, variable or parameter

  • Minor
  • Deadcode

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

  1. $this->view->body = '';
  2. }
  3. public function render()
  4. {
  5. if (($status = $this->request->status()) >= 400) {

    This status local variable is declared but never used. You should remove it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by Sergio Montenegro
  6. return;
  7. }
  8. if ($this->route->params(0) == 'ajax') {
  9. $object = $this->route->params(1);
  10. $this->view->response = $this->{$object}->request($this->request);

Text files should end with a newline character 4

  • Info
  • Codestyle

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

  1. $this->request = $request;
  2. $this->view = $view;
  3. $this->layout = $layout;
  4. }
  5. }

    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 Sergio Montenegro
in phastr/Model.php, line 15
  1. public function __set($name, $value = null)
  2. {
  3. throw new Exception('No can do...' . $name);
  4. }
  5. }

    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 Sergio Montenegro
  1. public $attrs = [], $fields = [], $hidden = [], $button = [], $weight = [], $values = [], $fieldset = [];
  2. public $validate = [], $status, $result, $message, $callback, $expire;
  3. }

    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 Sergio Montenegro
  1. class Status extends \phastr\Model
  2. {
  3. public $code, $message, $validation, $callback, $expire, $status;
  4. }

    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 Sergio Montenegro