From fff140ad4360376df6b2e9cb58ac4d2986baee73 Mon Sep 17 00:00:00 2001 From: Art4 Date: Mon, 9 Dec 2024 23:08:31 +0000 Subject: [PATCH] Fix last 3 errors --- showmore/showmore.php | 2 +- statusnet/library/codebirdsn.php | 2 ++ tesseract/tesseract.php | 3 ++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/showmore/showmore.php b/showmore/showmore.php index 8e85925a..e326aa98 100644 --- a/showmore/showmore.php +++ b/showmore/showmore.php @@ -8,7 +8,6 @@ * */ -use Friendica\App; use Friendica\Core\Hook; use Friendica\Core\Renderer; use Friendica\DI; @@ -79,6 +78,7 @@ function get_body_length($body) * Checking any possible syntax of the style attribute with xpath is impossible * So we just get any element with a style attribute, and check them with a regexp */ + /** @var DOMNodeList $xr */ $xr = $xpath->query('//*[@style]'); foreach ($xr as $node) { if (preg_match('/.*display: *none *;.*/',$node->getAttribute('style'))) { diff --git a/statusnet/library/codebirdsn.php b/statusnet/library/codebirdsn.php index 70743356..9807d97f 100644 --- a/statusnet/library/codebirdsn.php +++ b/statusnet/library/codebirdsn.php @@ -54,6 +54,8 @@ unset($id); * * @package codebird * @subpackage codebird-php + * + * @method object statuses_update(array $postdata) */ class CodebirdSN { diff --git a/tesseract/tesseract.php b/tesseract/tesseract.php index b3e1feb6..4c630dbb 100644 --- a/tesseract/tesseract.php +++ b/tesseract/tesseract.php @@ -26,6 +26,7 @@ function tesseract_ocr_detection(&$media) try { $languages = $ocr->availableLanguages(); if ($languages) { + /** @phpstan-ignore-next-line ignore call of \thiagoalessio\TesseractOCR\Option::lang() */ $ocr->lang(implode('+', $languages)); } $ocr->tempDir(System::getTempPath()); @@ -33,5 +34,5 @@ function tesseract_ocr_detection(&$media) $media['description'] = $ocr->run(); } catch (\Throwable $th) { Logger::info('Error calling TesseractOCR', ['message' => $th->getMessage()]); - } + } }