fix: noverify --fix
This commit is contained in:
parent
5aff28d2b8
commit
117640a755
44 changed files with 174 additions and 174 deletions
|
|
@ -32,8 +32,8 @@ class Drawing
|
|||
// self::drawrectnagle($image, $left, $top, $max_width, $max_height, array(0xFF,0,0));
|
||||
$text_lines = explode("\n", $text); // Supports manual line breaks!
|
||||
|
||||
$lines = array();
|
||||
$line_widths = array();
|
||||
$lines = [];
|
||||
$line_widths = [];
|
||||
|
||||
$largest_line_height = 0;
|
||||
foreach ($text_lines as $block) {
|
||||
|
|
@ -54,7 +54,7 @@ class Drawing
|
|||
if ($line_width > $max_width && !$first_word) {
|
||||
$lines[] = $current_line;
|
||||
|
||||
$line_widths[] = $last_width ? $last_width : $line_width;
|
||||
$line_widths[] = $last_width ?: $line_width;
|
||||
$current_line = $item;
|
||||
} else {
|
||||
$current_line .= ($first_word ? '' : ' ') . $item;
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ class SQLStatementExtractor {
|
|||
*/
|
||||
protected static function extractStatements($lines) {
|
||||
|
||||
$statements = array();
|
||||
$statements = [];
|
||||
$sql = "";
|
||||
|
||||
foreach($lines as $line) {
|
||||
|
|
|
|||
|
|
@ -7,9 +7,9 @@ class StringUtil {
|
|||
// from creole
|
||||
static function strToArray($str) {
|
||||
$str = substr($str, 1, -1); // remove { }
|
||||
$res = array();
|
||||
$res = [];
|
||||
|
||||
$subarr = array();
|
||||
$subarr = [];
|
||||
$in_subarr = 0;
|
||||
|
||||
$toks = explode(',', $str);
|
||||
|
|
@ -24,7 +24,7 @@ class StringUtil {
|
|||
if ('}' !== substr($tok, -1, 1)) {
|
||||
$in_subarr++;
|
||||
// if sub-array has more than one element
|
||||
$subarr[$in_subarr] = array();
|
||||
$subarr[$in_subarr] = [];
|
||||
$subarr[$in_subarr][] = $tok;
|
||||
} else {
|
||||
$res[] = static::strToArray($tok);
|
||||
|
|
@ -83,7 +83,7 @@ class StringUtil {
|
|||
static function encodestring($st) {
|
||||
$st = self::mb_strtr($st,"абвгдеёзийклмнопрстуфхъыэ !+()", "abvgdeeziyklmnoprstufh_ie_____");
|
||||
$st = self::mb_strtr($st,"АБВГДЕЁЗИЙКЛМНОПРСТУФХЪЫЭ", "ABVGDEEZIYKLMNOPRSTUFH_IE");
|
||||
$st = strtr($st, array(
|
||||
$st = strtr($st, [
|
||||
" " => '_',
|
||||
"." => '_',
|
||||
"," => '_',
|
||||
|
|
@ -101,7 +101,7 @@ class StringUtil {
|
|||
"Щ"=>"SHCH","Ь"=>"", "Ю"=>"YU", "Я"=>"YA",
|
||||
"Й"=>"i", "й"=>"ie", "ё"=>"Ye",
|
||||
"№"=>"N"
|
||||
));
|
||||
]);
|
||||
return strtolower($st);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue