Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Platform
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Platform
Commits
1f7bd85a
Commit
1f7bd85a
authored
Sep 17, 2016
by
Nicolas Widart
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding a global php-cs-fixer config file
parent
de50abc5
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
55 additions
and
1 deletion
+55
-1
.gitattributes
.gitattributes
+1
-0
.gitignore
.gitignore
+1
-1
.php_cs
.php_cs
+53
-0
No files found.
.gitattributes
View file @
1f7bd85a
...
@@ -3,3 +3,4 @@
...
@@ -3,3 +3,4 @@
*.scss linguist-vendored
*.scss linguist-vendored
.github export-ignore
.github export-ignore
.travis.yml export-ignore
.travis.yml export-ignore
.php_cs export-ignore
.gitignore
View file @
1f7bd85a
...
@@ -5,4 +5,4 @@ Homestead.yaml
...
@@ -5,4 +5,4 @@ Homestead.yaml
Homestead.json
Homestead.json
.env
.env
composer.lock
composer.lock
.php_cs.cache
.php_cs
0 → 100644
View file @
1f7bd85a
<?php
$finder
=
Symfony\CS\Finder\DefaultFinder
::
create
()
->
exclude
(
'public'
)
->
exclude
(
'vendor'
)
->
exclude
(
'storage'
)
->
exclude
(
'app'
)
->
exclude
(
'bootstrap'
)
->
exclude
(
'tests'
)
->
notPath
(
'server.php'
)
->
in
(
__DIR__
)
;
return
Symfony\CS\Config\Config
::
create
()
->
setUsingCache
(
true
)
->
level
(
Symfony\CS\FixerInterface
::
PSR2_LEVEL
)
->
fixers
(
array
(
// Concatenation should be used with at least one whitespace around.
'concat_with_spaces'
,
// Unused use statements must be removed.
'ordered_use'
,
// Removes extra empty lines.
'extra_empty_lines'
,
// Removes line breaks between use statements.
'remove_lines_between_uses'
,
// An empty line feed should precede a return statement.
'return'
,
// Unused use statements must be removed.
'unused_use'
,
// Remove trailing whitespace at the end of blank lines.
'whitespacy_lines'
,
// There MUST be one blank line after the namespace declaration.
'line_after_namespace'
,
// There should be exactly one blank line before a namespace declaration.
'single_blank_line_before_namespace'
,
// Each namespace use MUST go on its own line and there MUST be one blank line after the use statements block.
'single_line_after_imports'
,
// Ensure there is no code on the same line as the PHP open tag and it is followed by a blankline.
'blankline_after_open_tag'
,
// Remove duplicated semicolons.
'duplicate_semicolon'
,
// PHP multi-line arrays should have a trailing comma.
'multiline_array_trailing_comma'
,
// There should be no empty lines after class opening brace.
'no_blank_lines_after_class_opening'
,
// There should not be blank lines between docblock and the documented element.
'no_empty_lines_after_phpdocs'
,
// Phpdocs should start and end with content, excluding the very first and last line of the docblocks.
'phpdoc_trim'
,
// Removes line breaks between use statements.
'remove_lines_between_uses'
,
))
->
finder
(
$finder
);
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment