diff options
author | Andres Rey <[email protected]> | 2018-11-25 12:47:06 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2018-11-25 12:47:06 +0000 |
commit | e1b31f9284225cc7121d8798d4757ea81704e44c (patch) | |
tree | 8ed70368b49a0fe3da8a4b7cc1057f97446dcdc5 /src/Configuration.php | |
parent | 992a11260de32a036c932a8ba61bcc8a46c34dd1 (diff) | |
parent | fcbb76a9a015b85bab63324e10ddfa993be17f78 (diff) |
Merge pull request #71 from andreskrey/development
v2.0.0
Diffstat (limited to 'src/Configuration.php')
-rw-r--r-- | src/Configuration.php | 40 |
1 files changed, 33 insertions, 7 deletions
diff --git a/src/Configuration.php b/src/Configuration.php index 951740e..6c17bc7 100644 --- a/src/Configuration.php +++ b/src/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; } |