mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-16 15:47:58 +00:00
remove visibility modifier from constants again
Only supported on PHP >= 7.1.
This commit is contained in:
@@ -9,8 +9,8 @@ namespace Nominatim;
|
|||||||
*/
|
*/
|
||||||
class Phrase
|
class Phrase
|
||||||
{
|
{
|
||||||
public const MAX_WORDSET_LEN = 20;
|
const MAX_WORDSET_LEN = 20;
|
||||||
public const MAX_WORDSETS = 100;
|
const MAX_WORDSETS = 100;
|
||||||
|
|
||||||
// Complete phrase as a string.
|
// Complete phrase as a string.
|
||||||
private $sPhrase;
|
private $sPhrase;
|
||||||
|
|||||||
@@ -113,9 +113,9 @@ class PhraseTest extends \PHPUnit\Framework\TestCase
|
|||||||
|
|
||||||
$oPhrase = new Phrase(join(' ', array_fill(0, 18, 'a')), '');
|
$oPhrase = new Phrase(join(' ', array_fill(0, 18, 'a')), '');
|
||||||
$oPhrase->computeWordSets(new TokensFullSet());
|
$oPhrase->computeWordSets(new TokensFullSet());
|
||||||
$this->assertEquals(Phrase::MAX_WORDSETS, count($oPhrase->getWordSets()));
|
$this->assertEquals(100, count($oPhrase->getWordSets()));
|
||||||
$oPhrase->invertWordSets();
|
$oPhrase->invertWordSets();
|
||||||
$this->assertEquals(Phrase::MAX_WORDSETS, count($oPhrase->getWordSets()));
|
$this->assertEquals(100, count($oPhrase->getWordSets()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user