]> git.openstreetmap.org Git - nominatim.git/commitdiff
remove visibility modifier from constants again
authorSarah Hoffmann <lonvia@denofr.de>
Tue, 2 Jul 2019 21:24:49 +0000 (23:24 +0200)
committerSarah Hoffmann <lonvia@denofr.de>
Tue, 2 Jul 2019 21:24:49 +0000 (23:24 +0200)
Only supported on PHP >= 7.1.

lib/Phrase.php
test/php/Nominatim/PhraseTest.php

index 2e90537e10c48c447fe450da388e8fef8adb5d52..e2643e878ed40a3bb22533600603647418e98011 100644 (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;
index c23d648338278a270cecf097669f60cf22a08f5e..ab031bb0b0cdedfd3bb1b449a77c788f4de45eb3 100644 (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()));
     }