From cdc7d0fe0eb17ffbcd01d8bd80d2fd0e0b3d0c6d Mon Sep 17 00:00:00 2001 From: Sarah Hoffmann Date: Tue, 2 Jul 2019 23:24:49 +0200 Subject: [PATCH] remove visibility modifier from constants again Only supported on PHP >= 7.1. --- lib/Phrase.php | 4 ++-- test/php/Nominatim/PhraseTest.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/Phrase.php b/lib/Phrase.php index 2e90537e..e2643e87 100644 --- a/lib/Phrase.php +++ b/lib/Phrase.php @@ -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; diff --git a/test/php/Nominatim/PhraseTest.php b/test/php/Nominatim/PhraseTest.php index c23d6483..ab031bb0 100644 --- a/test/php/Nominatim/PhraseTest.php +++ b/test/php/Nominatim/PhraseTest.php @@ -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())); } -- 2.45.1