]> git.mxchange.org Git - friendica-addons.git/commitdiff
Fix last 3 errors
authorArt4 <art4@wlabs.de>
Mon, 9 Dec 2024 23:08:31 +0000 (23:08 +0000)
committerArt4 <art4@wlabs.de>
Mon, 9 Dec 2024 23:08:31 +0000 (23:08 +0000)
showmore/showmore.php
statusnet/library/codebirdsn.php
tesseract/tesseract.php

index 8e85925aec8e5f19fa0884af4e587f868bfd4b48..e326aa98cc30d8abe0d6d27b8661662b645ecc0f 100644 (file)
@@ -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'))) {
index 70743356885619dc57152930f223493de5ed4f98..9807d97f51d0b2754941a7123a1d2406b6bfb88a 100644 (file)
@@ -54,6 +54,8 @@ unset($id);
  *
  * @package codebird
  * @subpackage codebird-php
+ *
+ * @method object statuses_update(array $postdata)
  */
 class CodebirdSN
 {
index b3e1feb683dcf0c2e9a89673ecb688b91c19fe09..4c630dbb5848878f2b7f49514278eb9b8d8ef056 100644 (file)
@@ -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()]);
-       }                       
+       }
 }