Skip to content

Commit

Permalink
- code style fixes
Browse files Browse the repository at this point in the history
- fixed log path of infection logs
- raised memory limit for phpstan
  • Loading branch information
mgrundkoetter committed Nov 9, 2023
1 parent 38660a0 commit 4aba49a
Show file tree
Hide file tree
Showing 7 changed files with 4 additions and 13 deletions.
4 changes: 2 additions & 2 deletions build/config/infection.json.dist
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"configDir": ".\/"
},
"logs": {
"text": "./build/coverage/infection-full.log",
"summary": "./build/coverage/infection-summary.log",
"text": "../coverage/infection-full.log",
"summary": "../coverage/infection-summary.log",
"github": true,
"stryker": {
"badge": "master"
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"@php-cs-fixer"
],
"phpunit": "vendor/bin/phpunit -c build/config/phpunit.xml.dist",
"phpstan": "vendor/bin/phpstan analyse -c build/config/phpstan.neon",
"phpstan": "vendor/bin/phpstan --memory-limit=1G analyse -c build/config/phpstan.neon",
"rector": "vendor/bin/rector process src tests -c build/config/rector.php --xdebug",
"php-cs-fixer": "vendor/bin/php-cs-fixer fix --config build/config/cs.php",
"infection": "vendor/bin/infection --only-covered --configuration=./build/config/infection.json.dist --threads=8 --min-msi=99",
Expand Down
3 changes: 1 addition & 2 deletions src/Generator/ApiGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ private function addSimpleValue(?Extension $extension, ClassType $class, PhpName
CodeGenUtil::generateGetterAndSetter($classProperty, $class, true, !TypeUtil::isConstantsBasedProperty($classProperty));
}


private function generateConstructor(ClassType $class): void
{
$constructor = $class->addMethod('__construct');
Expand Down Expand Up @@ -355,7 +355,6 @@ private function wipeTargetFolder(): void
}

/**
*
* @return bool|int
*/
private function createPhpFile(PhpNamespace $namespace, ClassType $class)
Expand Down
3 changes: 0 additions & 3 deletions src/Generator/TypeUtil.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ public static function getValidPhpType(string $propertyType): string
}

/**
*
* @return false|float|int|string|null
*/
public static function getDefaultValueForType(string $propertyType, bool $nullable)
Expand Down Expand Up @@ -149,7 +148,6 @@ public static function getDefaultValueForType(string $propertyType, bool $nullab

/**
* @param string|null $propertyName
*
*/
public static function extractTypeForPhp(Type $typeFromXsd, ?string $propertyName = null): ?string
{
Expand All @@ -172,7 +170,6 @@ public static function extractTypeForPhp(Type $typeFromXsd, ?string $propertyNam

/**
* @param array<string> $separators
*
*/
public static function camelize(string $input, bool $lcFirst = false, array $separators = ['-', '_']): string
{
Expand Down
2 changes: 0 additions & 2 deletions src/Handler/DateTimeHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,13 @@ public static function getSubscribingMethods()

/**
* @param array<string> $type
*
*/
public function serializeDateTimeToXml(XmlSerializationVisitor $visitor, \DateTime $date, array $type): \DOMText
{
return new \DOMText($date->format($type['params'][0]));
}

/**
*
* @throws \Exception
*/
public function deserializeDateTimeToXml(XmlDeserializationVisitor $visitor, \SimpleXMLElement $dateAsString): \DateTime
Expand Down
1 change: 0 additions & 1 deletion tests/Generator/ApiGenerator/FileGeneratingTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ public function tearDown(): void
}

/**
*
* @throws IOException
*/
public function getGeneratedClassFromFile(string $nameInXsd, string $docBlockComment = ''): ClassType
Expand Down
2 changes: 0 additions & 2 deletions tests/Generator/TypeUtilTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ public static function camelizeDataProvider(): array
}

/**
*
* @dataProvider getTypeForSerializerDataProvider
*/
public function testGetTypeForSerializer(string $xsdType, string $serializerType): void
Expand Down Expand Up @@ -69,7 +68,6 @@ public static function getTypeForSerializerDataProvider(): array
}

/**
*
* @dataProvider getValidPhpTypeDataProvider
*/
public function testGetValidPhpType(string $xsdType, string $phpType): void
Expand Down

0 comments on commit 4aba49a

Please sign in to comment.