Showing 20 of 20 total issues
Function getRows
has a Cognitive Complexity of 42 (exceeds 5 allowed). Consider refactoring. Open
protected function getRows()
{
$rows = array();
$columns = $this->columns();
$accessor = PropertyAccess::createPropertyAccessor();
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
TableBuilder
has 34 functions (exceeds 20 allowed). Consider refactoring. Open
class TableBuilder
{
/**
* @var string
*/
File TableBuilder.php
has 305 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace Ctrl\RadBundle\TableView;
use Ctrl\Common\Paginator\PaginatedDataInterface;
Function execute
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
public function execute(Request $request, $id = null, array $context = array())
{
$options = $this->config->getOptions();
$routes = $this->config->getRoutes();
$config = $options['action_config'];
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
ConfigBuilder
has 23 functions (exceeds 20 allowed). Consider refactoring. Open
class ConfigBuilder
{
protected $config = array();
protected $action = array();
Method getRows
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function getRows()
{
$rows = array();
$columns = $this->columns();
$accessor = PropertyAccess::createPropertyAccessor();
AbstractService
has 21 functions (exceeds 20 allowed). Consider refactoring. Open
abstract class AbstractService
{
/**
* @var ObjectManager|EntityManager
*/
Method execute
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function execute(Request $request, $id = null, array $context = array())
{
$options = $this->config->getOptions();
$routes = $this->config->getRoutes();
$config = $options['action_config'];
Method isType
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function isType($var, $type)
{
switch ($type) {
case 'bool':
case 'boolean':
Method execute
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function execute(Request $request)
{
$options = $this->config->getOptions();
$routes = $this->config->getRoutes();
$config = $this->config->getActionConfig();
Function isType
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public function isType($var, $type)
{
switch ($type) {
case 'bool':
case 'boolean':
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function createFilterCriteria
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
protected function createFilterCriteria(FormInterface $form)
{
$criteria = array();
/** @var FormInterface $child */
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method execute
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function execute(InputInterface $input, OutputInterface $output)
{
$output->writeln("<error> you are about to do some stuff that requires sudo! </error>");
$rootDir = getcwd();
Avoid too many return
statements within this method. Open
return is_object($var) && $var instanceof \DateTime;
Avoid too many return
statements within this method. Open
return is_scalar($var);
Avoid too many return
statements within this method. Open
return is_numeric($var);
Avoid too many return
statements within this method. Open
return new RedirectResponse($this->router->generate(
$context['route']['route'],
$context['route']['params']
));
Avoid too many return
statements within this method. Open
return is_null($var);
Avoid too many return
statements within this method. Open
return $this->templating->renderResponse($config['template'], $viewVars);
Avoid too many return
statements within this method. Open
return is_object($var);