Skip to content
This repository was archived by the owner on Feb 21, 2022. It is now read-only.

Commit 94a3eca

Browse files
author
mmoreram
committed
Added some useful files
* Added badges to README * Added LICENSE * Added travis configuration file * Added editorconfig * Formatted some files use statements
1 parent ddd36f8 commit 94a3eca

File tree

7 files changed

+87
-5
lines changed

7 files changed

+87
-5
lines changed

.editorconfig

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
; top-most EditorConfig file
2+
root = true
3+
4+
; Unix-style newlines
5+
[*]
6+
end_of_line = LF
7+
8+
[*.php]
9+
indent_style = space
10+
indent_size = 4

.travis.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
language: php
2+
3+
php:
4+
- 5.3
5+
- 5.4
6+
- 5.5
7+
- 5.6
8+
- hhvm-nightly
9+
10+
matrix:
11+
allow_failures:
12+
- php: hhvm-nightly
13+
14+
install: composer install --prefer-source --no-interaction
15+
16+
script: phpunit -c phpunit.xml.dist --coverage-text
17+
18+
notifications:
19+
email: false

CONTRIBUTING.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
Contributing
2+
-----
3+
4+
This projects follows Symfony2 coding standards, so pull requests must pass phpcs
5+
checks. Read more details about
6+
[Symfony2 coding standards](http://symfony.com/doc/current/contributing/code/standards.html)
7+
and install the corresponding [CodeSniffer definition](https://github.com/opensky/Symfony2-coding-standard)
8+
to run code validation.
9+
10+
There is a policy for contributing to this project. Pull requests must
11+
be explained step by step to make the review process easy in order to
12+
accept and merge them. New features must come paired with PHPUnit tests.
13+
14+
If you would like to contribute, please read the [Contributing Code][1] in the project
15+
documentation. If you are submitting a pull request, please follow the guidelines
16+
in the [Submitting a Patch][2] section and use the [Pull Request Template][3].
17+
18+
[1]: http://symfony.com/doc/current/contributing/code/index.html
19+
[2]: http://symfony.com/doc/current/contributing/code/patches.html#check-list
20+
[3]: http://symfony.com/doc/current/contributing/code/patches.html#make-a-pull-request

LICENSE

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
Copyright (c) Marc Morera <yuhu@mmoreram.com>
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy
4+
of this software and associated documentation files (the "Software"), to deal
5+
in the Software without restriction, including without limitation the rights
6+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7+
copies of the Software, and to permit persons to whom the Software is furnished
8+
to do so, subject to the following conditions:
9+
10+
The above copyright notice and this permission notice shall be included in all
11+
copies or substantial portions of the Software.
12+
13+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19+
THE SOFTWARE.

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
PHP Formatter
22
=============
3+
[![Build Status](https://travis-ci.org/mmoreram/php-formatter.png?branch=master)](https://travis-ci.org/mmoreram/php-formatter)
4+
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/mmoreram/php-formatter/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/mmoreram/php-formatter/?branch=master)
5+
[![Latest Stable Version](https://poser.pugx.org/mmoreram/php-formatter/v/stable.png)](https://packagist.org/packages/mmoreram/php-formatter)
6+
[![Latest Unstable Version](https://poser.pugx.org/mmoreram/php-formatter/v/unstable.png)](https://packagist.org/packages/mmoreram/php-formatter)
37

48
## Install
59

@@ -94,6 +98,16 @@ process.
9498
* option: --group-type=***one***|***each***
9599
* option: --sort-type=***alph***|***length***
96100
* option: --sort-direction=***asc***|***desc***
101+
* option: --dry-run [***no value***]
102+
103+
#### Dry run
104+
105+
You can use this tool just to test the files will be modified, using option
106+
--dry-run
107+
108+
``` bash
109+
$ php-formatter use:sort src/ --dry-run
110+
```
97111

98112
#### Group
99113

src/PHPFormatter/Command/UseSortCommand.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@
1515

1616
namespace PHPFormatter\Command;
1717

18-
use PHPFormatter\UseSorter;
1918
use PHPFormatter\Finder\FileFinder;
20-
use Symfony\Component\Filesystem\Filesystem;
21-
use Symfony\Component\Console\Input\InputOption;
19+
use PHPFormatter\UseSorter;
20+
use Symfony\Component\Console\Command\Command as BaseCommand;
2221
use Symfony\Component\Console\Input\InputArgument;
2322
use Symfony\Component\Console\Input\InputInterface;
23+
use Symfony\Component\Console\Input\InputOption;
2424
use Symfony\Component\Console\Output\OutputInterface;
25-
use Symfony\Component\Console\Command\Command as BaseCommand;
25+
use Symfony\Component\Filesystem\Filesystem;
2626

2727
/**
2828
* Class UseSortCommand

src/PHPFormatter/Compiler/Compiler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616

1717
namespace PHPFormatter\Compiler;
1818

19-
use Phar;
2019
use DateTime;
20+
use Phar;
2121
use RuntimeException;
2222
use Symfony\Component\Finder\Finder;
2323
use Symfony\Component\Process\Process;

0 commit comments

Comments
 (0)