Showing 21 of 23 total issues
Response
has 23 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class Response implements ResponseInterface, ArrayAccess
{
/**
* @var mixed
*/
Contacts
has 21 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class Contacts extends Endpoint
{
/**
* Create a new contact.
*
Function build_query_string
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
Open
function build_query_string(array $params = [], $encoding = PHP_QUERY_RFC3986): string
{
if (empty($params)) {
return '';
}
- 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 createOrUpdate
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
$appId,
$eventTypeId,
$id,
$objectId = null,
$email = null,
Function request
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
Open
public function request(string $method, string $endpoint, array $options = [], $query_string = null, bool $requires_auth = true)
{
if ($requires_auth && empty($this->key)) {
throw new InvalidArgument('You must provide a Hubspot api key or token.');
}
- 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 updateEventTypeProperty
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
$appId,
$eventTypeId,
$eventTypePropertyId,
$name,
$label,
Method createEventTypeProperty
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
$appId,
$eventTypeId,
$name,
$label,
$propertyType,
Method updateTable
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function updateTable($tableId, string $name, array $columns = [], bool $draft = false, bool $published = true, bool $useForPages = false)
Method upload
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
$file,
array $options = [],
string $folderPath = '/',
string $fileName = null,
string $folderId = null,
Method updateEventType
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
$appId,
$eventTypeId,
$name = null,
$headerTemplate = null,
$detailTemplate = null,
Method getByCategory
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
string $breakdown_by,
string $time_period,
string $start,
string $end,
array $params = []
Method importData
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
$importStartedAt,
int $pageNumber,
array $messages,
string $storeId,
string $objectType
Method request
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function request(string $method, string $endpoint, array $options = [], $query_string = null, bool $requires_auth = true)
Method getHosted
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
string $content_type,
string $time_period,
string $start,
string $end,
array $params = []
Method updateRow
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function updateRow($tableId, $rowId, array $values, string $name = null, string $path = null)
Method getByType
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
string $object_type,
string $time_period,
string $start,
string $end,
array $params = []
Method signalImportEnd
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
$importStartedAt,
int $pageCount,
int $itemCount,
string $storeId,
string $objectType
Method updateCell
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function updateCell($tableId, $rowId, $cellId, array $values, bool $draft = false)
Method trigger
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
$hubId,
$eventId,
$contactEmail = null,
$contactRevenue = null,
$contactProperties = []
Method addRow
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function addRow($tableId, array $values, bool $draft = false, string $name = null, string $path = null)