Function getAnimes
has a Cognitive Complexity of 70 (exceeds 5 allowed). Consider refactoring.
public function getAnimes(){
$dom = new DOMDocument();
libxml_use_internal_errors(true);
$control = '';
preg_match_all(parent::PATTERN_CREATOR_ANIMES . $this->creator_id . parent::PATTERN_SECOND_CREATOR_ANIMES, $this->html, $arr);
Function getCreator
has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring.
public function getCreator()
{
$dom = new DOMDocument();
libxml_use_internal_errors(true);
$dom->loadHTML($this->html);
Function getInfo
has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring.
public function getInfo(){
preg_match_all(parent::PATTERN_CREATOR_INFO, $this->html, $arr);
if (!isset($arr[0][0]) || empty($arr[0][0])){
return 'null';
}else{
File Anime.php
has 342 lines of code (exceeds 250 allowed). Consider refactoring.
<?php
/**
* Class AnidbAnime
* @brief Anime Setup
* @author gloire
Function getRelatedAnimes
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
public function getRelatedAnimes(){
$dom = new DOMDocument();
libxml_use_internal_errors(true);
preg_match_all(parent::PATTERN_CHAR_RELATED, $this->html, $arr);
if (!isset($arr[2][0])){
Function getInfo
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
public function getInfo()
{
preg_match_all(parent::PATTERN_CHAR_INFO, $this->html, $arr);
$dom = new DOMDocument();
libxml_use_internal_errors(true);
Function getStaff
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
public function getStaff()
{
preg_match_all(parent::PATTERN_STAFF, $this->html, $exArray);
if (isset($exArray[1][0]) && isset($exArray[2][0])) {
$firstId = $exArray[1][0];
Method getAnimes
has 70 lines of code (exceeds 25 allowed). Consider refactoring.
public function getAnimes(){
$dom = new DOMDocument();
libxml_use_internal_errors(true);
$control = '';
preg_match_all(parent::PATTERN_CREATOR_ANIMES . $this->creator_id . parent::PATTERN_SECOND_CREATOR_ANIMES, $this->html, $arr);
Method getStaff
has 68 lines of code (exceeds 25 allowed). Consider refactoring.
public function getStaff()
{
preg_match_all(parent::PATTERN_STAFF, $this->html, $exArray);
if (isset($exArray[1][0]) && isset($exArray[2][0])) {
$firstId = $exArray[1][0];
Anime
has 23 functions (exceeds 20 allowed). Consider refactoring.
final class Anime extends Options
{
/**
* @param $cloud_name
* @param $key
Method getCreator
has 57 lines of code (exceeds 25 allowed). Consider refactoring.
public function getCreator()
{
$dom = new DOMDocument();
libxml_use_internal_errors(true);
$dom->loadHTML($this->html);
Method getCharacters
has 47 lines of code (exceeds 25 allowed). Consider refactoring.
public function getCharacters()
{
preg_match_all(parent::PATTERN_CHARACTERS, $this->html, $mainCharArray);
if (!empty($mainCharArray[0])) {
$firstCharId = $mainCharArray[7][0];
Method getInfo
has 39 lines of code (exceeds 25 allowed). Consider refactoring.
public function getInfo(){
preg_match_all(parent::PATTERN_CREATOR_INFO, $this->html, $arr);
if (!isset($arr[0][0]) || empty($arr[0][0])){
return 'null';
}else{
Method getRelatedAnimes
has 38 lines of code (exceeds 25 allowed). Consider refactoring.
public function getRelatedAnimes(){
$dom = new DOMDocument();
libxml_use_internal_errors(true);
preg_match_all(parent::PATTERN_CHAR_RELATED, $this->html, $arr);
if (!isset($arr[2][0])){
Method getCast
has 37 lines of code (exceeds 25 allowed). Consider refactoring.
public function getCast()
{
preg_match_all(parent::PATTERN_CAST, $this->html, $castArray);
if (!empty($castArray[0])) {
$firstCastId = $castArray[2][0];
Method getInfo
has 33 lines of code (exceeds 25 allowed). Consider refactoring.
public function getInfo()
{
preg_match_all(parent::PATTERN_CHAR_INFO, $this->html, $arr);
$dom = new DOMDocument();
libxml_use_internal_errors(true);
Method getDirectlyRelatedAnimes
has 26 lines of code (exceeds 25 allowed). Consider refactoring.
public function getDirectlyRelatedAnimes()
{
preg_match_all(parent::PATTERN_DIRECTLY_RELATED, $this->html, $directArr);
if (empty($directArr[0])) {
preg_match_all(parent::PATTERN_CONTROL_DIRECTLY_RELATED, $this->html, $directArr);
Function controlAndGetTitle
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
public function controlAndGetTitle(){
preg_match_all(parent::PATTERN_CREATOR_TITLE, $this->html, $title);
if(isset($title[1][0]) || !empty($title[1][0])){
$title = $title[1][0];
}else{
Function controlAndGetTitle
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
public function controlAndGetTitle()
{
preg_match_all(parent::PATTERN_CHAR_TITLE, $this->html, $titleArr);
if (isset($titleArr[1][0]) || !empty($titleArr[1][0])) {
return $titleArr[1][0];
Function getCast
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
public function getCast()
{
preg_match_all(parent::PATTERN_CAST, $this->html, $castArray);
if (!empty($castArray[0])) {
$firstCastId = $castArray[2][0];