Skip to content

Commit 6912f45

Browse files
committed
Laravel 12 support added.
1 parent 7cb6e36 commit 6912f45

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/ExtractorService/ExtractorCommonProcessors/PhpPowerPointProcessor.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
use Nilgems\PhpTextract\ExtractorService\Contracts\AbstractTextExtractor;
77
use PhpOffice\PhpPresentation\IOFactory;
88
use PhpOffice\PhpPresentation\Shape;
9+
use PhpOffice\PhpSpreadsheet\Reader\Exception;
910

1011
/**
1112
* PHP PowerPointProcessor
@@ -14,6 +15,11 @@
1415
class PhpPowerPointProcessor extends AbstractTextExtractor
1516
{
1617
protected string $readerType = "PowerPoint2007";
18+
19+
/**
20+
* @return bool
21+
* @throws TextractException
22+
*/
1723
private function hasReadable(): bool
1824
{
1925
$file_path = $this->utilsService->getFilePath();
@@ -22,7 +28,6 @@ private function hasReadable(): bool
2228
$presentation = $reader->load($file_path);
2329
return count($presentation->getAllSlides()) > 0;
2430
} catch (\Exception $exception) {
25-
throw $exception;
2631
report($exception);
2732
throw new TextractException(trans('textract::processor.error_unable_to_read', [
2833
'path' => $this->utilsService->getFilePath()
@@ -33,7 +38,7 @@ private function hasReadable(): bool
3338

3439
/**
3540
* @throws TextractException
36-
* @throws \PhpOffice\PhpSpreadsheet\Reader\Exception
41+
* @throws Exception
3742
*/
3843
protected function getExtractedText(): string
3944
{

0 commit comments

Comments
 (0)