]> git.openstreetmap.org Git - nominatim.git/blobdiff - lib/Phrase.php
Merge pull request #986 from mtmail/php-replace-sizeof
[nominatim.git] / lib / Phrase.php
index 0fe1d3132ce6f8346fa7fdac77ced5379e877f3b..e8b31234bb21be37763e6e3c236f42e8476600bd 100644 (file)
@@ -9,7 +9,7 @@ namespace Nominatim;
  */
 class Phrase
 {
-    CONST MAX_DEPTH = 7;
+    const MAX_DEPTH = 7;
 
     // Complete phrase as a string.
     private $sPhrase;
@@ -83,7 +83,7 @@ class Phrase
         $aResult = array(array(join(' ', $aWords)));
         $sFirstToken = '';
         if ($iDepth < Phrase::MAX_DEPTH) {
-            while (sizeof($aWords) > 1) {
+            while (count($aWords) > 1) {
                 $sWord = array_shift($aWords);
                 $sFirstToken .= ($sFirstToken?' ':'').$sWord;
                 $aRest = $this->createWordSets($aWords, $iDepth + 1);
@@ -101,7 +101,7 @@ class Phrase
         $aResult = array(array(join(' ', $aWords)));
         $sFirstToken = '';
         if ($iDepth < Phrase::MAX_DEPTH) {
-            while (sizeof($aWords) > 1) {
+            while (count($aWords) > 1) {
                 $sWord = array_pop($aWords);
                 $sFirstToken = $sWord.($sFirstToken?' ':'').$sFirstToken;
                 $aRest = $this->createInverseWordSets($aWords, $iDepth + 1);
@@ -113,4 +113,4 @@ class Phrase
 
         return $aResult;
     }
-};
+}