summaryrefslogtreecommitdiff
path: root/includes/normal
diff options
context:
space:
mode:
Diffstat (limited to 'includes/normal')
-rw-r--r--includes/normal/RandomTest.php4
-rw-r--r--includes/normal/UtfNormal.php3
-rw-r--r--includes/normal/UtfNormalDefines.php15
-rw-r--r--includes/normal/UtfNormalTest.php1
-rw-r--r--includes/normal/UtfNormalTest2.php18
5 files changed, 35 insertions, 6 deletions
diff --git a/includes/normal/RandomTest.php b/includes/normal/RandomTest.php
index d96cb09a..23471e94 100644
--- a/includes/normal/RandomTest.php
+++ b/includes/normal/RandomTest.php
@@ -57,10 +57,6 @@ function donorm( $str ) {
return rtrim( utf8_normalize( $str . "\x01", UtfNormal::UNORM_NFC ), "\x01" );
}
-function wfMsg($x) {
- return $x;
-}
-
function showDiffs( $a, $b ) {
$ota = explode( "\n", str_replace( "\r\n", "\n", $a ) );
$nta = explode( "\n", str_replace( "\r\n", "\n", $b ) );
diff --git a/includes/normal/UtfNormal.php b/includes/normal/UtfNormal.php
index b5aad301..08f85bd3 100644
--- a/includes/normal/UtfNormal.php
+++ b/includes/normal/UtfNormal.php
@@ -190,7 +190,7 @@ class UtfNormal {
*/
static function loadData() {
if( !isset( self::$utfCombiningClass ) ) {
- require_once( dirname(__FILE__) . '/UtfNormalData.inc' );
+ require_once( __DIR__ . '/UtfNormalData.inc' );
}
}
@@ -238,6 +238,7 @@ class UtfNormal {
* Returns true if the string is _definitely_ in NFC.
* Returns false if not or uncertain.
* @param $string String: a UTF-8 string, altered on output to be valid UTF-8 safe for XML.
+ * @return bool
*/
static function quickIsNFCVerify( &$string ) {
# Screen out some characters that eg won't be allowed in XML
diff --git a/includes/normal/UtfNormalDefines.php b/includes/normal/UtfNormalDefines.php
index 6c4d8b76..5142a414 100644
--- a/includes/normal/UtfNormalDefines.php
+++ b/includes/normal/UtfNormalDefines.php
@@ -6,6 +6,21 @@
* since this file will not be executed during request startup for a compiled
* MediaWiki.
*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
* @file
* @ingroup UtfNormal
*/
diff --git a/includes/normal/UtfNormalTest.php b/includes/normal/UtfNormalTest.php
index e5ae7f72..5872ec34 100644
--- a/includes/normal/UtfNormalTest.php
+++ b/includes/normal/UtfNormalTest.php
@@ -37,6 +37,7 @@ if( defined( 'PRETTY_UTF8' ) ) {
} else {
/**
* @ignore
+ * @return string
*/
function pretty( $string ) {
return trim( preg_replace( '/(.)/use',
diff --git a/includes/normal/UtfNormalTest2.php b/includes/normal/UtfNormalTest2.php
index 28be4838..691bfaa7 100644
--- a/includes/normal/UtfNormalTest2.php
+++ b/includes/normal/UtfNormalTest2.php
@@ -1,7 +1,22 @@
#!/usr/bin/php
<?php
/**
- * Other tests for the unicode normalization module
+ * Other tests for the unicode normalization module.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
*
* @file
* @ingroup UtfNormal
@@ -61,6 +76,7 @@ function normalize_form_kd($c) { return UtfNormal::toNFKD($c); }
* following functions to force pure PHP usage. I decided not to
* commit that code since might produce a slowdown in the UTF
* normalization code just for the sake of these tests. -- hexmode
+ * @return string
*/
function normalize_form_c_php($c) { return UtfNormal::toNFC($c, "php"); }
function normalize_form_d_php($c) { return UtfNormal::toNFD($c, "php"); }