Skip to content

Commit fc51ad0

Browse files
committed
Add php-cs-fixer config, update to array bracket syntax and run linter
1 parent a36c553 commit fc51ad0

File tree

5 files changed

+23
-6
lines changed

5 files changed

+23
-6
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ vendor/
55
# Commit your application's lock file http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file
66
# You may choose to ignore a library lock file http://getcomposer.org/doc/02-libraries.md#lock-file
77
composer.lock
8+
.php_cs.cache

.php_cs.dist

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?php
2+
3+
$finder = PhpCsFixer\Finder::create()
4+
->in(__DIR__)
5+
;
6+
7+
$config = PhpCsFixer\Config::create()
8+
->setRules([
9+
'@PSR2' => true,
10+
'@Symfony' => true,
11+
'array_syntax' => ['syntax' => 'short'],
12+
'concat_space' => ['spacing' => 'one'],
13+
])
14+
->setFinder($finder)
15+
;
16+
17+
return $config;

Command/CommandHelper.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
final class CommandHelper
2424
{
2525
/**
26-
* configureMigrations
26+
* configureMigrations.
2727
*
2828
* @param ContainerInterface $container
2929
* @param Configuration $configuration
@@ -63,12 +63,12 @@ public static function setApplicationDocumentManager(Application $application, $
6363
}
6464

6565
/**
66-
* injectContainerToMigrations
66+
* injectContainerToMigrations.
6767
*
6868
* Injects the container to migrations aware of it.
6969
*
7070
* @param ContainerInterface $container
71-
* @param array $versions
71+
* @param array $versions
7272
*/
7373
private static function injectContainerToMigrations(ContainerInterface $container, array $versions)
7474
{

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@ Finally, be sure to enable the bundle in AppKernel.php by including the followin
4141
// app/AppKernel.php
4242
public function registerBundles()
4343
{
44-
$bundles = array(
44+
$bundles = [
4545
//...
4646
new AntiMattr\Bundle\MongoDBMigrationsBundle\MongoDBMigrationsBundle(),
47-
);
47+
];
4848
}
4949
```
5050

Tests/bootstrap.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
$class = 'PHPUnit\Framework\TestCase';
66

77
if (!class_exists($class)) {
8-
98
abstract class TestCase extends \PHPUnit_Framework_TestCase
109
{
1110
}

0 commit comments

Comments
 (0)