Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

remove space between ")" and "," when using ArrayNested filter #4

Open
wants to merge 1 commit into from

2 participants

@kcivey

I'm assuming the space before the comma after an array when using the ArrayNested filter is unintentional. This patch gets rid of it.

@akalongman

Replace content in pear/php/Beautifier/Filter/ArrayNested.filter.php as this:

<?php
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: /
/
*

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
View
1  Beautifier/Filter/ArrayNested.filter.php
@@ -98,6 +98,7 @@ public function t_parenthesis_close($sTag)
*/
public function t_comma($sTag)
{
+ $this->oBeaut->removeWhitespace();
if ($this->oBeaut->getControlParenthesis() != T_ARRAY) {
$this->oBeaut->add($sTag . ' ');
} else {
View
6 tests/Beautifier/Filter/arraynested_sample_file.phps
@@ -6,13 +6,13 @@ array(
1,
2,
3
- ) ,
- 'function_result' => sprintf("Function result", "Function result") ,
+ ),
+ 'function_result' => sprintf("Function result", "Function result"),
'example_array' => array(
1,
2,
3
- ) ,
+ ),
'example' => null,
);
?>
Something went wrong with that request. Please try again.