diff options
Diffstat (limited to 'vendor/andreskrey/Readability/Configuration.php')
-rw-r--r-- | vendor/andreskrey/Readability/Configuration.php | 40 |
1 files changed, 33 insertions, 7 deletions
diff --git a/vendor/andreskrey/Readability/Configuration.php b/vendor/andreskrey/Readability/Configuration.php index 951740ed0..6c17bc757 100644 --- a/vendor/andreskrey/Readability/Configuration.php +++ b/vendor/andreskrey/Readability/Configuration.php @@ -21,7 +21,7 @@ class Configuration /** * @var int */ - protected $wordThreshold = 500; + protected $charThreshold = 500; /** * @var bool @@ -109,9 +109,9 @@ class Configuration // If no logger has been set, just return a null logger if ($this->logger === null) { return new NullLogger(); - } else { - return $this->logger; } + + return $this->logger; } /** @@ -149,19 +149,45 @@ class Configuration /** * @return int */ + public function getCharThreshold() + { + return $this->charThreshold; + } + + /** + * @param int $charThreshold + * + * @return $this + */ + public function setCharThreshold($charThreshold) + { + $this->charThreshold = $charThreshold; + + return $this; + } + + /** + * @deprecated Use getCharThreshold. Will be removed in version 2.0 + * + * @return int + */ public function getWordThreshold() { - return $this->wordThreshold; + @trigger_error('getWordThreshold was replaced with getCharThreshold and will be removed in version 3.0', E_USER_DEPRECATED); + + return $this->charThreshold; } /** - * @param int $wordThreshold + * @param int $charThreshold * * @return $this */ - public function setWordThreshold($wordThreshold) + public function setWordThreshold($charThreshold) { - $this->wordThreshold = $wordThreshold; + @trigger_error('setWordThreshold was replaced with setCharThreshold and will be removed in version 3.0', E_USER_DEPRECATED); + + $this->charThreshold = $charThreshold; return $this; } |