LogBundle/Controller/LogController.php
Avoid using static access to class '\OpenOrchestra\Pagination\Configuration\PaginateFinderConfiguration' in method 'listAction'. Open
Open
$configuration = PaginateFinderConfiguration::generateFromRequest($request, $mapping);
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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
Open
public function listAction(Request $request)
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\LogBundle\Controller\LogController::denyAccessUnlessGranted
Open
Open
$this->denyAccessUnlessGranted(ContributionActionInterface::READ, LogInterface::ENTITY_TYPE);
- Create a ticketCreate a ticket
- Exclude checks
Call to method generateFromRequest
from undeclared class \OpenOrchestra\Pagination\Configuration\PaginateFinderConfiguration
Open
Open
$configuration = PaginateFinderConfiguration::generateFromRequest($request, $mapping);
- Create a ticketCreate a ticket
- Exclude checks
Possibly zero references to use statement for classlike/namespace Config
(\Sensio\Bundle\FrameworkExtraBundle\Configuration)
Open
Open
use Sensio\Bundle\FrameworkExtraBundle\Configuration as Config;
- Create a ticketCreate a ticket
- Exclude checks
Possibly zero references to use statement for classlike/namespace Api
(\OpenOrchestra\BaseApiBundle\Controller\Annotation)
Open
Open
use OpenOrchestra\BaseApiBundle\Controller\Annotation as Api;
- Create a ticketCreate a ticket
- Exclude checks
Return type of listAction()
is undeclared type \OpenOrchestra\BaseApi\Facade\FacadeInterface
Open
Open
public function listAction(Request $request)
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\LogBundle\Controller\LogController::get
Open
Open
$facade = $this->get('open_orchestra_api.transformer_manager')->transform('log_collection', $collection);
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\LogBundle\Controller\LogController::get
Open
Open
$repository = $this->get('open_orchestra_log.repository.log');
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\LogBundle\Controller\LogController::get
Open
Open
$siteId = $this->get('open_orchestra_backoffice.context_backoffice_manager')->getSiteId();
- Create a ticketCreate a ticket
- Exclude checks
Class extends undeclared class \OpenOrchestra\BaseApiBundle\Controller\BaseController
Open
Open
class LogController extends BaseController
- Create a ticketCreate a ticket
- Exclude checks