Skip to content

Commit

Permalink
Follow CS and phpstan changes (#1530)
Browse files Browse the repository at this point in the history
  • Loading branch information
DerManoMann authored Jan 7, 2024
1 parent a70a5dc commit 2e03e6d
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Examples/using-traits/BellsAndWhistles.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
trait BellsAndWhistles
{
use Bells;
use \OpenApi\Examples\UsingTraits\Decoration\Whistles;
use Decoration\Whistles;

/**
* The plating.
Expand Down
2 changes: 1 addition & 1 deletion Examples/using-traits/Product.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
*/
class Product
{
use \OpenApi\Examples\UsingTraits\Colour;
use Colour;
use BellsAndWhistles;

/**
Expand Down
7 changes: 5 additions & 2 deletions src/Processors/ExpandEnums.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,11 @@ protected function expandContextEnum(Analysis $analysis): void

$schemaType = $schema->type;
$enumType = null;
if ($re->isBacked() && ($backingType = $re->getBackingType()) && $backingType instanceof \ReflectionNamedType) {
$enumType = $backingType->getName();
if ($re->isBacked()) {
$backingType = $re->getBackingType();
if ($backingType instanceof \ReflectionNamedType) {
$enumType = $backingType->getName();
}
}

// no (or invalid) schema type means name
Expand Down
2 changes: 1 addition & 1 deletion tests/Fixtures/Parser/AllTraits.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@
trait AllTraits
{
use AsTrait;
use \OpenApi\Tests\Fixtures\Parser\HelloTrait;
use HelloTrait;
}
2 changes: 1 addition & 1 deletion tests/Fixtures/Parser/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* example=User::CONSTANT,
* )
*/
class User extends ParentClass implements \OpenApi\Tests\Fixtures\Parser\UserInterface
class User extends ParentClass implements UserInterface
{
use Hello;

Expand Down

0 comments on commit 2e03e6d

Please sign in to comment.