Skip to content

Commit

Permalink
Merge pull request #259 from janvernieuwe/issue-258
Browse files Browse the repository at this point in the history
Fix getClass issue due to bad return types
  • Loading branch information
janvernieuwe authored Oct 25, 2019
2 parents 42a39af + 5ec8941 commit edb99c5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion grumphp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ parameters:
phpunit: ~
phplint: ~
phpstan:
level: 4
level: 3
configuration: "phpstan.neon"
ignore_patterns:
- "spec/"
Expand Down
2 changes: 1 addition & 1 deletion src/Phpro/SoapClient/CodeGenerator/ClientGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public function __construct(RuleSetInterface $ruleSet)
*/
public function generate(FileGenerator $file, $client): string
{
$class = $file->getClass() ?? new ClassGenerator();
$class = $file->getClass() ?: new ClassGenerator();
$class->setNamespaceName($client->getNamespace());
$class->setName($client->getName());
$methods = $client->getMethodMap();
Expand Down
2 changes: 1 addition & 1 deletion src/Phpro/SoapClient/CodeGenerator/TypeGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public function __construct(RuleSetInterface $ruleSet)
*/
public function generate(FileGenerator $file, $type): string
{
$class = $file->getClass() ?? new ClassGenerator();
$class = $file->getClass() ?: new ClassGenerator();
$class->setNamespaceName($type->getNamespace());
$class->setName($type->getName());

Expand Down

0 comments on commit edb99c5

Please sign in to comment.