-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#9] Fix CS tools so tests will pass
- Added PHPUnit and php-cs-fixer as dev dependencies; modified Travis configuration to use these tools to run CI tasks.
- Loading branch information
1 parent
27d1759
commit 8ed44a7
Showing
3 changed files
with
41 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?php | ||
printf("Executing php_cs!!!\n\n"); | ||
$finder = Symfony\CS\Finder\DefaultFinder::create() | ||
->in(__DIR__) | ||
->ignoreDotFiles(true) | ||
->filter(function (SplFileInfo $file) { | ||
$path = $file->getPathname(); | ||
|
||
switch (true) { | ||
case (strrpos($path, '/test/Bootstrap.php')): | ||
return false; | ||
case (strrpos($path, '/vendor/')): | ||
return false; | ||
default: | ||
return true; | ||
} | ||
}); | ||
|
||
return Symfony\CS\Config\Config::create() | ||
->fixers(array( | ||
'controls_spaces', | ||
'braces', | ||
'elseif', | ||
'eof_ending', | ||
'function_declaration', | ||
'include', | ||
'indentation', | ||
'linefeed', | ||
'php_closing_tag', | ||
'short_tag', | ||
'trailing_spaces', | ||
'unused_use', | ||
'visibility', | ||
)) | ||
->finder($finder); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters