diff --git a/scripts/test/prompt.php b/scripts/test/prompt.php --- a/scripts/test/prompt.php +++ b/scripts/test/prompt.php @@ -23,7 +23,7 @@ 'name' => 'prompt', 'param' => 'text', 'default' => 'Enter some text:', - 'help' => 'Change the prompt text to __text__.' + 'help' => 'Change the prompt text to __text__.', ), )); diff --git a/src/cache/__tests__/PhutilKeyValueCacheTestCase.php b/src/cache/__tests__/PhutilKeyValueCacheTestCase.php --- a/src/cache/__tests__/PhutilKeyValueCacheTestCase.php +++ b/src/cache/__tests__/PhutilKeyValueCacheTestCase.php @@ -95,7 +95,8 @@ $keys = array( 'key1' => mt_rand(), 'key2' => '', - 'key3' => 'Phabricator'); + 'key3' => 'Phabricator', + ); $cache->setKeys($keys); $cached_keys = $in_request_cache->getAllKeys(); diff --git a/src/daemon/PhutilDaemonOverseer.php b/src/daemon/PhutilDaemonOverseer.php --- a/src/daemon/PhutilDaemonOverseer.php +++ b/src/daemon/PhutilDaemonOverseer.php @@ -164,7 +164,8 @@ self::EVENT_DID_LAUNCH, array( 'argv' => array_slice($original_argv, 1), - 'explicitArgv' => $this->moreArgs)); + 'explicitArgv' => $this->moreArgs, + )); declare(ticks = 1); pcntl_signal(SIGUSR1, array($this, 'didReceiveKeepaliveSignal')); diff --git a/src/future/exec/ExecFuture.php b/src/future/exec/ExecFuture.php --- a/src/future/exec/ExecFuture.php +++ b/src/future/exec/ExecFuture.php @@ -459,7 +459,8 @@ $this->result = array( 128 + $signal, $this->stdout, - $this->stderr); + $this->stderr, + ); $this->closeProcess(); } diff --git a/src/future/http/HTTPFuture.php b/src/future/http/HTTPFuture.php --- a/src/future/http/HTTPFuture.php +++ b/src/future/http/HTTPFuture.php @@ -228,7 +228,8 @@ return array( $status = new HTTPFutureTransportResponseStatus($error, $this->getURI()), $body = null, - $headers = array()); + $headers = array(), + ); } private function buildHTTPRequest() { @@ -253,7 +254,8 @@ $data = http_build_query($data, '', '&')."\r\n"; $add_headers[] = array( 'Content-Type', - 'application/x-www-form-urlencoded'); + 'application/x-www-form-urlencoded', + ); } } @@ -261,18 +263,21 @@ $add_headers[] = array( 'Content-Length', - $length); + $length, + ); if (!$this->getHeaders('User-Agent')) { $add_headers[] = array( 'User-Agent', - $this->getDefaultUserAgent()); + $this->getDefaultUserAgent(), + ); } if (!$this->getHeaders('Host')) { $add_headers[] = array( 'Host', - $this->host); + $this->host, + ); } $headers = array_merge($this->getHeaders(), $add_headers); diff --git a/src/grammar/code/PhutilCLikeCodeSnippetContextFreeGrammar.php b/src/grammar/code/PhutilCLikeCodeSnippetContextFreeGrammar.php --- a/src/grammar/code/PhutilCLikeCodeSnippetContextFreeGrammar.php +++ b/src/grammar/code/PhutilCLikeCodeSnippetContextFreeGrammar.php @@ -65,7 +65,7 @@ return $this->buildGrammarSet('funcdecl', array( 'function [funcname]([funcparam]) '. - '{[funcbody, indent, block, trim=right]}' + '{[funcbody, indent, block, trim=right]}', )); } @@ -92,7 +92,7 @@ return $this->buildGrammarSet('funcreturn', array( 'return [expr][term]', - '' + '', )); } diff --git a/src/grammar/code/PhutilJavaCodeSnippetContextFreeGrammar.php b/src/grammar/code/PhutilJavaCodeSnippetContextFreeGrammar.php --- a/src/grammar/code/PhutilJavaCodeSnippetContextFreeGrammar.php +++ b/src/grammar/code/PhutilJavaCodeSnippetContextFreeGrammar.php @@ -22,7 +22,7 @@ protected function getStartGrammarSet() { return $this->buildGrammarSet('start', array( - '[import, block][nmspdecl, block][classdecl, block]' + '[import, block][nmspdecl, block][classdecl, block]', )); } diff --git a/src/internationalization/__tests__/PhutilTranslatorTestCase.php b/src/internationalization/__tests__/PhutilTranslatorTestCase.php --- a/src/internationalization/__tests__/PhutilTranslatorTestCase.php +++ b/src/internationalization/__tests__/PhutilTranslatorTestCase.php @@ -105,7 +105,7 @@ array( 'June' => 'correct', '21' => 'wrong', - 'F' => 'wrong' + 'F' => 'wrong', )); $this->assertEqual('correct', $translator->translateDate('F', $date)); $this->assertEqual('correct 21', $translator->translateDate('F d', $date)); @@ -138,7 +138,7 @@ $translator->addTranslations( array( ',' => ' ', - '.' => ',' + '.' => ',', )); $this->assertEqual('1 234', $translator->formatNumber(1234)); $this->assertEqual('1 234,5', $translator->formatNumber(1234.5, 1)); diff --git a/src/lexer/PhutilPHPFragmentLexer.php b/src/lexer/PhutilPHPFragmentLexer.php --- a/src/lexer/PhutilPHPFragmentLexer.php +++ b/src/lexer/PhutilPHPFragmentLexer.php @@ -115,7 +115,8 @@ array('\\?>', 'cp', '!pop'), array( '<<<([\'"]?)('.$identifier_pattern.')\\1\\n.*?\\n\\2\\;?\\n', - 's'), + 's', + ), ), $nonsemantic_rules, array( array('(?i:__halt_compiler)\\b', 'cp', 'halt_compiler'), array('(->|::)', 'o', 'attr'), diff --git a/src/lexer/PhutilPythonFragmentLexer.php b/src/lexer/PhutilPythonFragmentLexer.php --- a/src/lexer/PhutilPythonFragmentLexer.php +++ b/src/lexer/PhutilPythonFragmentLexer.php @@ -189,7 +189,7 @@ array( '\\\\([\\\\abfnrtv"\']|\n|N{.*?}|u[a-fA-F0-9]{4}|'. 'U[a-fA-F0-9]{8}|x[a-fA-F0-9]{2}|[0-7]{1,3})', - 'se' + 'se', ), ); diff --git a/src/lexer/PhutilTypeLexer.php b/src/lexer/PhutilTypeLexer.php --- a/src/lexer/PhutilTypeLexer.php +++ b/src/lexer/PhutilTypeLexer.php @@ -20,7 +20,7 @@ array('list', 'list'), array('int|float|bool|string|null|callable|wild|regex', 'k'), array('[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*', 'k'), - array('\\(', '(', 'comment') + array('\\(', '(', 'comment'), ), 'comment' => array( array('\\)', ')', '!pop'), diff --git a/src/markup/engine/remarkup/blockrule/PhutilRemarkupNoteBlockRule.php b/src/markup/engine/remarkup/blockrule/PhutilRemarkupNoteBlockRule.php --- a/src/markup/engine/remarkup/blockrule/PhutilRemarkupNoteBlockRule.php +++ b/src/markup/engine/remarkup/blockrule/PhutilRemarkupNoteBlockRule.php @@ -57,7 +57,8 @@ ), $word_part), ' ', - $text_part); + $text_part, + ); } else { $content = $text_part; } @@ -65,7 +66,7 @@ return phutil_tag( 'div', array( - 'class' => 'remarkup-'.$class_suffix + 'class' => 'remarkup-'.$class_suffix, ), $content); } diff --git a/src/parser/PhutilParserGenerator.php b/src/parser/PhutilParserGenerator.php --- a/src/parser/PhutilParserGenerator.php +++ b/src/parser/PhutilParserGenerator.php @@ -642,7 +642,8 @@ $item[0], $item[1], $item[2] + 1, - $item[3]); + $item[3], + ); } foreach ($nexts as $next => $items) { @@ -744,13 +745,15 @@ array( $item[0], $item[1], - count($this->rules[$item[0]][$item[1]]) - 1)); + count($this->rules[$item[0]][$item[1]]) - 1), + ); } foreach ($shift as $next => $item) { $action[$state][$next] = array( 'S', - $this->successor[$state][$next]); + $this->successor[$state][$next], + ); } if ($accept) { diff --git a/src/parser/__tests__/PhutilTypeSpecTestCase.php b/src/parser/__tests__/PhutilTypeSpecTestCase.php --- a/src/parser/__tests__/PhutilTypeSpecTestCase.php +++ b/src/parser/__tests__/PhutilTypeSpecTestCase.php @@ -132,9 +132,10 @@ 'map>' => array(1 => array('x', 'y')), 'stdClass' => new stdClass(), 'list' => array( - new Exception(), - new LogicException(), - new RuntimeException()), + new Exception(), + new LogicException(), + new RuntimeException(), + ), 'map' => array('x' => new stdClass()), ); diff --git a/src/parser/argument/__tests__/PhutilArgumentParserTestCase.php b/src/parser/argument/__tests__/PhutilArgumentParserTestCase.php --- a/src/parser/argument/__tests__/PhutilArgumentParserTestCase.php +++ b/src/parser/argument/__tests__/PhutilArgumentParserTestCase.php @@ -6,7 +6,8 @@ $specs = array( array( 'name' => 'flag', - )); + ), + ); $args = new PhutilArgumentParser(array('bin')); $args->parseFull($specs); @@ -92,7 +93,8 @@ ), array( 'name' => 'x', - ))); + ), + )); } catch (PhutilArgumentSpecificationException $ex) { $caught = $ex; } @@ -108,12 +110,14 @@ array( array( 'name' => 'x', - ))); + ), + )); $args->parsePartial( array( array( 'name' => 'x', - ))); + ), + )); } catch (PhutilArgumentSpecificationException $ex) { $caught = $ex; } @@ -134,7 +138,8 @@ array( 'name' => 'y', 'short' => 'x', - ))); + ), + )); } catch (PhutilArgumentSpecificationException $ex) { $caught = $ex; } @@ -155,7 +160,8 @@ array( 'name' => 'y', 'wildcard' => true, - ))); + ), + )); } catch (PhutilArgumentSpecificationException $ex) { $caught = $ex; } diff --git a/src/parser/argument/workflow/PhutilHelpArgumentWorkflow.php b/src/parser/argument/workflow/PhutilHelpArgumentWorkflow.php --- a/src/parser/argument/workflow/PhutilHelpArgumentWorkflow.php +++ b/src/parser/argument/workflow/PhutilHelpArgumentWorkflow.php @@ -17,7 +17,8 @@ array( 'name' => 'help-with-what', 'wildcard' => true, - ))); + ), + )); } public function isExecutable() { diff --git a/src/utils/AbstractDirectedGraph.php b/src/utils/AbstractDirectedGraph.php --- a/src/utils/AbstractDirectedGraph.php +++ b/src/utils/AbstractDirectedGraph.php @@ -184,7 +184,8 @@ $results[] = array( 'node' => $node, 'depth' => $depth, - 'cycle' => false); + 'cycle' => false, + ); $completed[$node] = true; } @@ -197,7 +198,8 @@ $results[] = array( 'node' => $node, 'depth' => $depth, - 'cycle' => true); + 'cycle' => true, + ); } } diff --git a/src/utils/__tests__/AbstractDirectedGraphTestCase.php b/src/utils/__tests__/AbstractDirectedGraphTestCase.php --- a/src/utils/__tests__/AbstractDirectedGraphTestCase.php +++ b/src/utils/__tests__/AbstractDirectedGraphTestCase.php @@ -83,7 +83,7 @@ 'B' => array('D', 'E'), 'C' => array(), 'D' => array(), - 'E' => array() + 'E' => array(), ); $sorted = $this->getTopographicSort($graph); @@ -98,7 +98,7 @@ 'B' => array('C'), 'C' => array('D', 'E'), 'D' => array('E'), - 'E' => array() + 'E' => array(), ); $sorted = $this->getTopographicSort($graph); diff --git a/src/utils/__tests__/PhutilUTF8TestCase.php b/src/utils/__tests__/PhutilUTF8TestCase.php --- a/src/utils/__tests__/PhutilUTF8TestCase.php +++ b/src/utils/__tests__/PhutilUTF8TestCase.php @@ -149,8 +149,10 @@ // This behavior is maybe a little bad, but it seems mostly reasonable, // at least for latin languages. - array('Derp, supercalafragalisticexpialadoshus', 30, '...', - 'Derp...'), + array( + 'Derp, supercalafragalisticexpialadoshus', 30, '...', + 'Derp...', + ), // If a string has only word-break characters in it, we should just cut // it, not produce only the terminal. @@ -230,7 +232,8 @@ 'aaa', 'aaa', 'a', - )), + ), + ), array( 'aaaaaaa', 3, @@ -238,7 +241,8 @@ 'aaa', 'aaa', 'a', - )), + ), + ), array( 'aa&aaaa', 3, @@ -246,7 +250,8 @@ 'aa&', 'aaa', 'a', - )), + ), + ), array( "aa\xe6\x9d\xb1aaaa", 3, @@ -254,18 +259,21 @@ "aa\xe6\x9d\xb1", 'aaa', 'a', - )), + ), + ), array( '', 80, array( - )), + ), + ), array( 'a', 80, array( 'a', - )), + ), + ), ); foreach ($inputs as $input) { @@ -286,7 +294,8 @@ 'aaa', 'aaa', 'a', - )), + ), + ), array( 'abracadabra!', 4, @@ -294,18 +303,21 @@ 'abra', 'cada', 'bra!', - )), + ), + ), array( '', 10, array( - )), + ), + ), array( 'a', 20, array( 'a', - )), + ), + ), array( "aa\xe6\x9d\xb1aaaa", 3, @@ -313,7 +325,8 @@ "aa\xe6\x9d\xb1", 'aaa', 'a', - )), + ), + ), array( "mmm\nmmm\nmmmm", 3, @@ -322,7 +335,8 @@ 'mmm', 'mmm', 'm', - )), + ), + ), ); foreach ($inputs as $input) { diff --git a/src/xsprintf/PhutilCommandString.php b/src/xsprintf/PhutilCommandString.php --- a/src/xsprintf/PhutilCommandString.php +++ b/src/xsprintf/PhutilCommandString.php @@ -40,7 +40,7 @@ 'xsprintf_command', array( 'unmasked' => $unmasked, - 'mode' => $this->escapingMode + 'mode' => $this->escapingMode, ), $this->argv); }