src/MalScraper/Model/User/UserModel.php
private function getStat($type)
    {
        $anime_stat = [];
        $right_area = $this->_parser->find('.container-right', 0);
        $stat_area = $right_area->find('.user-statistics', 0);
        if ($type == 'anime') {
            $a_stat_area = $stat_area->find('div[class="user-statistics-stats mt16"]', 0);
        } else {
            $a_stat_area = $stat_area->find('div[class="user-statistics-stats mt16"]', 1);
        }
        $a_stat_score = $a_stat_area->find('.stat-score', 0);

        $anime_stat['days'] = $this->getDays($a_stat_score);
        $anime_stat['mean_score'] = $this->getMeanScore($a_stat_score);
        $anime_stat['status'] = $this->getStatStatus($a_stat_area, $type);
        $anime_stat['history'] = $this->getHistory($right_area, $type);

        return $anime_stat;
    }
private function getStat($type)
    {
        $anime_stat = [];
        $right_area = $this->_parser->find('.container-right', 0);
        $stat_area = $right_area->find('.user-statistics', 0);
        if ($type == 'anime') {
            $a_stat_area = $stat_area->find('div[class="user-statistics-stats mt16"]', 0);
        } else {
            $a_stat_area = $stat_area->find('div[class="user-statistics-stats mt16"]', 1);
        }
        $a_stat_score = $a_stat_area->find('.stat-score', 0);

        $anime_stat['days'] = $this->getDays($a_stat_score);
        $anime_stat['mean_score'] = $this->getMeanScore($a_stat_score);
        $anime_stat['status'] = $this->getStatStatus($a_stat_area, $type);
        $anime_stat['history'] = $this->getHistory($right_area, $type);

        return $anime_stat;
    }
private function getStat ( $ type ) { $ anime_stat = [ ] ; $ right_area = $ this -> _parser -> find ( '.container-right' , 0 ) ; $ stat_area = $ right_area -> find ( '.user-statistics' , 0 ) ; if ( $ type == 'anime' ) { $ a_stat_area = $ stat_area -> find ( 'div[class="user-statistics-stats mt16"]' , 0 ) ; } else { $ a_stat_area = $ stat_area -> find ( 'div[class="user-statistics-stats mt16"]' , 1 ) ; } $ a_stat_score = $ a_stat_area -> find ( '.stat-score' , 0 ) ; $ anime_stat [ 'days' ] = $ this -> getDays ( $ a_stat_score ) ; $ anime_stat [ 'mean_score' ] = $ this -> getMeanScore ( $ a_stat_score ) ; $ anime_stat [ 'status' ] = $ this -> getStatStatus ( $ a_stat_area , $ type ) ; $ anime_stat [ 'history' ] = $ this -> getHistory ( $ right_area , $ type ) ; return $ anime_stat ; }
Get user anime stat.

@param string $type

@return array
Get user anime stat .