remove visibility modifier from constants again

Only supported on PHP >= 7.1.
This commit is contained in:
Sarah Hoffmann 2019-07-02 23:24:49 +02:00
parent a27a271034
commit cdc7d0fe0e
2 changed files with 4 additions and 4 deletions

View File

@ -9,8 +9,8 @@ namespace Nominatim;
*/
class Phrase
{
public const MAX_WORDSET_LEN = 20;
public const MAX_WORDSETS = 100;
const MAX_WORDSET_LEN = 20;
const MAX_WORDSETS = 100;
// Complete phrase as a string.
private $sPhrase;

View File

@ -113,9 +113,9 @@ class PhraseTest extends \PHPUnit\Framework\TestCase
$oPhrase = new Phrase(join(' ', array_fill(0, 18, 'a')), '');
$oPhrase->computeWordSets(new TokensFullSet());
$this->assertEquals(Phrase::MAX_WORDSETS, count($oPhrase->getWordSets()));
$this->assertEquals(100, count($oPhrase->getWordSets()));
$oPhrase->invertWordSets();
$this->assertEquals(Phrase::MAX_WORDSETS, count($oPhrase->getWordSets()));
$this->assertEquals(100, count($oPhrase->getWordSets()));
}