Code Duplication    Length = 4-4 lines in 5 locations

lib/Page.php 5 locations

@@ 112-115 (lines=4) @@
109
            if (!in_array (PageQueryResult::SCOPE_AUTHOR, getCurrentOption ('ignored_categories'))) {
110
                array_push ($this->entryArray, Author::getCount());
111
            }
112
            if (!in_array (PageQueryResult::SCOPE_SERIES, getCurrentOption ('ignored_categories'))) {
113
                $series = Serie::getCount();
114
                if (!is_null ($series)) array_push ($this->entryArray, $series);
115
            }
116
            if (!in_array (PageQueryResult::SCOPE_PUBLISHER, getCurrentOption ('ignored_categories'))) {
117
                $publisher = Publisher::getCount();
118
                if (!is_null ($publisher)) array_push ($this->entryArray, $publisher);
@@ 116-119 (lines=4) @@
113
                $series = Serie::getCount();
114
                if (!is_null ($series)) array_push ($this->entryArray, $series);
115
            }
116
            if (!in_array (PageQueryResult::SCOPE_PUBLISHER, getCurrentOption ('ignored_categories'))) {
117
                $publisher = Publisher::getCount();
118
                if (!is_null ($publisher)) array_push ($this->entryArray, $publisher);
119
            }
120
            if (!in_array (PageQueryResult::SCOPE_TAG, getCurrentOption ('ignored_categories'))) {
121
                $tags = Tag::getCount();
122
                if (!is_null ($tags)) array_push ($this->entryArray, $tags);
@@ 120-123 (lines=4) @@
117
                $publisher = Publisher::getCount();
118
                if (!is_null ($publisher)) array_push ($this->entryArray, $publisher);
119
            }
120
            if (!in_array (PageQueryResult::SCOPE_TAG, getCurrentOption ('ignored_categories'))) {
121
                $tags = Tag::getCount();
122
                if (!is_null ($tags)) array_push ($this->entryArray, $tags);
123
            }
124
            if (!in_array (PageQueryResult::SCOPE_RATING, getCurrentOption ('ignored_categories'))) {
125
                $rating = Rating::getCount();
126
                if (!is_null ($rating)) array_push ($this->entryArray, $rating);
@@ 124-127 (lines=4) @@
121
                $tags = Tag::getCount();
122
                if (!is_null ($tags)) array_push ($this->entryArray, $tags);
123
            }
124
            if (!in_array (PageQueryResult::SCOPE_RATING, getCurrentOption ('ignored_categories'))) {
125
                $rating = Rating::getCount();
126
                if (!is_null ($rating)) array_push ($this->entryArray, $rating);
127
            }
128
            if (!in_array ("language", getCurrentOption ('ignored_categories'))) {
129
                $languages = Language::getCount();
130
                if (!is_null ($languages)) array_push ($this->entryArray, $languages);
@@ 128-131 (lines=4) @@
125
                $rating = Rating::getCount();
126
                if (!is_null ($rating)) array_push ($this->entryArray, $rating);
127
            }
128
            if (!in_array ("language", getCurrentOption ('ignored_categories'))) {
129
                $languages = Language::getCount();
130
                if (!is_null ($languages)) array_push ($this->entryArray, $languages);
131
            }
132
            foreach ($config['cops_calibre_custom_column'] as $lookup) {
133
                $customColumn = CustomColumnType::createByLookup($lookup);
134
                if (!is_null ($customColumn) && $customColumn->isSearchable()) {