Skip to content

Commit 10a3587

Browse files
committed
Code style fixes
1 parent 6d66de2 commit 10a3587

Some content is hidden

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

60 files changed

+1248
-920
lines changed

.gitignore

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
etc/qa/.phpcs.cache
22
bin/openapi-client-generator
33
example/etc
4-
example/generated
5-
example/generated-subsplit
4+
example/generated-github
5+
example/generated-github-subsplit
6+
example/generated-miele
67
vendor

Makefile

+5-2
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ all: ## Runs everything ###
3030
@grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) | grep -v "###" | awk 'BEGIN {FS = ":.*?## "}; {printf "%s\n", $$1}' | xargs --open-tty $(MAKE)
3131

3232
syntax-php: ## Lint PHP syntax
33-
$(DOCKER_RUN) vendor/bin/parallel-lint --exclude vendor .
33+
$(DOCKER_RUN) vendor/bin/parallel-lint --exclude vendor ./src ./tests
3434

3535
cs-fix: ## Fix any automatically fixable code style issues
3636
$(DOCKER_RUN) vendor/bin/phpcbf --parallel=$(shell nproc) --standard=./etc/qa/phpcs.xml || $(DOCKER_RUN) vendor/bin/phpcbf --parallel=$(shell nproc) --standard=./etc/qa/phpcs.xml || $(DOCKER_RUN) vendor/bin/phpcbf --parallel=$(shell nproc) --standard=./etc/qa/phpcs.xml -vvv
@@ -64,10 +64,13 @@ help: ## Show this help ###
6464
@printf "\033[33mUsage:\033[0m\n make [target]\n\n\033[33mTargets:\033[0m\n"
6565
@grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf " \033[32m%-32s\033[0m %s\n", $$1, $$2}' | tr -d '#'
6666

67-
generate-example-clients: generate-example-client-one generate-example-client-subsplit
67+
generate-example-clients: generate-example-client-one generate-example-client-subsplit generate-example-client-miele
6868

6969
generate-example-client-one:
7070
$(DOCKER_RUN) php ./bin/openapi-client-generator ./example/openapi-client-one.yaml
7171

7272
generate-example-client-subsplit:
7373
$(DOCKER_RUN) php ./bin/openapi-client-generator ./example/openapi-client-subsplit.yaml
74+
75+
generate-example-client-miele:
76+
$(DOCKER_RUN) php ./bin/openapi-client-generator ./example/openapi-client-miele.yaml

composer.json

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"api-clients/contracts": "^0.1",
1414
"api-clients/github": "^0.2@dev",
1515
"ckr/arraymerger": "^3.0",
16+
"codeinc/http-reason-phrase-lookup": "^1.0",
1617
"delight-im/random": "^1.0",
1718
"devizzent/cebe-php-openapi": "^1",
1819
"eventsauce/object-hydrator": "^1.2",

composer.lock

+93-66
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

etc/qa/phpstan.neon

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
parameters:
22
ignoreErrors:
3+
- '#cebe\\openapi\\spec\\Reference#'
4+
- '#Call to function in_array\(\) requires parameter \#3 to be true.#'
35
- '#with a nullable type declaration.#'
6+
- '#Casting class ReflectionType to string is deprecated.#'
47
ergebnis:
5-
classesAllowedToBeExtended:
6-
- ApiClients\Tools\OpenApiClientGenerator\Contract\Voter\AbstractListOperation
8+
noExtends:
9+
classesAllowedToBeExtended:
10+
- ApiClients\Tools\OpenApiClientGenerator\Contract\Voter\AbstractListOperation
11+
- PhpParser\Builder\Param
712
includes:
813
- ../../vendor/wyrihaximus/async-test-utilities/rules.neon

example/openapi-client-miele.yaml

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
state:
2+
file: etc/openapi-client-generator.state
3+
additionalFiles:
4+
- composer.json
5+
- composer.lock
6+
spec: https://www.miele.com/developer/swagger-ui/m3rdapi.yaml
7+
namespace:
8+
source: ApiClients\Client\Miele
9+
test: ApiClients\Tests\Client\Miele
10+
entryPoints:
11+
call: true
12+
operations: true
13+
webHooks: true
14+
destination:
15+
root: generated-miele
16+
source: src
17+
test: tests
18+
templates:
19+
dir: ../templates
20+
schemas:
21+
allowDuplication: true
22+
useAliasesForDuplication: true
23+
contentType:
24+
- ApiClients\Tools\OpenApiClientGenerator\ContentType\Json
25+
- ApiClients\Tools\OpenApiClientGenerator\ContentType\Raw
26+
voter:
27+
listOperation:
28+
- ApiClients\Tools\OpenApiClientGenerator\Voter\ListOperation\PageAndPerPageInQuery
29+
streamOperation:
30+
- ApiClients\Tools\OpenApiClientGenerator\Voter\StreamOperation\DownloadInOperationId
31+

0 commit comments

Comments
 (0)