Showing 38 of 38 total issues
Contact
has 128 functions (exceeds 20 allowed). Consider refactoring. Open
class Contact extends AbstractModel
{
/**
* @var Account
* @Salesforce\Relation(field="AccountId", name="Account",
User
has 125 functions (exceeds 20 allowed). Consider refactoring. Open
class User extends AbstractModel
{
/**
* @var stirng
* @Salesforce\Field(name="AboutMe")
Opportunity
has 95 functions (exceeds 20 allowed). Consider refactoring. Open
class Opportunity extends AbstractModel
{
/**
* @var Account
* @Salesforce\Relation(field="AccountId", name="Account",
Account
has 90 functions (exceeds 20 allowed). Consider refactoring. Open
class Account extends AbstractModel
{
/**
* @var MappedRecordIterator
* @Salesforce\Relation(name="AccountContactRoles",
Task
has 70 functions (exceeds 20 allowed). Consider refactoring. Open
class Task extends AbstractModel
{
/**
* @var Account
* @Salesforce\Relation(field="AccountId", name="Account",
File Contact.php
has 587 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace LogicItLab\Salesforce\MapperBundle\Model;
use DateTime;
File User.php
has 574 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace LogicItLab\Salesforce\MapperBundle\Model;
use DateTime;
File Opportunity.php
has 484 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace LogicItLab\Salesforce\MapperBundle\Model;
use DateTime;
File Mapper.php
has 460 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace LogicItLab\Salesforce\MapperBundle;
use DateTime;
Function mapToSalesforceObject
has a Cognitive Complexity of 43 (exceeds 5 allowed). Consider refactoring. Open
public function mapToSalesforceObject($model)
{
$sObject = new stdClass;
$sObject->fieldsToNull = array();
- 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
File Account.php
has 435 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace LogicItLab\Salesforce\MapperBundle\Model;
use DateTime;
Lead
has 32 functions (exceeds 20 allowed). Consider refactoring. Open
class Lead extends AbstractModel
{
/**
* @var string
* @Salesforce\Field(name="Name")
File Task.php
has 328 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace LogicItLab\Salesforce\MapperBundle\Model;
use DateTime;
Name
has 28 functions (exceeds 20 allowed). Consider refactoring. Open
class Name
{
/**
* @var string
* @Salesforce\Field(name="Id")
Mapper
has 26 functions (exceeds 20 allowed). Consider refactoring. Open
class Mapper
{
/**
* Salesforce client
*
Function getFields
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
public function getFields($modelClass, $includeRelatedLevels, $ignoreObject = null)
{
$fields = array();
foreach ($this->annotationReader->getSalesforceFields($modelClass) as $field) {
- 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
OpportunityLineItem
has 23 functions (exceeds 20 allowed). Consider refactoring. Open
class OpportunityLineItem extends AbstractModel
{
/**
* @var string
* @Salesforce\Field(name="Description")
Method mapToSalesforceObject
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function mapToSalesforceObject($model)
{
$sObject = new stdClass;
$sObject->fieldsToNull = array();
Attachment
has 21 functions (exceeds 20 allowed). Consider refactoring. Open
class Attachment extends AbstractModel
{
/**
* @var string
* @Salesforce\Field(name="Body")
Function save
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
public function save($model)
{
if (is_array($model)) {
$models = $model;
} elseif ($model instanceof Traversable) {
- 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"