Fix CS
This commit is contained in:
parent
456fbdc101
commit
b4da68cf7b
5 changed files with 14 additions and 11 deletions
1
.php_cs
1
.php_cs
|
@ -7,5 +7,6 @@ $finder = Symfony\CS\Finder\DefaultFinder::create()
|
||||||
;
|
;
|
||||||
|
|
||||||
return Symfony\CS\Config\Config::create()
|
return Symfony\CS\Config\Config::create()
|
||||||
|
->level(Symfony\CS\FixerInterface::SYMFONY_LEVEL)
|
||||||
->finder($finder)
|
->finder($finder)
|
||||||
;
|
;
|
||||||
|
|
2
Makefile
2
Makefile
|
@ -17,7 +17,7 @@ unit: vendor
|
||||||
cs:
|
cs:
|
||||||
$(PHP) bin/php-cs-fixer fix --dry-run
|
$(PHP) bin/php-cs-fixer fix --dry-run
|
||||||
|
|
||||||
fix-cs
|
fix-cs:
|
||||||
$(PHP) bin/php-cs-fixer fix
|
$(PHP) bin/php-cs-fixer fix
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
# `docker-compose-viz`
|
# `docker-compose-viz`
|
||||||
|
|
||||||
[![Build Status](https://travis-ci.org/pmsipilot/docker-compose-viz.svg?branch=master)](https://travis-ci.org/pmsipilot/docker-compose-viz)
|
[![Build Status](https://travis-ci.org/pmsipilot/docker-compose-viz.svg?branch=master)](https://travis-ci.org/pmsipilot/docker-compose-viz) [![StyleCI](https://styleci.io/repos/65026022/shield)](https://styleci.io/repos/65026022)
|
||||||
|
|
||||||
|
|
||||||
## How to use
|
## How to use
|
||||||
|
|
||||||
|
|
7
bin/dcv
7
bin/dcv
|
@ -1,6 +1,7 @@
|
||||||
#!/usr/bin/env php
|
#!/usr/bin/env php
|
||||||
<?php
|
<?php
|
||||||
function resolve(array $components) : string {
|
function resolve(array $components) : string
|
||||||
|
{
|
||||||
return implode(DIRECTORY_SEPARATOR, $components);
|
return implode(DIRECTORY_SEPARATOR, $components);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -9,7 +10,7 @@ require_once resolve(
|
||||||
__DIR__,
|
__DIR__,
|
||||||
'..',
|
'..',
|
||||||
'vendor',
|
'vendor',
|
||||||
'autoload.php'
|
'autoload.php',
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -18,7 +19,7 @@ require_once resolve(
|
||||||
__DIR__,
|
__DIR__,
|
||||||
'..',
|
'..',
|
||||||
'src',
|
'src',
|
||||||
'application.php'
|
'application.php',
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -2,19 +2,19 @@
|
||||||
|
|
||||||
use function PMSIpilot\DockerComposeViz\fetchNetworks;
|
use function PMSIpilot\DockerComposeViz\fetchNetworks;
|
||||||
|
|
||||||
require_once __DIR__ . '/../vendor/autoload.php';
|
require_once __DIR__.'/../vendor/autoload.php';
|
||||||
|
|
||||||
describe('Fetching networks', function() {
|
describe('Fetching networks', function () {
|
||||||
describe('from a version 1 configuration', function() {
|
describe('from a version 1 configuration', function () {
|
||||||
it('should always return an empty array', function() {
|
it('should always return an empty array', function () {
|
||||||
$configuration = ['networks' => ['image' => 'bar']];
|
$configuration = ['networks' => ['image' => 'bar']];
|
||||||
|
|
||||||
expect(fetchNetworks($configuration))->toBe([]);
|
expect(fetchNetworks($configuration))->toBe([]);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('from a version 2 configuration', function() {
|
describe('from a version 2 configuration', function () {
|
||||||
it('should fetch networks from the dedicated section', function() {
|
it('should fetch networks from the dedicated section', function () {
|
||||||
$configuration = ['version' => 2, 'networks' => ['foo' => [], 'bar' => []]];
|
$configuration = ['version' => 2, 'networks' => ['foo' => [], 'bar' => []]];
|
||||||
|
|
||||||
expect(fetchNetworks($configuration))->toBe($configuration['networks']);
|
expect(fetchNetworks($configuration))->toBe($configuration['networks']);
|
||||||
|
|
Loading…
Reference in a new issue