@@ -55,11 +55,6 @@ abstract class LocalInputSource extends InputSource
5555 */
5656 public ?string $ filePath ;
5757
58- /**
59- * @var boolean Sets the input mode to debug. Only used in unit tests.
60- */
61- protected bool $ throwsOnClose ;
62-
6358 /**
6459 * Checks if the file needs fixing.
6560 * @return void
@@ -100,7 +95,6 @@ private function checkMimeType()
10095 public function __construct ()
10196 {
10297 $ this ->checkMimeType ();
103- $ this ->throwsOnClose = false ;
10498 }
10599
106100 /**
@@ -259,35 +253,6 @@ public function fixPDF(): void
259253 );
260254 }
261255
262- /**
263- * Closes the handle/stream, if the input type supports it.
264- *
265- * @return void
266- * @throws MindeeSourceException Throws when strict mode is enabled.
267- */
268- public function close (): void
269- {
270- if ($ this ->throwsOnClose ) {
271- throw new MindeeSourceException (
272- "Closing is not implemented on this type of local input source. " ,
273- ErrorCode::USER_OPERATION_ERROR
274- );
275- } else {
276- error_log ("Closing is not implemented on this type of local input source. " );
277- }
278- }
279-
280- /**
281- * Enables strict mode.
282- * Currently only used to throw on misuse of close().
283- *
284- * @return void
285- */
286- public function enableStrictMode ()
287- {
288- $ this ->throwsOnClose = true ;
289- }
290-
291256 /**
292257 * @param integer $quality Quality of the output file.
293258 * @param integer|null $maxWidth Maximum width (Ignored for PDFs).
0 commit comments