Skip to content

Commit

Permalink
Housekeeping: CS
Browse files Browse the repository at this point in the history
  • Loading branch information
beberlei committed Oct 11, 2020
1 parent f52d351 commit c0177d9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
3 changes: 3 additions & 0 deletions lib/Doctrine/Common/Annotations/DocParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
use function interface_exists;
use function is_array;
use function is_object;
use function is_subclass_of;
use function json_encode;
use function ltrim;
use function preg_match;
Expand All @@ -55,6 +56,8 @@
use function substr;
use function trim;

use const PHP_VERSION_ID;

/**
* A parser for docblock annotations.
*
Expand Down
10 changes: 6 additions & 4 deletions tests/Doctrine/Tests/Common/Annotations/DocParserTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -1547,7 +1547,7 @@ public function testNamedArgumentsConstructorAnnotation(): void

self::assertCount(1, $result);
self::assertInstanceOf(NamedAnnotation::class, $result[0]);
self::assertSame("baz", $result[0]->getFoo());
self::assertSame('baz', $result[0]->getFoo());
self::assertSame(2222, $result[0]->getBar());
}

Expand All @@ -1559,15 +1559,17 @@ public function testNamedArgumentsConstructorAnnotationWithDefaultValue(): void

self::assertCount(1, $result);
self::assertInstanceOf(NamedAnnotation::class, $result[0]);
self::assertSame("baz", $result[0]->getFoo());
self::assertSame('baz', $result[0]->getFoo());
self::assertSame(1234, $result[0]->getBar());
}
}

/** @Annotation */
class NamedAnnotation implements NamedArgumentConstructorAnnotation
{
/** @var string */
private $foo;
/** @var int */
private $bar;

public function __construct(string $foo, int $bar = 1234)
Expand All @@ -1576,12 +1578,12 @@ public function __construct(string $foo, int $bar = 1234)
$this->bar = $bar;
}

public function getFoo() : string
public function getFoo(): string
{
return $this->foo;
}

public function getBar() : int
public function getBar(): int
{
return $this->bar;
}
Expand Down

0 comments on commit c0177d9

Please sign in to comment.