open-orchestra/open-orchestra-cms-bundle

View on GitHub
LogBundle/Controller/LogController.php

Summary

Maintainability
A
0 mins
Test Coverage

Avoid using static access to class '\OpenOrchestra\Pagination\Configuration\PaginateFinderConfiguration' in method 'listAction'.
Open

        $configuration = PaginateFinderConfiguration::generateFromRequest($request, $mapping);

StaticAccess

Since: 1.4.0

Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

Example

class Foo
{
    public function bar()
    {
        Bar::baz();
    }
}

Source https://phpmd.org/rules/cleancode.html#staticaccess

Parameter $request has undeclared type \Symfony\Component\HttpFoundation\Request
Open

    public function listAction(Request $request)
Severity: Minor
Found in LogBundle/Controller/LogController.php by phan

Call to undeclared method \OpenOrchestra\LogBundle\Controller\LogController::denyAccessUnlessGranted
Open

        $this->denyAccessUnlessGranted(ContributionActionInterface::READ, LogInterface::ENTITY_TYPE);
Severity: Critical
Found in LogBundle/Controller/LogController.php by phan

Call to method generateFromRequest from undeclared class \OpenOrchestra\Pagination\Configuration\PaginateFinderConfiguration
Open

        $configuration = PaginateFinderConfiguration::generateFromRequest($request, $mapping);
Severity: Critical
Found in LogBundle/Controller/LogController.php by phan

Possibly zero references to use statement for classlike/namespace Config (\Sensio\Bundle\FrameworkExtraBundle\Configuration)
Open

use Sensio\Bundle\FrameworkExtraBundle\Configuration as Config;
Severity: Minor
Found in LogBundle/Controller/LogController.php by phan

Possibly zero references to use statement for classlike/namespace Api (\OpenOrchestra\BaseApiBundle\Controller\Annotation)
Open

use OpenOrchestra\BaseApiBundle\Controller\Annotation as Api;
Severity: Minor
Found in LogBundle/Controller/LogController.php by phan

Return type of listAction() is undeclared type \OpenOrchestra\BaseApi\Facade\FacadeInterface
Open

    public function listAction(Request $request)
Severity: Minor
Found in LogBundle/Controller/LogController.php by phan

Call to undeclared method \OpenOrchestra\LogBundle\Controller\LogController::get
Open

        $facade = $this->get('open_orchestra_api.transformer_manager')->transform('log_collection', $collection);
Severity: Critical
Found in LogBundle/Controller/LogController.php by phan

Call to undeclared method \OpenOrchestra\LogBundle\Controller\LogController::get
Open

        $repository =  $this->get('open_orchestra_log.repository.log');
Severity: Critical
Found in LogBundle/Controller/LogController.php by phan

Call to undeclared method \OpenOrchestra\LogBundle\Controller\LogController::get
Open

        $siteId = $this->get('open_orchestra_backoffice.context_backoffice_manager')->getSiteId();
Severity: Critical
Found in LogBundle/Controller/LogController.php by phan

Class extends undeclared class \OpenOrchestra\BaseApiBundle\Controller\BaseController
Open

class LogController extends BaseController
Severity: Critical
Found in LogBundle/Controller/LogController.php by phan

There are no issues that match your filters.

Category
Status