Skip to content

Commit 868a333

Browse files
committed
Initial commit
0 parents  commit 868a333

19 files changed

+519
-0
lines changed

.docheader

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/**
2+
* @see https://github.com/open-code-modeling/php-code-generator-transformator for the canonical source repository
3+
* @copyright https://github.com/open-code-modeling/php-code-generator-transformator/blob/master/COPYRIGHT.md
4+
* @license https://github.com/open-code-modeling/php-code-generator-transformator/blob/master/LICENSE.md MIT License
5+
*/

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
.env
2+
app.env
3+
.phpunit.result.cache
4+
build/*
5+
vendor/
6+
composer.lock
7+
.idea
8+
.php_cs.cache

.php_cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?php
2+
3+
$config = new Prooph\CS\Config\Prooph();
4+
$config->getFinder()->in(__DIR__);
5+
6+
$cacheDir = getenv('TRAVIS') ? getenv('HOME') . '/.php-cs-fixer' : __DIR__;
7+
8+
$config->setCacheFile($cacheDir . '/.php_cs.cache');
9+
10+
return $config;

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Changelog

COPYRIGHT.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Copyright (c) 2020 Sandro Keil

LICENSE.md

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

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# PHP Code Generator Transformator
2+
3+
Transformator for PHP Code Generator. Can be used standalone in a workflow or by a Cartridge.
4+
5+
## Installation
6+
7+
```bash
8+
$ composer require open-code-modeling/php-code-generator-transformator --dev
9+
```

composer.json

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
{
2+
"name": "open-code-modeling/php-code-generator-transformator",
3+
"description": "Open Code Modeling PHP Code Generator Transformator",
4+
"license": "MIT",
5+
"type": "library",
6+
"authors": [
7+
{
8+
"name": "Sandro Keil",
9+
"homepage": "https://sandro-keil.de",
10+
"role": "maintainer"
11+
}
12+
],
13+
"support": {
14+
"issues": "https://github.com/open-code-modeling/php-code-generator-transformator/issues",
15+
"source": "https://github.com/open-code-modeling/php-code-generator-transformator"
16+
},
17+
"autoload": {
18+
"psr-4": {
19+
"OpenCodeModeling\\CodeGenerator\\Transformator\\": "src/"
20+
}
21+
},
22+
"autoload-dev": {
23+
"psr-4": {
24+
"OpenCodeModelingTest\\CodeGenerator\\Transformator\\": "tests/"
25+
}
26+
},
27+
"require": {
28+
"ext-dom": "*"
29+
},
30+
"require-dev": {
31+
"open-code-modeling/php-code-generator": "*",
32+
"phpspec/prophecy-phpunit": "^2.0",
33+
"phpstan/phpstan": "^0.12.33",
34+
"phpstan/phpstan-strict-rules": "^0.12.4",
35+
"phpunit/phpunit": "^9.2.6",
36+
"prooph/php-cs-fixer-config": "^0.3",
37+
"roave/security-advisories": "dev-master",
38+
"squizlabs/php_codesniffer": "^3.4"
39+
},
40+
"suggest": {
41+
"open-code-modeling/php-code-generator": "To use the static factory methods for Code Generator workflow configuration"
42+
},
43+
"minimum-stability": "dev",
44+
"prefer-stable": true,
45+
"scripts": {
46+
"check": [
47+
"@cs",
48+
"@docheader",
49+
"@test"
50+
],
51+
"docheader": "vendor/bin/docheader check src/ tests/",
52+
"cs": "php-cs-fixer fix src -v --diff --dry-run",
53+
"cs-fix": "php-cs-fixer fix src -v --diff",
54+
"test": "vendor/bin/phpunit",
55+
"analyse": "php vendor/bin/phpstan.phar analyse --no-interaction"
56+
},
57+
"config": {
58+
"sort-packages": true,
59+
"platform": {
60+
}
61+
},
62+
"archive": {
63+
"exclude": [
64+
".coveralls.yml",
65+
".travis.yml",
66+
"build",
67+
"phpunit.xml*",
68+
"tests"
69+
]
70+
}
71+
}

phpstan.neon.dist

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
parameters:
2+
level: 5
3+
paths:
4+
- src/
5+
excludes_analyse:
6+
- src/PhpCodeSniffer.php

phpunit.xml.dist

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<phpunit
3+
colors="true"
4+
cacheResult="true"
5+
stopOnFailure="false"
6+
convertErrorsToExceptions="true"
7+
convertNoticesToExceptions="true"
8+
convertWarningsToExceptions="true"
9+
backupGlobals="false"
10+
backupStaticAttributes="false"
11+
failOnRisky="true"
12+
failOnWarning="true"
13+
>
14+
<testsuite name="Open Code Modeling Code Generator Transformator - Test Suite">
15+
<directory suffix=".php">./tests</directory>
16+
</testsuite>
17+
18+
<filter>
19+
<whitelist>
20+
<directory>./src/</directory>
21+
</whitelist>
22+
</filter>
23+
</phpunit>

0 commit comments

Comments
 (0)