minor #24215 CS: recover no_break_comment (keradus)

This PR was merged into the 2.7 branch.

Discussion
----------

CS: recover no_break_comment

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | n/a, see CIs
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | n/a

rule was excluded in #24123, yet without any information about it
it was not excluded in original form of given PR, it's not part of any commitlog nor any comment, title claims to touch only other rules.

this rule shall not be excluded, it's part of PSR and is applied for most places.
I added missing ones.

Commits
-------

4e9d1600ee CS: recover no_break_comment
This commit is contained in:
Fabien Potencier 2017-09-15 09:58:02 -07:00
commit b973ecf8ee
7 changed files with 13 additions and 3 deletions

View File

@ -9,7 +9,6 @@ return PhpCsFixer\Config::create()
'@Symfony' => true,
'@Symfony:risky' => true,
'array_syntax' => array('syntax' => 'long'),
'no_break_comment' => false,
'protected_to_private' => false,
))
->setRiskyAllowed(true)

View File

@ -62,8 +62,11 @@ class ServerParams
switch (substr($iniMax, -1)) {
case 't': $max *= 1024;
// no break
case 'g': $max *= 1024;
// no break
case 'm': $max *= 1024;
// no break
case 'k': $max *= 1024;
}

View File

@ -259,8 +259,11 @@ class UploadedFile extends File
switch (substr($iniMax, -1)) {
case 't': $max *= 1024;
// no break
case 'g': $max *= 1024;
// no break
case 'm': $max *= 1024;
// no break
case 'k': $max *= 1024;
}

View File

@ -99,8 +99,11 @@ class MemoryDataCollector extends DataCollector implements LateDataCollectorInte
switch (substr($memoryLimit, -1)) {
case 't': $max *= 1024;
// no break
case 'g': $max *= 1024;
// no break
case 'm': $max *= 1024;
// no break
case 'k': $max *= 1024;
}

View File

@ -179,7 +179,7 @@ class Data
$item = clone $item;
$item->type = $item->class;
$item->class = $item->value;
// No break;
// no break
case Stub::TYPE_OBJECT:
case Stub::TYPE_RESOURCE:
$withChildren = $children && $cursor->depth !== $this->maxDepth && $this->maxItemsPerDepth;

View File

@ -317,6 +317,7 @@ class CliDumper extends AbstractDumper
default:
case Cursor::HASH_INDEXED:
$style = 'index';
// no break
case Cursor::HASH_ASSOC:
if (is_int($key)) {
$this->line .= $this->style($style, $key).' => ';
@ -327,7 +328,7 @@ class CliDumper extends AbstractDumper
case Cursor::HASH_RESOURCE:
$key = "\0~\0".$key;
// No break;
// no break
case Cursor::HASH_OBJECT:
if (!isset($key[0]) || "\0" !== $key[0]) {
$this->line .= '+'.$bin.$this->style('public', $key).': ';

View File

@ -537,6 +537,7 @@ class Inline
return $time;
}
// no break
default:
return (string) $scalar;
}