attogram/attogram

View on GitHub

Showing 308 of 308 total issues

Avoid too many return statements within this method.
Open

                return;
Severity: Major
Found in public/index.php - About 30 mins to fix

    Remove error control operator '@' on line 95.
    Open

        public function awaken()
        {
            // The Site Administrator IP addresses
            $this->remember(
                'admins',
    Severity: Minor
    Found in Attogram/Attogram.php by phpmd

    ErrorControlOperator

    Error suppression should be avoided if possible as it doesn't just suppress the error, that you are trying to stop, but will also suppress errors that you didn't predict would ever occur. Consider changing error_reporting() level and/or setting up your own error handler.

    Example

    function foo($filePath) {
        $file = @fopen($filPath); // hides exceptions
        $key = @$array[$notExistingKey]; // assigns null to $key
    }

    Source http://phpmd.org/rules/cleancode.html#errorcontroloperator

    Remove error control operator '@' on line 100.
    Open

        public function awaken()
        {
            // The Site Administrator IP addresses
            $this->remember(
                'admins',
    Severity: Minor
    Found in Attogram/Attogram.php by phpmd

    ErrorControlOperator

    Error suppression should be avoided if possible as it doesn't just suppress the error, that you are trying to stop, but will also suppress errors that you didn't predict would ever occur. Consider changing error_reporting() level and/or setting up your own error handler.

    Example

    function foo($filePath) {
        $file = @fopen($filPath); // hides exceptions
        $key = @$array[$notExistingKey]; // assigns null to $key
    }

    Source http://phpmd.org/rules/cleancode.html#errorcontroloperator

    Remove error control operator '@' on line 123.
    Open

        public function awaken()
        {
            // The Site Administrator IP addresses
            $this->remember(
                'admins',
    Severity: Minor
    Found in Attogram/Attogram.php by phpmd

    ErrorControlOperator

    Error suppression should be avoided if possible as it doesn't just suppress the error, that you are trying to stop, but will also suppress errors that you didn't predict would ever occur. Consider changing error_reporting() level and/or setting up your own error handler.

    Example

    function foo($filePath) {
        $file = @fopen($filPath); // hides exceptions
        $key = @$array[$notExistingKey]; // assigns null to $key
    }

    Source http://phpmd.org/rules/cleancode.html#errorcontroloperator

    Missing class import via use statement (line '227', column '37').
    Open

                $event->pushHandler(new \Attogram\EventLogger($database));
    Severity: Minor
    Found in public/index.php by phpmd

    MissingImport

    Since: 2.7.0

    Importing all external classes in a file through use statements makes them clearly visible.

    Example

    function make() {
        return new \stdClass();
    }

    Source http://phpmd.org/rules/cleancode.html#MissingImport

    Remove error control operator '@' on line 133.
    Open

        public function awaken()
        {
            // The Site Administrator IP addresses
            $this->remember(
                'admins',
    Severity: Minor
    Found in Attogram/Attogram.php by phpmd

    ErrorControlOperator

    Error suppression should be avoided if possible as it doesn't just suppress the error, that you are trying to stop, but will also suppress errors that you didn't predict would ever occur. Consider changing error_reporting() level and/or setting up your own error handler.

    Example

    function foo($filePath) {
        $file = @fopen($filPath); // hides exceptions
        $key = @$array[$notExistingKey]; // assigns null to $key
    }

    Source http://phpmd.org/rules/cleancode.html#errorcontroloperator

    Avoid too many return statements within this method.
    Open

                    return;
    Severity: Major
    Found in public/index.php - About 30 mins to fix

      Avoid too many return statements within this method.
      Open

              return false;
      Severity: Major
      Found in Attogram/Attogram.php - About 30 mins to fix

        Missing class import via use statement (line '203', column '34').
        Open

                    $streamHandler = new \Monolog\Handler\StreamHandler('php://output');
        Severity: Minor
        Found in public/index.php by phpmd

        MissingImport

        Since: 2.7.0

        Importing all external classes in a file through use statements makes them clearly visible.

        Example

        function make() {
            return new \stdClass();
        }

        Source http://phpmd.org/rules/cleancode.html#MissingImport

        Missing class import via use statement (line '206', column '46').
        Open

                    $streamHandler->setFormatter(new \Monolog\Formatter\LineFormatter($format, $dateformat));
        Severity: Minor
        Found in public/index.php by phpmd

        MissingImport

        Since: 2.7.0

        Importing all external classes in a file through use statements makes them clearly visible.

        Example

        function make() {
            return new \stdClass();
        }

        Source http://phpmd.org/rules/cleancode.html#MissingImport

        Missing class import via use statement (line '40', column '29').
        Open

                $nullDatabase = new \Attogram\NullDatabase;
        Severity: Minor
        Found in tests/AttogramTest.php by phpmd

        MissingImport

        Since: 2.7.0

        Importing all external classes in a file through use statements makes them clearly visible.

        Example

        function make() {
            return new \stdClass();
        }

        Source http://phpmd.org/rules/cleancode.html#MissingImport

        Remove error control operator '@' on line 128.
        Open

            public function awaken()
            {
                // The Site Administrator IP addresses
                $this->remember(
                    'admins',
        Severity: Minor
        Found in Attogram/Attogram.php by phpmd

        ErrorControlOperator

        Error suppression should be avoided if possible as it doesn't just suppress the error, that you are trying to stop, but will also suppress errors that you didn't predict would ever occur. Consider changing error_reporting() level and/or setting up your own error handler.

        Example

        function foo($filePath) {
            $file = @fopen($filPath); // hides exceptions
            $key = @$array[$notExistingKey]; // assigns null to $key
        }

        Source http://phpmd.org/rules/cleancode.html#errorcontroloperator

        Remove error control operator '@' on line 592.
        Open

            public function isAdmin()
            {
                if (isset($this->isAdmin) && is_bool($this->isAdmin)) {
                    return $this->isAdmin;
                }
        Severity: Minor
        Found in Attogram/Attogram.php by phpmd

        ErrorControlOperator

        Error suppression should be avoided if possible as it doesn't just suppress the error, that you are trying to stop, but will also suppress errors that you didn't predict would ever occur. Consider changing error_reporting() level and/or setting up your own error handler.

        Example

        function foo($filePath) {
            $file = @fopen($filPath); // hides exceptions
            $key = @$array[$notExistingKey]; // assigns null to $key
        }

        Source http://phpmd.org/rules/cleancode.html#errorcontroloperator

        Avoid too many return statements within this method.
        Open

                        return;
        Severity: Major
        Found in public/index.php - About 30 mins to fix

          Avoid too many return statements within this method.
          Open

                          return;
          Severity: Major
          Found in public/index.php - About 30 mins to fix

            Avoid too many return statements within this method.
            Open

                        return;
            Severity: Major
            Found in public/index.php - About 30 mins to fix

              Missing class import via use statement (line '202', column '24').
              Open

                          $log = new \Monolog\Logger('debug');
              Severity: Minor
              Found in public/index.php by phpmd

              MissingImport

              Since: 2.7.0

              Importing all external classes in a file through use statements makes them clearly visible.

              Example

              function make() {
                  return new \stdClass();
              }

              Source http://phpmd.org/rules/cleancode.html#MissingImport

              Remove error control operator '@' on line 33.
              Open

                  public function check()
                  {
                      $this->pageHeader();
                      echo '<h1><span class="icon">🔬</span> Attogram Framework Check</h1>'
                          .'<p><span class="icon">👉</span> <strong>'.__DIR__.'</strong>'
              Severity: Minor
              Found in public/check.php by phpmd

              ErrorControlOperator

              Error suppression should be avoided if possible as it doesn't just suppress the error, that you are trying to stop, but will also suppress errors that you didn't predict would ever occur. Consider changing error_reporting() level and/or setting up your own error handler.

              Example

              function foo($filePath) {
                  $file = @fopen($filPath); // hides exceptions
                  $key = @$array[$notExistingKey]; // assigns null to $key
              }

              Source http://phpmd.org/rules/cleancode.html#errorcontroloperator

              Avoid too many return statements within this method.
              Open

                      return $content;
              Severity: Major
              Found in Attogram/Attogram.php - About 30 mins to fix

                Remove error control operator '@' on line 442.
                Open

                    public function getMarkdown($file)
                    {
                        if (!$this->isReadableFile($file, '.md')) {
                            $this->log->error('GET_MARKDOWN: can not read file: '
                                .$this->webDisplay($file));
                Severity: Minor
                Found in Attogram/Attogram.php by phpmd

                ErrorControlOperator

                Error suppression should be avoided if possible as it doesn't just suppress the error, that you are trying to stop, but will also suppress errors that you didn't predict would ever occur. Consider changing error_reporting() level and/or setting up your own error handler.

                Example

                function foo($filePath) {
                    $file = @fopen($filPath); // hides exceptions
                    $key = @$array[$notExistingKey]; // assigns null to $key
                }

                Source http://phpmd.org/rules/cleancode.html#errorcontroloperator

                Severity
                Category
                Status
                Source
                Language