Skip to content

Commit

Permalink
CS Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
norberttech committed Apr 20, 2019
1 parent 9edceb2 commit 14ab746
Show file tree
Hide file tree
Showing 50 changed files with 366 additions and 3 deletions.
9 changes: 9 additions & 0 deletions .php_cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
<?php

$fileHeaderComment = <<<COMMENT
This file is part of the PHP Humanizer Library.
For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.
COMMENT;

return PhpCsFixer\Config::create()
->setRules([
'@PSR2' => true,
'declare_strict_types' => true,
'array_syntax' => ['syntax' => 'short'],
'header_comment' => ['header' => $fileHeaderComment, 'separate' => 'both'],
'blank_line_after_opening_tag' => true,
'single_blank_line_before_namespace' => true,
'no_unused_imports' => true,
Expand Down
4 changes: 1 addition & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,4 @@ install:
- composer update

script:
- ./bin/phpspec run --format=pretty
- ./bin/phpunit
- ./bin/php-cs-fixer fix -v --dry-run
- composer run test
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,33 @@ Currently we support following languages:
* [Japanese](src/Coduo/PHPHumanizer/Resources/translations/difference.ja.yml)
* [Romanian](src/Coduo/PHPHumanizer/Resources/translations/difference.ro.yml)

# Development

After downloading library update dependencies:

```
composer update
```

In order to check lowest possible versions of dependencies add

```
composer update --prefer-lowest
````

Execute test suite:

```
composer run test
```

Run CS Fixer

```
composer run cs:php:fix
```


# Credits

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)
7 changes: 7 additions & 0 deletions src/Coduo/PHPHumanizer/Collection/Formatter.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

declare(strict_types=1);

/*
* This file is part of the PHP Humanizer Library.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace Coduo\PHPHumanizer\Collection;

use Symfony\Component\Translation\TranslatorInterface;
Expand Down
7 changes: 7 additions & 0 deletions src/Coduo/PHPHumanizer/Collection/Oxford.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

declare(strict_types=1);

/*
* This file is part of the PHP Humanizer Library.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace Coduo\PHPHumanizer\Collection;

final class Oxford
Expand Down
7 changes: 7 additions & 0 deletions src/Coduo/PHPHumanizer/CollectionHumanizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

declare(strict_types=1);

/*
* This file is part of the PHP Humanizer Library.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace Coduo\PHPHumanizer;

use Coduo\PHPHumanizer\Collection\Formatter;
Expand Down
7 changes: 7 additions & 0 deletions src/Coduo/PHPHumanizer/DateTime/Difference.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

declare(strict_types=1);

/*
* This file is part of the PHP Humanizer Library.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace Coduo\PHPHumanizer\DateTime;

use Coduo\PHPHumanizer\DateTime\Unit\Day;
Expand Down
7 changes: 7 additions & 0 deletions src/Coduo/PHPHumanizer/DateTime/Difference/CompoundResult.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

declare(strict_types=1);

/*
* This file is part of the PHP Humanizer Library.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace Coduo\PHPHumanizer\DateTime\Difference;

use Coduo\PHPHumanizer\DateTime\Unit;
Expand Down
7 changes: 7 additions & 0 deletions src/Coduo/PHPHumanizer/DateTime/Formatter.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

declare(strict_types=1);

/*
* This file is part of the PHP Humanizer Library.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace Coduo\PHPHumanizer\DateTime;

use Symfony\Component\Translation\TranslatorInterface;
Expand Down
7 changes: 7 additions & 0 deletions src/Coduo/PHPHumanizer/DateTime/PreciseDifference.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

declare(strict_types=1);

/*
* This file is part of the PHP Humanizer Library.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace Coduo\PHPHumanizer\DateTime;

use Coduo\PHPHumanizer\DateTime\Unit\Day;
Expand Down
7 changes: 7 additions & 0 deletions src/Coduo/PHPHumanizer/DateTime/PreciseFormatter.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

declare(strict_types=1);

/*
* This file is part of the PHP Humanizer Library.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace Coduo\PHPHumanizer\DateTime;

use Symfony\Component\Translation\TranslatorInterface;
Expand Down
7 changes: 7 additions & 0 deletions src/Coduo/PHPHumanizer/DateTime/Unit.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

declare(strict_types=1);

/*
* This file is part of the PHP Humanizer Library.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace Coduo\PHPHumanizer\DateTime;

interface Unit
Expand Down
7 changes: 7 additions & 0 deletions src/Coduo/PHPHumanizer/DateTime/Unit/Day.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

declare(strict_types=1);

/*
* This file is part of the PHP Humanizer Library.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace Coduo\PHPHumanizer\DateTime\Unit;

use Coduo\PHPHumanizer\DateTime\Unit;
Expand Down
7 changes: 7 additions & 0 deletions src/Coduo/PHPHumanizer/DateTime/Unit/Hour.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

declare(strict_types=1);

/*
* This file is part of the PHP Humanizer Library.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace Coduo\PHPHumanizer\DateTime\Unit;

use Coduo\PHPHumanizer\DateTime\Unit;
Expand Down
7 changes: 7 additions & 0 deletions src/Coduo/PHPHumanizer/DateTime/Unit/JustNow.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

declare(strict_types=1);

/*
* This file is part of the PHP Humanizer Library.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace Coduo\PHPHumanizer\DateTime\Unit;

use Coduo\PHPHumanizer\DateTime\Unit;
Expand Down
7 changes: 7 additions & 0 deletions src/Coduo/PHPHumanizer/DateTime/Unit/Minute.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

declare(strict_types=1);

/*
* This file is part of the PHP Humanizer Library.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace Coduo\PHPHumanizer\DateTime\Unit;

use Coduo\PHPHumanizer\DateTime\Unit;
Expand Down
7 changes: 7 additions & 0 deletions src/Coduo/PHPHumanizer/DateTime/Unit/Month.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

declare(strict_types=1);

/*
* This file is part of the PHP Humanizer Library.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace Coduo\PHPHumanizer\DateTime\Unit;

use Coduo\PHPHumanizer\DateTime\Unit;
Expand Down
7 changes: 7 additions & 0 deletions src/Coduo/PHPHumanizer/DateTime/Unit/Second.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

declare(strict_types=1);

/*
* This file is part of the PHP Humanizer Library.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace Coduo\PHPHumanizer\DateTime\Unit;

use Coduo\PHPHumanizer\DateTime\Unit;
Expand Down
7 changes: 7 additions & 0 deletions src/Coduo/PHPHumanizer/DateTime/Unit/Week.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

declare(strict_types=1);

/*
* This file is part of the PHP Humanizer Library.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace Coduo\PHPHumanizer\DateTime\Unit;

use Coduo\PHPHumanizer\DateTime\Unit;
Expand Down
7 changes: 7 additions & 0 deletions src/Coduo/PHPHumanizer/DateTime/Unit/Year.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

declare(strict_types=1);

/*
* This file is part of the PHP Humanizer Library.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace Coduo\PHPHumanizer\DateTime\Unit;

use Coduo\PHPHumanizer\DateTime\Unit;
Expand Down
7 changes: 7 additions & 0 deletions src/Coduo/PHPHumanizer/DateTimeHumanizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

declare(strict_types=1);

/*
* This file is part of the PHP Humanizer Library.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace Coduo\PHPHumanizer;

use Coduo\PHPHumanizer\DateTime\Difference;
Expand Down
7 changes: 7 additions & 0 deletions src/Coduo/PHPHumanizer/Number/Ordinal.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

declare(strict_types=1);

/*
* This file is part of the PHP Humanizer Library.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace Coduo\PHPHumanizer\Number;

use Coduo\PHPHumanizer\Number\Ordinal\Builder;
Expand Down
7 changes: 7 additions & 0 deletions src/Coduo/PHPHumanizer/Number/Ordinal/Builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

declare(strict_types=1);

/*
* This file is part of the PHP Humanizer Library.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace Coduo\PHPHumanizer\Number\Ordinal;

/**
Expand Down
7 changes: 7 additions & 0 deletions src/Coduo/PHPHumanizer/Number/Ordinal/StrategyInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

declare(strict_types=1);

/*
* This file is part of the PHP Humanizer Library.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace Coduo\PHPHumanizer\Number\Ordinal;

interface StrategyInterface
Expand Down
7 changes: 7 additions & 0 deletions src/Coduo/PHPHumanizer/Number/RomanNumeral.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

declare(strict_types=1);

/*
* This file is part of the PHP Humanizer Library.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace Coduo\PHPHumanizer\Number;

final class RomanNumeral
Expand Down
7 changes: 7 additions & 0 deletions src/Coduo/PHPHumanizer/NumberHumanizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

declare(strict_types=1);

/*
* This file is part of the PHP Humanizer Library.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace Coduo\PHPHumanizer;

use Coduo\PHPHumanizer\Number\Ordinal;
Expand Down
7 changes: 7 additions & 0 deletions src/Coduo/PHPHumanizer/Resources/Ordinal/DeStrategy.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

declare(strict_types=1);

/*
* This file is part of the PHP Humanizer Library.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace Coduo\PHPHumanizer\Resources\Ordinal;

use Coduo\PHPHumanizer\Number\Ordinal\StrategyInterface;
Expand Down
Loading

0 comments on commit 14ab746

Please sign in to comment.