Skip to content

Commit fa29a2e

Browse files
committed
More CS fixes
1 parent 0f396ab commit fa29a2e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+117
-154
lines changed

.editorconfig

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
; This file is part of the Pattern Library Builder project.
1+
; This file is part of the Pattern Library Builder library.
22
;
33
; Copyright (c) 2017-present LIN3S <[email protected]>
44
;

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This file is part of the Pattern Library Builder project.
1+
# This file is part of the Pattern Library Builder library.
22
#
33
# Copyright (c) 2017-present LIN3S <[email protected]>
44
#

.php_cs

+9-38
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,23 @@
11
<?php
22

33
/*
4-
* This file is part of the Pattern Library Builder project.
4+
* This file is part of the Pattern Library Builder library.
55
*
66
* Copyright (c) 2017-present LIN3S <[email protected]>
77
*
88
* For the full copyright and license information, please view the LICENSE
99
* file that was distributed with this source code.
1010
*/
1111

12-
use PhpCsFixer\Config;
13-
use PhpCsFixer\Finder;
14-
use PhpCsFixer\Fixer\Comment\HeaderCommentFixer;
12+
declare(strict_types=1);
1513

16-
$header = <<<'EOF'
17-
This file is part of the Pattern Library Builder project.
14+
use LIN3S\PhpCsFixerConfig\Lin3sConfig;
1815

19-
Copyright (c) 2017-present LIN3S <[email protected]>
16+
$config = new Lin3sConfig('Pattern Library Builder', '2017', 'library');
17+
$config->getFinder()->in(__DIR__ . '/src');
2018

21-
For the full copyright and license information, please view the LICENSE
22-
file that was distributed with this source code.
23-
EOF;
19+
$cacheDir = getenv('TRAVIS') ? getenv('HOME') . '/.php-cs-fixer' : __DIR__;
2420

25-
return Config::create()
26-
->setRiskyAllowed(true)
27-
->setFinder(
28-
Finder::create()
29-
->in([
30-
__DIR__ . '/src',
31-
__DIR__ . '/tests/Application/app',
32-
__DIR__ . '/tests/Application/bin',
33-
__DIR__ . '/tests/Application/web',
34-
])
35-
)
36-
->setRules([
37-
'@Symfony' => true,
38-
'@Symfony:risky' => true,
39-
'binary_operator_spaces' => [
40-
'align_double_arrow' => true,
41-
],
42-
'concat_space' => ['spacing' => 'one'],
43-
'header_comment' => [
44-
'header' => $header,
45-
'commentType' => HeaderCommentFixer::HEADER_COMMENT,
46-
],
47-
'no_unreachable_default_argument_value' => false,
48-
'ordered_imports' => true,
49-
'phpdoc_order' => true,
50-
'phpdoc_annotation_without_dot' => false,
51-
'strict_param' => true,
52-
]);
21+
$config->setCacheFile($cacheDir . '/.php_cs.cache');
22+
23+
return $config;

.phpspec_cs

+11-34
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,25 @@
11
<?php
22

33
/*
4-
* This file is part of the Pattern Library Builder project.
4+
* This file is part of the Pattern Library Builder library.
55
*
66
* Copyright (c) 2017-present LIN3S <[email protected]>
77
*
88
* For the full copyright and license information, please view the LICENSE
99
* file that was distributed with this source code.
1010
*/
1111

12-
use PhpCsFixer\Config;
13-
use PhpCsFixer\Finder;
14-
use PhpCsFixer\Fixer\Comment\HeaderCommentFixer;
12+
declare(strict_types=1);
1513

16-
$header = <<<'EOF'
17-
This file is part of the Pattern Library Builder project.
14+
use LIN3S\PhpCsFixerConfig\Lin3sConfig;
1815

19-
Copyright (c) 2017-present LIN3S <[email protected]>
16+
$config = new Lin3sConfig('Pattern Library Builder', '2017', 'library');
17+
$config->getFinder()
18+
->in(__DIR__ . '/spec')
19+
->name('*Spec.php');
2020

21-
For the full copyright and license information, please view the LICENSE
22-
file that was distributed with this source code.
23-
EOF;
21+
$cacheDir = getenv('TRAVIS') ? getenv('HOME') . '/.php-cs-fixer' : __DIR__;
2422

25-
return Config::create()
26-
->setRiskyAllowed(true)
27-
->setFinder(
28-
Finder::create()
29-
->in(__DIR__ . '/spec')
30-
)
31-
->setRules([
32-
'@Symfony' => true,
33-
'@Symfony:risky' => true,
34-
'binary_operator_spaces' => [
35-
'align_double_arrow' => true,
36-
],
37-
'concat_space' => ['spacing' => 'one'],
38-
'header_comment' => [
39-
'header' => $header,
40-
'commentType' => HeaderCommentFixer::HEADER_COMMENT,
41-
],
42-
'no_unreachable_default_argument_value' => false,
43-
'ordered_imports' => true,
44-
'phpdoc_order' => true,
45-
'phpdoc_annotation_without_dot' => false,
46-
'strict_param' => true,
47-
'visibility_required' => false,
48-
]);
23+
$config->setCacheFile($cacheDir . '/.php_cs.cache');
24+
25+
return $config;

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This file is part of the Pattern Library Builder project.
1+
# This file is part of the Pattern Library Builder library.
22
#
33
# Copyright (c) 2017-present LIN3S <[email protected]>
44
#

composer.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,19 @@
1919
],
2020
"require": {
2121
"php": "^7.1",
22-
"gajus/dindent": "^2.3",
22+
"gajus/dindent": "dev-master",
2323
"symfony/framework-bundle": "^3.0",
2424
"symfony/templating": "^3.0"
2525
},
2626
"require-dev": {
27-
"friendsofphp/php-cs-fixer": "^2.3",
27+
"lin3s/php-cs-fixer-config": "^1.0",
2828
"phpspec/phpspec": "^3.3",
2929
"symfony/asset": "^3.3",
3030
"symfony/console": "^3.3",
3131
"symfony/twig-bundle": "^3.3",
3232
"symfony/var-dumper": "^3.3",
33-
"symfony/yaml": "^3.3",
34-
"symfony/web-server-bundle": "^3.3"
33+
"symfony/web-server-bundle": "^3.3",
34+
"symfony/yaml": "^3.3"
3535
},
3636
"scripts": {
3737
"cs": [

src/LIN3S/PatternLibraryBuilder/Controller/IndexController.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33
/*
4-
* This file is part of the Pattern Library Builder project.
4+
* This file is part of the Pattern Library Builder library.
55
*
66
* Copyright (c) 2017-present LIN3S <[email protected]>
77
*

src/LIN3S/PatternLibraryBuilder/Loader/StyleguideConfigLoader.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33
/*
4-
* This file is part of the Pattern Library Builder project.
4+
* This file is part of the Pattern Library Builder library.
55
*
66
* Copyright (c) 2017-present LIN3S <[email protected]>
77
*

src/LIN3S/PatternLibraryBuilder/Resources/assets/build/patternlibrary.js

+30-30
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/LIN3S/PatternLibraryBuilder/Resources/assets/build/patternlibrary.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/LIN3S/PatternLibraryBuilder/Resources/assets/js/components/Accordion/Accordion.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* This file is part of the Pattern Library Builder project.
2+
* This file is part of the Pattern Library Builder library.
33
*
44
* Copyright (c) 2017-present LIN3S <[email protected]>
55
*

src/LIN3S/PatternLibraryBuilder/Resources/assets/js/components/Accordion/AccordionItem.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* This file is part of the Pattern Library Builder project.
2+
* This file is part of the Pattern Library Builder library.
33
*
44
* Copyright (c) 2017-present LIN3S <[email protected]>
55
*

src/LIN3S/PatternLibraryBuilder/Resources/assets/js/components/Accordion/init.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* This file is part of the Pattern Library Builder project.
2+
* This file is part of the Pattern Library Builder library.
33
*
44
* Copyright (c) 2017-present LIN3S <[email protected]>
55
*

src/LIN3S/PatternLibraryBuilder/Resources/assets/js/components/Tabbed/Tabbed.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* This file is part of the Pattern Library Builder project.
2+
* This file is part of the Pattern Library Builder library.
33
*
44
* Copyright (c) 2017-present LIN3S <[email protected]>
55
*

src/LIN3S/PatternLibraryBuilder/Resources/assets/js/components/Tabbed/init.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* This file is part of the Pattern Library Builder project.
2+
* This file is part of the Pattern Library Builder library.
33
*
44
* Copyright (c) 2017-present LIN3S <[email protected]>
55
*

src/LIN3S/PatternLibraryBuilder/Resources/assets/js/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* This file is part of the Pattern Library Builder project.
2+
* This file is part of the Pattern Library Builder library.
33
*
44
* Copyright (c) 2017-present LIN3S <[email protected]>
55
*

src/LIN3S/PatternLibraryBuilder/Resources/assets/js/layouts/Finder/Finder.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* This file is part of the Pattern Library Builder project.
2+
* This file is part of the Pattern Library Builder library.
33
*
44
* Copyright (c) 2017-present LIN3S <[email protected]>
55
*

src/LIN3S/PatternLibraryBuilder/Resources/assets/js/layouts/Finder/init.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* This file is part of the Pattern Library Builder project.
2+
* This file is part of the Pattern Library Builder library.
33
*
44
* Copyright (c) 2017-present LIN3S <[email protected]>
55
*

src/LIN3S/PatternLibraryBuilder/Resources/assets/scss/_helpers/_mixins.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// This file is part of the Pattern Library Builder project.
1+
// This file is part of the Pattern Library Builder library.
22
//
33
// Copyright (c) 2017-present LIN3S <[email protected]>
44
//

src/LIN3S/PatternLibraryBuilder/Resources/assets/scss/_variables/_colors.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// This file is part of the Pattern Library Builder project.
1+
// This file is part of the Pattern Library Builder library.
22
//
33
// Copyright (c) 2017-present LIN3S <[email protected]>
44
//

src/LIN3S/PatternLibraryBuilder/Resources/assets/scss/_variables/_grid.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// This file is part of the Pattern Library Builder project.
1+
// This file is part of the Pattern Library Builder library.
22
//
33
// Copyright (c) 2017-present LIN3S <[email protected]>
44
//

src/LIN3S/PatternLibraryBuilder/Resources/assets/scss/_variables/_transitions.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// This file is part of the Pattern Library Builder project.
1+
// This file is part of the Pattern Library Builder library.
22
//
33
// Copyright (c) 2017-present LIN3S <[email protected]>
44
//

src/LIN3S/PatternLibraryBuilder/Resources/assets/scss/_variables/_typography.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// This file is part of the Pattern Library Builder project.
1+
// This file is part of the Pattern Library Builder library.
22
//
33
// Copyright (c) 2017-present LIN3S <[email protected]>
44
//

0 commit comments

Comments
 (0)