Skip to content

Commit

Permalink
Merge branch '1.9' into 1.10
Browse files Browse the repository at this point in the history
  • Loading branch information
keradus committed Jun 17, 2015
2 parents 0b0ec89 + e3ccfee commit fbca259
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
12 changes: 12 additions & 0 deletions Symfony/CS/Fixer/Symfony/PhpdocScalarFixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,18 @@ public function getDescription()
return 'Scalar types should always be written in the same form. "int", not "integer"; "bool", not "boolean"; "float", not "real" or "double".';
}

public function getPriority()
{
/*
* Should be run before all other docblock fixers apart from the
* phpdoc_to_comment and phpdoc_indent fixer to make sure all fixers apply
* correct indentation to new code they add. This should run before
* alignment of params is done since this fixer might change the
* type and thereby un-aligning the params.
*/
return 15;
}

/**
* {@inheritdoc}
*/
Expand Down
8 changes: 6 additions & 2 deletions Symfony/CS/Tests/FixerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -208,15 +208,19 @@ function ($name) {
}
);

// prepare bulk tests for phpdoc fixers to test if:
// prepare bulk tests for phpdoc fixers to test that:
// * `phpdoc_to_comment` is first
// * `phpdoc_indent` is second
// * `phpdoc_scalar` is third
// * `phpdoc_params` is last
$cases[] = array($fixers['phpdoc_to_comment'], $fixers['phpdoc_indent']);
$cases[] = array($fixers['phpdoc_indent'], $fixers['phpdoc_scalar']);

foreach ($docFixerNames as $docFixerName) {
if (!in_array($docFixerName, array('phpdoc_to_comment', 'phpdoc_indent'), true)) {
if (!in_array($docFixerName, array('phpdoc_to_comment', 'phpdoc_indent', 'phpdoc_scalar'), true)) {
$cases[] = array($fixers['phpdoc_to_comment'], $fixers[$docFixerName]);
$cases[] = array($fixers['phpdoc_indent'], $fixers[$docFixerName]);
$cases[] = array($fixers['phpdoc_scalar'], $fixers[$docFixerName]);
}

if ('phpdoc_params' !== $docFixerName) {
Expand Down

0 comments on commit fbca259

Please sign in to comment.