Skip to content

fix: use linter with current config via docker #110

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion scripts/generate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ rm -f ./src/Model/*

java -jar ./bin/swagger-codegen-cli.jar generate -t ./template -l php -i ./res/fingerprint-server-api.yaml -o ./ -c config.json

docker run --rm -v $(pwd):/code ghcr.io/php-cs-fixer/php-cs-fixer:${FIXER_VERSION:-3-php8.3} fix
docker run --rm -v $(pwd):/code ghcr.io/php-cs-fixer/php-cs-fixer:${FIXER_VERSION:-3-php8.3} fix --config=/code/.php-cs-fixer.php /code/src

# fix invalid code generated for structure with additionalProperties
(
Expand Down
2 changes: 2 additions & 0 deletions src/Model/ASN.php
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,8 @@ public function setNetwork(string $network): self

/**
* Gets name.
*
* @return ?string
*/
public function getName(): ?string
{
Expand Down
2 changes: 2 additions & 0 deletions src/Model/BotdDetectionResult.php
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,8 @@ public function setResult(string $result): self

/**
* Gets type.
*
* @return ?string
*/
public function getType(): ?string
{
Expand Down
2 changes: 2 additions & 0 deletions src/Model/BotdResult.php
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,8 @@ public function setRequestId(string $request_id): self

/**
* Gets linked_id.
*
* @return ?string
*/
public function getLinkedId(): ?string
{
Expand Down
2 changes: 2 additions & 0 deletions src/Model/BrowserDetails.php
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,8 @@ public function setUserAgent(string $user_agent): self

/**
* Gets bot_probability.
*
* @return ?int
*/
public function getBotProbability(): ?int
{
Expand Down
2 changes: 2 additions & 0 deletions src/Model/Confidence.php
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,8 @@ public function setScore(float $score): self

/**
* Gets revision.
*
* @return ?string
*/
public function getRevision(): ?string
{
Expand Down
2 changes: 2 additions & 0 deletions src/Model/DataCenter.php
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,8 @@ public function setResult(bool $result): self

/**
* Gets name.
*
* @return ?string
*/
public function getName(): ?string
{
Expand Down
12 changes: 12 additions & 0 deletions src/Model/DeprecatedIPLocation.php
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,8 @@ public function valid(): bool

/**
* Gets accuracy_radius.
*
* @return ?int
*/
public function getAccuracyRadius(): ?int
{
Expand Down Expand Up @@ -311,6 +313,8 @@ public function setLongitude(?float $longitude): self

/**
* Gets postal_code.
*
* @return ?string
*/
public function getPostalCode(): ?string
{
Expand All @@ -333,6 +337,8 @@ public function setPostalCode(?string $postal_code): self

/**
* Gets timezone.
*
* @return ?string
*/
public function getTimezone(): ?string
{
Expand All @@ -355,6 +361,8 @@ public function setTimezone(?string $timezone): self

/**
* Gets city.
*
* @return ?\Fingerprint\ServerAPI\Model\DeprecatedIPLocationCity
*/
public function getCity(): ?DeprecatedIPLocationCity
{
Expand All @@ -377,6 +385,8 @@ public function setCity(?DeprecatedIPLocationCity $city): self

/**
* Gets country.
*
* @return ?\Fingerprint\ServerAPI\Model\Location
*/
public function getCountry(): ?Location
{
Expand All @@ -399,6 +409,8 @@ public function setCountry(?Location $country): self

/**
* Gets continent.
*
* @return ?\Fingerprint\ServerAPI\Model\Location
*/
public function getContinent(): ?Location
{
Expand Down
2 changes: 2 additions & 0 deletions src/Model/DeprecatedIPLocationCity.php
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,8 @@ public function valid(): bool

/**
* Gets name.
*
* @return ?string
*/
public function getName(): ?string
{
Expand Down
2 changes: 2 additions & 0 deletions src/Model/ErrorCommon403Response.php
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,8 @@ public function valid(): bool

/**
* Gets error.
*
* @return ?\Fingerprint\ServerAPI\Model\Common403ErrorResponse
*/
public function getError(): ?Common403ErrorResponse
{
Expand Down
2 changes: 2 additions & 0 deletions src/Model/ErrorCommon429Response.php
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,8 @@ public function valid(): bool

/**
* Gets error.
*
* @return ?\Fingerprint\ServerAPI\Model\ErrorCommon429ResponseError
*/
public function getError(): ?ErrorCommon429ResponseError
{
Expand Down
2 changes: 2 additions & 0 deletions src/Model/ErrorEvent404Response.php
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,8 @@ public function valid(): bool

/**
* Gets error.
*
* @return ?\Fingerprint\ServerAPI\Model\ErrorEvent404ResponseError
*/
public function getError(): ?ErrorEvent404ResponseError
{
Expand Down
2 changes: 2 additions & 0 deletions src/Model/ErrorUpdateEvent400Response.php
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,8 @@ public function valid(): bool

/**
* Gets error.
*
* @return ?\Fingerprint\ServerAPI\Model\ErrorUpdateEvent400ResponseError
*/
public function getError(): ?ErrorUpdateEvent400ResponseError
{
Expand Down
2 changes: 2 additions & 0 deletions src/Model/ErrorUpdateEvent409Response.php
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,8 @@ public function valid(): bool

/**
* Gets error.
*
* @return ?\Fingerprint\ServerAPI\Model\ErrorUpdateEvent409ResponseError
*/
public function getError(): ?ErrorUpdateEvent409ResponseError
{
Expand Down
2 changes: 2 additions & 0 deletions src/Model/ErrorVisitor400Response.php
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,8 @@ public function valid(): bool

/**
* Gets error.
*
* @return ?\Fingerprint\ServerAPI\Model\ErrorVisitor400ResponseError
*/
public function getError(): ?ErrorVisitor400ResponseError
{
Expand Down
2 changes: 2 additions & 0 deletions src/Model/ErrorVisitor404Response.php
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,8 @@ public function valid(): bool

/**
* Gets error.
*
* @return ?\Fingerprint\ServerAPI\Model\ErrorVisitor404ResponseError
*/
public function getError(): ?ErrorVisitor404ResponseError
{
Expand Down
2 changes: 2 additions & 0 deletions src/Model/EventResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,8 @@ public function setProducts(ProductsResponse $products): self

/**
* Gets error.
*
* @return ?\Fingerprint\ServerAPI\Model\ProductError
*/
public function getError(): ?ProductError
{
Expand Down
6 changes: 6 additions & 0 deletions src/Model/EventUpdateRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,8 @@ public function valid(): bool

/**
* Gets linked_id.
*
* @return ?string
*/
public function getLinkedId(): ?string
{
Expand All @@ -225,6 +227,8 @@ public function setLinkedId(?string $linked_id): self

/**
* Gets tag.
*
* @return ?object
*/
public function getTag(): ?object
{
Expand All @@ -247,6 +251,8 @@ public function setTag(?object $tag): self

/**
* Gets suspect.
*
* @return ?bool
*/
public function getSuspect(): ?bool
{
Expand Down
2 changes: 2 additions & 0 deletions src/Model/HighActivityResult.php
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,8 @@ public function setResult(bool $result): self

/**
* Gets daily_requests.
*
* @return ?float
*/
public function getDailyRequests(): ?float
{
Expand Down
12 changes: 12 additions & 0 deletions src/Model/IPLocation.php
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,8 @@ public function valid(): bool

/**
* Gets accuracy_radius.
*
* @return ?int
*/
public function getAccuracyRadius(): ?int
{
Expand Down Expand Up @@ -309,6 +311,8 @@ public function setLongitude(?float $longitude): self

/**
* Gets postal_code.
*
* @return ?string
*/
public function getPostalCode(): ?string
{
Expand All @@ -331,6 +335,8 @@ public function setPostalCode(?string $postal_code): self

/**
* Gets timezone.
*
* @return ?string
*/
public function getTimezone(): ?string
{
Expand All @@ -353,6 +359,8 @@ public function setTimezone(?string $timezone): self

/**
* Gets city.
*
* @return ?\Fingerprint\ServerAPI\Model\IPLocationCity
*/
public function getCity(): ?IPLocationCity
{
Expand All @@ -375,6 +383,8 @@ public function setCity(?IPLocationCity $city): self

/**
* Gets country.
*
* @return ?\Fingerprint\ServerAPI\Model\Location
*/
public function getCountry(): ?Location
{
Expand All @@ -397,6 +407,8 @@ public function setCountry(?Location $country): self

/**
* Gets continent.
*
* @return ?\Fingerprint\ServerAPI\Model\Location
*/
public function getContinent(): ?Location
{
Expand Down
2 changes: 2 additions & 0 deletions src/Model/IPLocationCity.php
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,8 @@ public function valid(): bool

/**
* Gets name.
*
* @return ?string
*/
public function getName(): ?string
{
Expand Down
4 changes: 4 additions & 0 deletions src/Model/IpInfoResult.php
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,8 @@ public function valid(): bool

/**
* Gets v4.
*
* @return ?\Fingerprint\ServerAPI\Model\IpInfoResultV4
*/
public function getV4(): ?IpInfoResultV4
{
Expand All @@ -221,6 +223,8 @@ public function setV4(?IpInfoResultV4 $v4): self

/**
* Gets v6.
*
* @return ?\Fingerprint\ServerAPI\Model\IpInfoResultV6
*/
public function getV6(): ?IpInfoResultV6
{
Expand Down
4 changes: 4 additions & 0 deletions src/Model/IpInfoResultV4.php
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,8 @@ public function setGeolocation(IPLocation $geolocation): self

/**
* Gets asn.
*
* @return ?\Fingerprint\ServerAPI\Model\ASN
*/
public function getAsn(): ?ASN
{
Expand All @@ -284,6 +286,8 @@ public function setAsn(?ASN $asn): self

/**
* Gets datacenter.
*
* @return ?\Fingerprint\ServerAPI\Model\DataCenter
*/
public function getDatacenter(): ?DataCenter
{
Expand Down
4 changes: 4 additions & 0 deletions src/Model/IpInfoResultV6.php
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,8 @@ public function setGeolocation(IPLocation $geolocation): self

/**
* Gets asn.
*
* @return ?\Fingerprint\ServerAPI\Model\ASN
*/
public function getAsn(): ?ASN
{
Expand All @@ -284,6 +286,8 @@ public function setAsn(?ASN $asn): self

/**
* Gets datacenter.
*
* @return ?\Fingerprint\ServerAPI\Model\DataCenter
*/
public function getDatacenter(): ?DataCenter
{
Expand Down
Loading
Loading