gdbots/query-parser-php

View on GitHub
examples/elastica.php

Summary

Maintainability
A
0 mins
Test Coverage

Avoid unused parameters such as '$level'.
Open

    public function log($level, $message, array $context = array())
Severity: Minor
Found in examples/elastica.php by phpmd

Since: PHPMD 0.2

Avoid passing parameters to methods or constructors and then not using those parameters.

Example:

class Foo
  {
      private function bar($howdy)
      {
          // $howdy is not used
      }
  }

Source: http://phpmd.org/rules/unusedcode.txt

Each class must be in a namespace of at least one level (a top-level vendor name)
Open

class EchoLogger implements \Psr\Log\LoggerInterface
Severity: Minor
Found in examples/elastica.php by phpcodesniffer

A file should declare new symbols (classes, functions, constants, etc.) and cause no other side effects, or it should execute logic with side effects, but should not do both. The first symbol is defined on line 11 and the first side effect is on line 3.
Open

<?php
Severity: Minor
Found in examples/elastica.php by phpcodesniffer

Line exceeds 120 characters; contains 128 characters
Open

        if (isset($context['response']) && isset($context['response']['hits']) && isset($context['response']['hits']['hits'])) {
Severity: Minor
Found in examples/elastica.php by phpcodesniffer

There are no issues that match your filters.

Category
Status