Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Array end with comma is recommended #1

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions NumberTools.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class NumberTools {
'۶',
'۷',
'۸',
'۹'
'۹',
);
private static $arabic_digits = array (
'٠',
Expand All @@ -28,7 +28,7 @@ class NumberTools {
'٦',
'٧',
'٨',
'٩'
'٩',
);
private static $english_digits = array (
'0',
Expand All @@ -40,19 +40,19 @@ class NumberTools {
'6',
'7',
'8',
'9'
'9',
);
public static function arabicPersionToEnglish($str) {
$str = str_replace ( self::$persian_digits, self::$english_digits, $str );
$str = str_replace ( self::$arabic_digits, self::$english_digits, $str );
$str = str_replace(self::$persian_digits, self::$english_digits, $str);
$str = str_replace(self::$arabic_digits, self::$english_digits, $str);
return $str;
}
public static function EnglishToPersion($str) {
return str_replace ( self::$english_digits, self::$persian_digits, $str );
return str_replace(self::$english_digits, self::$persian_digits, $str);
}

public static function EnglishToarabic($str) {
return str_replace ( self::$english_digits, self::$arabic_digits, $str );
return str_replace(self::$english_digits, self::$arabic_digits, $str);
}


Expand Down