Skip to content

Commit

Permalink
Merge pull request #116 from localheinz/feature/license
Browse files Browse the repository at this point in the history
Enhancement: Use ergebnis/license
  • Loading branch information
localheinz authored Feb 5, 2020
2 parents b8ab3c2 + 58e72a3 commit e442151
Show file tree
Hide file tree
Showing 4 changed files with 80 additions and 25 deletions.
17 changes: 9 additions & 8 deletions .php_cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,19 @@ declare(strict_types=1);
* @see https://github.com/Jan0707/phpstan-prophecy
*/

use Ergebnis\License;
use Ergebnis\PhpCsFixer\Config;

$header = <<<'EOF'
Copyright (c) 2018 Jan Gregor Emge-Triebel
$license = License\Type\MIT::text(
__DIR__ . '/LICENSE',
License\Year::fromString('2018'),
License\Holder::fromString('Jan Gregor Emge-Triebel'),
License\Url::fromString('https://github.com/Jan0707/phpstan-prophecy')
);

For the full copyright and license information, please view
the LICENSE file that was distributed with this source code.
$license->save();

@see https://github.com/Jan0707/phpstan-prophecy
EOF;

$config = Config\Factory::fromRuleSet(new Config\RuleSet\Php71($header), [
$config = Config\Factory::fromRuleSet(new Config\RuleSet\Php71($license->header()), [
'final_class' => false,
]);

Expand Down
27 changes: 11 additions & 16 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,21 +1,16 @@
MIT License
The MIT License (MIT)

Copyright (c) 2018 Jan Gregor Emge-Triebel

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit
persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the
Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
},
"require-dev": {
"ergebnis/composer-normalize": "^2.1.1",
"ergebnis/license": "~0.1.0",
"ergebnis/php-cs-fixer-config": "~1.1.2",
"phpspec/prophecy": "^1.7",
"phpunit/phpunit": "^6.0 || ^7.0"
Expand Down
60 changes: 59 additions & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit e442151

Please sign in to comment.