Skip to content

Commit 14ab746

Browse files
committed
CS Fixes
1 parent 9edceb2 commit 14ab746

Some content is hidden

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

50 files changed

+366
-3
lines changed

.php_cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,18 @@
11
<?php
2+
3+
$fileHeaderComment = <<<COMMENT
4+
This file is part of the PHP Humanizer Library.
5+
6+
For the full copyright and license information, please view the LICENSE
7+
file that was distributed with this source code.
8+
COMMENT;
9+
210
return PhpCsFixer\Config::create()
311
->setRules([
412
'@PSR2' => true,
513
'declare_strict_types' => true,
614
'array_syntax' => ['syntax' => 'short'],
15+
'header_comment' => ['header' => $fileHeaderComment, 'separate' => 'both'],
716
'blank_line_after_opening_tag' => true,
817
'single_blank_line_before_namespace' => true,
918
'no_unused_imports' => true,

.travis.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,4 @@ install:
1919
- composer update
2020

2121
script:
22-
- ./bin/phpspec run --format=pretty
23-
- ./bin/phpunit
24-
- ./bin/php-cs-fixer fix -v --dry-run
22+
- composer run test

README.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,33 @@ Currently we support following languages:
262262
* [Japanese](src/Coduo/PHPHumanizer/Resources/translations/difference.ja.yml)
263263
* [Romanian](src/Coduo/PHPHumanizer/Resources/translations/difference.ro.yml)
264264

265+
# Development
266+
267+
After downloading library update dependencies:
268+
269+
```
270+
composer update
271+
```
272+
273+
In order to check lowest possible versions of dependencies add
274+
275+
```
276+
composer update --prefer-lowest
277+
````
278+
279+
Execute test suite:
280+
281+
```
282+
composer run test
283+
```
284+
285+
Run CS Fixer
286+
287+
```
288+
composer run cs:php:fix
289+
```
290+
291+
265292
# Credits
266293
267294
This lib was inspired by [Java Humanize Lib](https://github.com/mfornos/humanize) && [Rails Active Support](https://github.com/rails/rails/tree/master/activesupport/lib/active_support)

src/Coduo/PHPHumanizer/Collection/Formatter.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22

33
declare(strict_types=1);
44

5+
/*
6+
* This file is part of the PHP Humanizer Library.
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
512
namespace Coduo\PHPHumanizer\Collection;
613

714
use Symfony\Component\Translation\TranslatorInterface;

src/Coduo/PHPHumanizer/Collection/Oxford.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22

33
declare(strict_types=1);
44

5+
/*
6+
* This file is part of the PHP Humanizer Library.
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
512
namespace Coduo\PHPHumanizer\Collection;
613

714
final class Oxford

src/Coduo/PHPHumanizer/CollectionHumanizer.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22

33
declare(strict_types=1);
44

5+
/*
6+
* This file is part of the PHP Humanizer Library.
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
512
namespace Coduo\PHPHumanizer;
613

714
use Coduo\PHPHumanizer\Collection\Formatter;

src/Coduo/PHPHumanizer/DateTime/Difference.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22

33
declare(strict_types=1);
44

5+
/*
6+
* This file is part of the PHP Humanizer Library.
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
512
namespace Coduo\PHPHumanizer\DateTime;
613

714
use Coduo\PHPHumanizer\DateTime\Unit\Day;

src/Coduo/PHPHumanizer/DateTime/Difference/CompoundResult.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22

33
declare(strict_types=1);
44

5+
/*
6+
* This file is part of the PHP Humanizer Library.
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
512
namespace Coduo\PHPHumanizer\DateTime\Difference;
613

714
use Coduo\PHPHumanizer\DateTime\Unit;

src/Coduo/PHPHumanizer/DateTime/Formatter.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22

33
declare(strict_types=1);
44

5+
/*
6+
* This file is part of the PHP Humanizer Library.
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
512
namespace Coduo\PHPHumanizer\DateTime;
613

714
use Symfony\Component\Translation\TranslatorInterface;

src/Coduo/PHPHumanizer/DateTime/PreciseDifference.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22

33
declare(strict_types=1);
44

5+
/*
6+
* This file is part of the PHP Humanizer Library.
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
512
namespace Coduo\PHPHumanizer\DateTime;
613

714
use Coduo\PHPHumanizer\DateTime\Unit\Day;

0 commit comments

Comments
 (0)