Skip to content

Commit

Permalink
ENH Add generic types (#86)
Browse files Browse the repository at this point in the history
  • Loading branch information
GuySartorelli authored Jan 22, 2024
1 parent 4bcdf97 commit cc43a12
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/Extension/FileTextExtractable.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
* Adds an additional property which is the cached contents, which is populated on demand.
*
* @author mstephens
*
* @extends DataExtension<File>
*/
class FileTextExtractable extends DataExtension
{
Expand Down Expand Up @@ -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);
Expand Down
1 change: 0 additions & 1 deletion src/Extractor/FileTextExtractor.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit cc43a12

Please sign in to comment.