File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -242,41 +242,6 @@ protected function recoverByDeclaredCount(array $pages): array
242242 return $ pages ;
243243 }
244244
245- /**
246- * @param array<Page> $pages
247- *
248- * @return array<Page>
249- */
250- protected function recoverByDeclaredCount (array $ pages ): array
251- {
252- if (!$ this ->has ('Count ' ) || 0 === \count ($ pages )) {
253- return $ pages ;
254- }
255-
256- $ countElement = $ this ->get ('Count ' );
257- if (!\is_object ($ countElement ) || !method_exists ($ countElement , 'getContent ' )) {
258- return $ pages ;
259- }
260-
261- $ declaredCount = (int ) $ countElement ->getContent ();
262- $ actualCount = \count ($ pages );
263-
264- if ($ declaredCount <= $ actualCount ) {
265- return $ pages ;
266- }
267-
268- if (($ declaredCount - $ actualCount ) > 10 ) {
269- return $ pages ;
270- }
271-
272- $ lastPage = $ pages [$ actualCount - 1 ];
273- while (\count ($ pages ) < $ declaredCount ) {
274- $ pages [] = $ lastPage ;
275- }
276-
277- return $ pages ;
278- }
279-
280245 /**
281246 * Gathers information about fonts and collects them in a list.
282247 *
You can’t perform that action at this time.
0 commit comments