From cc43a120c8b2033009c10a67d0af53337c8e0929 Mon Sep 17 00:00:00 2001 From: Guy Sartorelli <36352093+GuySartorelli@users.noreply.github.com> Date: Tue, 23 Jan 2024 12:46:57 +1300 Subject: [PATCH] ENH Add generic types (#86) --- src/Extension/FileTextExtractable.php | 3 ++- src/Extractor/FileTextExtractor.php | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Extension/FileTextExtractable.php b/src/Extension/FileTextExtractable.php index fedccbc..6251843 100644 --- a/src/Extension/FileTextExtractable.php +++ b/src/Extension/FileTextExtractable.php @@ -14,6 +14,8 @@ * Adds an additional property which is the cached contents, which is populated on demand. * * @author mstephens + * + * @extends DataExtension */ class FileTextExtractable extends DataExtension { @@ -85,7 +87,6 @@ public function getFileContent() */ public function extractFileAsText($disableCache = false) { - /** @var File $file */ $file = $this->owner; if (!$disableCache) { $text = $this->getTextCache()->load($file); diff --git a/src/Extractor/FileTextExtractor.php b/src/Extractor/FileTextExtractor.php index d34cac9..8f2ee1b 100644 --- a/src/Extractor/FileTextExtractor.php +++ b/src/Extractor/FileTextExtractor.php @@ -87,7 +87,6 @@ public static function for_file($file) // Ensure we have a File instance to work with if (is_string($file)) { - /** @var File $fileObject */ $fileObject = File::create(); $fileObject->setFromLocalFile($file); $file = $fileObject;