From 80adfe870bdfbfefdb6a58dea3e8208f37447cc3 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Thu, 10 Oct 2024 01:01:35 +0200 Subject: [PATCH] Fix coding style With php-cs-fixer 3.64.0, the `native_function_invocation` rule no longer passed. --- src/Readability.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Readability.php b/src/Readability.php index b0b815f..6fb88ad 100644 --- a/src/Readability.php +++ b/src/Readability.php @@ -668,10 +668,10 @@ class Readability implements LoggerAwareInterface $this->logger->debug(' content length less than 6 chars, 0 embeds and either 0 images or more than 2 images'); $toRemove = true; } elseif (!$isList && $weight < 25 && $linkDensity > 0.25) { - $this->logger->debug(' weight is ' . $weight . ' < 25 and link density is ' . sprintf('%.2f', $linkDensity) . ' > 0.25'); + $this->logger->debug(' weight is ' . $weight . ' < 25 and link density is ' . \sprintf('%.2f', $linkDensity) . ' > 0.25'); $toRemove = true; } elseif ($a > 2 && ($weight >= 25 && $linkDensity > 0.5)) { - $this->logger->debug(' more than 2 links and weight is ' . $weight . ' > 25 but link density is ' . sprintf('%.2f', $linkDensity) . ' > 0.5'); + $this->logger->debug(' more than 2 links and weight is ' . $weight . ' > 25 but link density is ' . \sprintf('%.2f', $linkDensity) . ' > 0.5'); $toRemove = true; } elseif ($embedCount > 3) { $this->logger->debug(' more than 3 embeds'); @@ -691,10 +691,10 @@ class Readability implements LoggerAwareInterface $this->logger->debug(' content length less than 10 chars and 0 images, or more than 2 images'); $toRemove = true; } elseif (!$isList && $weight < 25 && $linkDensity > 0.2) { - $this->logger->debug(' weight is ' . $weight . ' lower than 0 and link density is ' . sprintf('%.2f', $linkDensity) . ' > 0.2'); + $this->logger->debug(' weight is ' . $weight . ' lower than 0 and link density is ' . \sprintf('%.2f', $linkDensity) . ' > 0.2'); $toRemove = true; } elseif ($weight >= 25 && $linkDensity > 0.5) { - $this->logger->debug(' weight above 25 but link density is ' . sprintf('%.2f', $linkDensity) . ' > 0.5'); + $this->logger->debug(' weight above 25 but link density is ' . \sprintf('%.2f', $linkDensity) . ' > 0.5'); $toRemove = true; } elseif ((1 === $embedCount && $contentLength < 75) || $embedCount > 1) { $this->logger->debug(' 1 embed and content length smaller than 75 chars, or more than one embed');