src/Fixer/Whitespace/NoExtraBlankLinesFixer.php
public function getDefinition()
    {
        return new FixerDefinition(
            'Removes extra blank lines and/or blank lines following configuration.',
            [
                new CodeSample(
                    '<?php

$foo = array("foo");


$bar = "bar";
'
                ),
                new CodeSample(
                    '<?php

switch ($foo) {
    case 41:
        echo "foo";
        break;

    case 42:
        break;
}
',
                    ['tokens' => ['break']]
                ),
                new CodeSample(
                    '<?php

for ($i = 0; $i < 9000; ++$i) {
    if (true) {
        continue;

    }
}
',
                    ['tokens' => ['continue']]
                ),
                new CodeSample(
                    '<?php

for ($i = 0; $i < 9000; ++$i) {

    echo $i;

}
',
                    ['tokens' => ['curly_brace_block']]
                ),
                new CodeSample(
                    '<?php

$foo = array("foo");


$bar = "bar";
',
                    ['tokens' => ['extra']]
                ),
                new CodeSample(
                    '<?php

$foo = array(

    "foo"

);
',
                    ['tokens' => ['parenthesis_brace_block']]
                ),
                new CodeSample(
                    '<?php

function foo($bar)
{
    return $bar;

}
',
                    ['tokens' => ['return']]
                ),
                new CodeSample(
                    '<?php

$foo = [

    "foo"

];
',
                    ['tokens' => ['square_brace_block']]
                ),
                new CodeSample(
                    '<?php

function foo($bar)
{
    throw new \Exception("Hello!");

}
',
                    ['tokens' => ['throw']]
                ),
                new CodeSample(
                    '<?php

namespace Foo;

use Bar\Baz;

use Baz\Bar;

class Bar
{
}
',
                    ['tokens' => ['use']]
                ),
                new CodeSample(
                    '<?php

class Foo
{
    use Bar;

    use Baz;
}
',
                    ['tokens' => ['use_trait']]
                ),
                new CodeSample(
                    '<?php
switch($a) {

    case 1:

    default:

        echo 3;
}
',
                    ['tokens' => ['switch', 'case', 'default']]
                ),
            ]
        );
    }
public function getDefinition()
    {
        return new FixerDefinition(
            'Removes extra blank lines and/or blank lines following configuration.',
            [
                new CodeSample(
                    '<?php

$foo = array("foo");


$bar = "bar";
'
                ),
                new CodeSample(
                    '<?php

switch ($foo) {
    case 41:
        echo "foo";
        break;

    case 42:
        break;
}
',
                    ['tokens' => ['break']]
                ),
                new CodeSample(
                    '<?php

for ($i = 0; $i < 9000; ++$i) {
    if (true) {
        continue;

    }
}
',
                    ['tokens' => ['continue']]
                ),
                new CodeSample(
                    '<?php

for ($i = 0; $i < 9000; ++$i) {

    echo $i;

}
',
                    ['tokens' => ['curly_brace_block']]
                ),
                new CodeSample(
                    '<?php

$foo = array("foo");


$bar = "bar";
',
                    ['tokens' => ['extra']]
                ),
                new CodeSample(
                    '<?php

$foo = array(

    "foo"

);
',
                    ['tokens' => ['parenthesis_brace_block']]
                ),
                new CodeSample(
                    '<?php

function foo($bar)
{
    return $bar;

}
',
                    ['tokens' => ['return']]
                ),
                new CodeSample(
                    '<?php

$foo = [

    "foo"

];
',
                    ['tokens' => ['square_brace_block']]
                ),
                new CodeSample(
                    '<?php

function foo($bar)
{
    throw new \Exception("Hello!");

}
',
                    ['tokens' => ['throw']]
                ),
                new CodeSample(
                    '<?php

namespace Foo;

use Bar\Baz;

use Baz\Bar;

class Bar
{
}
',
                    ['tokens' => ['use']]
                ),
                new CodeSample(
                    '<?php

class Foo
{
    use Bar;

    use Baz;
}
',
                    ['tokens' => ['use_trait']]
                ),
                new CodeSample(
                    '<?php
switch($a) {

    case 1:

    default:

        echo 3;
}
',
                    ['tokens' => ['switch', 'case', 'default']]
                ),
            ]
        );
    }
public function getDefinition ( ) { return new FixerDefinition ( 'Removes extra blank lines and/or blank lines following configuration.' , [ new CodeSample ( '<?php

$foo = array("foo");


$bar = "bar";
' ) , new CodeSample ( '<?php

switch ($foo) {
    case 41:
        echo "foo";
        break;

    case 42:
        break;
}
' , [ 'tokens' => [ 'break' ] ] ) , new CodeSample ( '<?php

for ($i = 0; $i < 9000; ++$i) {
    if (true) {
        continue;

    }
}
' , [ 'tokens' => [ 'continue' ] ] ) , new CodeSample ( '<?php

for ($i = 0; $i < 9000; ++$i) {

    echo $i;

}
' , [ 'tokens' => [ 'curly_brace_block' ] ] ) , new CodeSample ( '<?php

$foo = array("foo");


$bar = "bar";
' , [ 'tokens' => [ 'extra' ] ] ) , new CodeSample ( '<?php

$foo = array(

    "foo"

);
' , [ 'tokens' => [ 'parenthesis_brace_block' ] ] ) , new CodeSample ( '<?php

function foo($bar)
{
    return $bar;

}
' , [ 'tokens' => [ 'return' ] ] ) , new CodeSample ( '<?php

$foo = [

    "foo"

];
' , [ 'tokens' => [ 'square_brace_block' ] ] ) , new CodeSample ( '<?php

function foo($bar)
{
    throw new \Exception("Hello!");

}
' , [ 'tokens' => [ 'throw' ] ] ) , new CodeSample ( '<?php

namespace Foo;

use Bar\Baz;

use Baz\Bar;

class Bar
{
}
' , [ 'tokens' => [ 'use' ] ] ) , new CodeSample ( '<?php

class Foo
{
    use Bar;

    use Baz;
}
' , [ 'tokens' => [ 'use_trait' ] ] ) , new CodeSample ( '<?php
switch($a) {

    case 1:

    default:

        echo 3;
}
' , [ 'tokens' => [ 'switch' , 'case' , 'default' ] ] ) , ] ) ; }
{@inheritdoc}
{