Goracash/goracash-api-php-client

View on GitHub
src/Service/Phone.php

Summary

Maintainability
A
2 hrs
Test Coverage

Showing 7 of 7 total issues

Avoid using undefined variables such as '$params' which will lead to PHP notices.
Open

$response = $this->execute('/cbStats', $params);
Severity: Minor
Found in src/Service/Phone.php by phpmd

Avoid using undefined variables such as '$params' which will lead to PHP notices.
Open

$params['date_lbound'] = $startDate;
Severity: Minor
Found in src/Service/Phone.php by phpmd

Avoid using undefined variables such as '$params' which will lead to PHP notices.
Open

$params['date_ubound'] = $endDate;
Severity: Minor
Found in src/Service/Phone.php by phpmd

Avoid using undefined variables such as '$params' which will lead to PHP notices.
Open

$params['date_lbound'] = $startDate;
Severity: Minor
Found in src/Service/Phone.php by phpmd

Avoid using undefined variables such as '$params' which will lead to PHP notices.
Open

$response = $this->execute('/' . $phone . '/cbStats', $params);
Severity: Minor
Found in src/Service/Phone.php by phpmd

Avoid using undefined variables such as '$params' which will lead to PHP notices.
Open

$params['date_ubound'] = $endDate;
Severity: Minor
Found in src/Service/Phone.php by phpmd

Identical blocks of code found in 2 locations. Consider refactoring.
Open

public function checkPeriod($startDate, $endDate)
{
$isValidStartDate = $this->utils->isSystemDatetime($startDate);
$isValidEndDate = $this->utils->isSystemDatetime($endDate);
if (!$isValidEndDate || !$isValidStartDate) {
Severity: Major
Found in src/Service/Phone.php and 1 other location - About 2 hrs to fix
src/Service/Web.php on lines 74..90
Category
Status