Showing 7 of 7 total issues
Optin
has 28 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class Optin
{
private $active;
private $authorId;
private $backgroundColor;
File OptinRepository.php
has 280 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
namespace WBU\Http\Repositories;
use WBU\BooleanConstants;
Method getOptinsByPageId
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getOptinsByPageId() : array
{
if (!function_exists('get_the_ID')) {
return [];
}
Method getOptinById
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getOptinById(int $id) : OptinDto
{
global $wpdb;
$metaKeyBackgroundColor = self::POSTMETA_KEY_BACKGROUND_COLOR;
Method updateOptin
has 14 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
int $optinId,
bool $active,
int $authorId,
string $backgroundColor,
int $conversions,
Method updateOptin
has 14 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
int $optinId,
bool $active,
int $authorId,
string $backgroundColor,
int $conversions,
Method updateOptin
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function updateOptin(OptinDto $dto) : int
{
if (! function_exists('wp_insert_post')) {
return -1;
}