Skip to content

Commit 0899b0b

Browse files
committed
add abbreviation, plus parenthesis around arithmetic in string concat
1 parent 5616f17 commit 0899b0b

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

lib/PHPGGC.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -710,6 +710,7 @@ function _parse_cmdline_arg(&$i, &$argv, &$parameters, &$options)
710710
'phar-jpeg' => 'pj',
711711
'phar-prefix' => 'pp',
712712
'phar-filename' => 'pf',
713+
'public-properties' => 'pub',
713714
'new' => 'N',
714715
'ascii-strings' => 'a',
715716
'armor-strings' => 'A',

lib/PHPGGC/Enhancement/PublicProperties.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public function remove_prefix($matches)
3939
$length = $matches[1];
4040
$reduction = strlen($matches[2]) + 2;
4141
$search = 's:' . $length . ':"' . chr(0) . $matches[2] . chr(0);
42-
$replace = 's:' . $length - $reduction . ':"';
42+
$replace = 's:' . ($length - $reduction) . ':"';
4343
return str_replace($search, $replace, $matches[0]);
4444
}
4545
}

0 commit comments

Comments
 (0)