Skip to content
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
1 change: 1 addition & 0 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@
'phpdoc_no_alias_tag' => true,
'phpdoc_param_order' => true,
'multiline_comment_opening_closing' => true,
'phpdoc_line_span' => ['class' => 'multi', 'method' => 'multi', 'property' => null, 'const' => null, 'case' => null, 'function' => null],

'php_unit_attributes' => true,
])
Expand Down
8 changes: 6 additions & 2 deletions docs/snippets/guide/cookbook/enums_an.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,19 @@

use OpenApi\Annotations as OA;

/** @OA\Schema() */
/**
* @OA\Schema()
*/
enum State
{
case OPEN;
case MERGED;
case DECLINED;
}

/** @OA\Schema */
/**
* @OA\Schema
*/
class PullRequest
{
/** @OA\Property */
Expand Down
4 changes: 3 additions & 1 deletion src/Generator.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,9 @@ public function __construct(?LoggerInterface $logger = null)
$this->setNamespaces(self::DEFAULT_NAMESPACES);
}

/** @deprecated Use {@see Undefined::isDefault()} instead. */
/**
* @deprecated use {@see Undefined::isDefault()} instead
*/
public static function isDefault(...$value): bool
{
return Undefined::isDefault(...$value);
Expand Down
4 changes: 3 additions & 1 deletion src/Type/LegacyTypeResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@
*/
class LegacyTypeResolver extends AbstractTypeResolver
{
/** @inheritdoc */
/**
* @inheritdoc
*/
protected function doAugment(Analysis $analysis, OA\Schema $schema, \Reflector $reflector, string $sourceClass = OA\Schema::class): void
{
$docblockDetails = $this->getDocblockTypeDetails($reflector, $schema->_context);
Expand Down
4 changes: 3 additions & 1 deletion src/Type/TypeInfoTypeResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@

class TypeInfoTypeResolver extends AbstractTypeResolver
{
/** @inheritdoc */
/**
* @inheritdoc
*/
protected function doAugment(Analysis $analysis, OA\Schema $schema, \Reflector $reflector, string $sourceClass = OA\Schema::class): void
{
$docblockType = $this->getDocblockType($reflector);
Expand Down
12 changes: 9 additions & 3 deletions tests/Fixtures/Scratch/ComplexCustomAttributes.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,9 @@ public function __construct(
)]
class Collection extends OAT\Property
{
/** @param class-string $of */
/**
* @param class-string $of
*/
public function __construct(
string $of,
?string $description = null
Expand All @@ -90,7 +92,9 @@ public function __construct(
)]
class Item extends OAT\Property
{
/** @param class-string $of */
/**
* @param class-string $of
*/
public function __construct(
string $of,
?string $description = null
Expand Down Expand Up @@ -128,7 +132,9 @@ public function __construct(
#[\Attribute(\Attribute::TARGET_CLASS | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)]
class Successful extends OAT\Response
{
/** @param ?class-string $of */
/**
* @param ?class-string $of
*/
public function __construct(
?string $of = null,
) {
Expand Down
8 changes: 6 additions & 2 deletions tests/Fixtures/Scratch/CustomAttributes.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ class CustomProperty extends OAT\Property
#[\Attribute(\Attribute::TARGET_METHOD | \Attribute::TARGET_PROPERTY | \Attribute::TARGET_PARAMETER | \Attribute::TARGET_CLASS_CONSTANT | \Attribute::IS_REPEATABLE)]
class CustomItem extends OAT\Property
{
/** @param class-string $of */
/**
* @param class-string $of
*/
public function __construct(
string $of,
?string $description = null
Expand All @@ -44,7 +46,9 @@ public function __construct(
#[\Attribute(\Attribute::TARGET_METHOD | \Attribute::TARGET_PROPERTY | \Attribute::TARGET_PARAMETER | \Attribute::TARGET_CLASS_CONSTANT | \Attribute::IS_REPEATABLE)]
class CustomList extends OAT\Property
{
/** @param class-string $of */
/**
* @param class-string $of
*/
public function __construct(string $of, ?string $description = null)
{
parent::__construct(
Expand Down
Loading