inpin/lara-like

View on GitHub

Showing 2 of 2 total issues

Function like has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

public function like($guard = null, $type = 'like')
{
if (!($guard instanceof User) && (is_string($guard) || is_null($guard))) {
$guard = $this->getLoggedInUserForLaraLike($guard);
}
Severity: Minor
Found in src/Likeable.php - About 25 mins to fix

Function unlike has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

public function unlike($guard = null, $type = 'like')
{
if (!($guard instanceof User) && (is_string($guard) || is_null($guard))) {
$guard = $this->getLoggedInUserForLaraLike($guard);
}
Severity: Minor
Found in src/Likeable.php - About 25 mins to fix
Severity
Category
Status
Source
Language