Showing 19 of 75 total issues
Cases
has 34 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class Cases
{
/**
* @var string
*/
User
has 30 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class User
{
/**
* @var int
*/
Method getConfigTreeBuilder
has 85 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getConfigTreeBuilder()
{
$treeBuilder = new TreeBuilder();
$rootNode = $treeBuilder->root('params');
ListCasesRequest
has 28 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class ListCasesRequest implements RequestInterface
{
/**
* @var string
*/
AddCasesRequest
has 27 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class AddCasesRequest implements RequestInterface
{
/**
* @var string
*/
Method getConfigTreeBuilder
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getConfigTreeBuilder()
{
$treeBuilder = new TreeBuilder();
$rootNode = $treeBuilder->root('params');
Method getConfigTreeBuilder
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getConfigTreeBuilder()
{
$treeBuilder = new TreeBuilder();
$rootNode = $treeBuilder->root('params');
Function postMultipart
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
Open
public function postMultipart($url, $name, array $params = [])
{
$multipart = [];
foreach ($params as $key => $param) {
- 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 getConfigTreeBuilder
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getConfigTreeBuilder()
{
$treeBuilder = new TreeBuilder();
$rootNode = $treeBuilder->root('params');
Method getConfigTreeBuilder
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getConfigTreeBuilder()
{
$treeBuilder = new TreeBuilder();
$rootNode = $treeBuilder->root('params');
Method postMultipart
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function postMultipart($url, $name, array $params = [])
{
$multipart = [];
foreach ($params as $key => $param) {
Method getConfigTreeBuilder
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getConfigTreeBuilder()
{
$treeBuilder = new TreeBuilder();
$rootNode = $treeBuilder->root('params');
Method __construct
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
AddStaffRequestDataTransformer $addRequest,
EditStaffRequestDataTransformer $editRequest,
ListStaffRequestDataTransformer $listRequest,
ViewStaffRequestDataTransformer $viewRequest,
ListStaffResponseDataTransformer $listResponse,
Method __construct
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
AddCasesRequestDataTransformer $addRequest,
EditCasesRequestDataTransformer $editRequest,
ListCasesRequestDataTransformer $listRequest,
ViewCasesRequestDataTransformer $viewRequest,
ListCasesResponseDataTransformer $listResponse,
Method __construct
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
AddGroupRequestDataTransformer $addRequest,
EditGroupRequestDataTransformer $editRequest,
ListGroupRequestDataTransformer $listRequest,
ViewGroupRequestDataTransformer $viewRequest,
ListGroupResponseDataTransformer $listResponse,
Method __construct
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
AddUserRequestDataTransformer $addRequest,
EditUserRequestDataTransformer $editRequest,
ListUserRequestDataTransformer $listRequest,
ViewUserRequestDataTransformer $viewRequest,
ListUserResponseDataTransformer $listResponse,
Avoid too many return
statements within this method. Open
Open
return $this->listResponse;
Avoid too many return
statements within this method. Open
Open
return $this->viewResponse;
Function add
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
Open
public function add(AddMessageRequest $request)
{
$transformer = $this->transformerFactory->get(MessageDataTransformerFactory::REQUEST_ADD);
$configuration = $this->configurationFactory->get(MessageConfigurationFactory::CONFIGURATION_ADD);
- 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"