Skip to content

Commit 5808a27

Browse files
committed
fix class constants
git-svn-id: http://svn.php.net/repository/pear/packages/Text_LanguageDetect/trunk@322323 c90b9560-bf6c-de11-be94-00142212c4b1
1 parent 2118dc0 commit 5808a27

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

Text/LanguageDetect.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ function languageExists($lang)
382382
} else {
383383
throw new Text_LanguageDetect_Exception(
384384
'Unknown type passed to languageExists()',
385-
Text_LanguageDetect_Exception::UNKNOWN_TYPE
385+
Text_LanguageDetect_Exception::PARAM_TYPE
386386
);
387387
}
388388
}
@@ -725,7 +725,7 @@ function detect($sample, $limit = 0)
725725
} else {
726726
throw new Text_LanguageDetect_Exception(
727727
'Error during block detection',
728-
Text_LanguageDetect_Exception::ERR_BLOCK_DETECTION
728+
Text_LanguageDetect_Exception::BLOCK_DETECTION
729729
);
730730
}
731731

@@ -910,14 +910,14 @@ function detectUnicodeBlocks($str, $skip_symbols)
910910
if (!is_bool($skip_symbols)) {
911911
throw new Text_LanguageDetect_Exception(
912912
'Second parameter must be boolean',
913-
Text_LanguageDetect_Exception::ERR_PARAM_TYPE
913+
Text_LanguageDetect_Exception::PARAM_TYPE
914914
);
915915
}
916916

917917
if (!is_string($str)) {
918918
throw new Text_LanguageDetect_Exception(
919919
'First parameter was not a string',
920-
Text_LanguageDetect_Exception::ERR_PARAM_TYPE
920+
Text_LanguageDetect_Exception::PARAM_TYPE
921921
);
922922
}
923923

@@ -953,7 +953,7 @@ function unicodeBlockName($unicode) {
953953
if ($this->utf8strlen($unicode) > 1) {
954954
throw new Text_LanguageDetect_Exception(
955955
'Pass this function only a single char',
956-
Text_LanguageDetect_Exception::ERR_PARAM_TYPE
956+
Text_LanguageDetect_Exception::PARAM_TYPE
957957
);
958958
}
959959

@@ -962,15 +962,15 @@ function unicodeBlockName($unicode) {
962962
if ($unicode == -1) {
963963
throw new Text_LanguageDetect_Exception(
964964
'Malformatted char',
965-
Text_LanguageDetect_Exception::ERR_INVALID_CHAR
965+
Text_LanguageDetect_Exception::INVALID_CHAR
966966
);
967967
}
968968

969969
// input check
970970
} elseif (!is_int($unicode)) {
971971
throw new Text_LanguageDetect_Exception(
972972
'Input must be of type string or int.',
973-
Text_LanguageDetect_Exception::ERR_PARAM_TYPE
973+
Text_LanguageDetect_Exception::PARAM_TYPE
974974
);
975975
}
976976

0 commit comments

Comments
 (0)