Skip to content

Commit

Permalink
Update codebase to PHP 7.4+
Browse files Browse the repository at this point in the history
  • Loading branch information
GwendolenLynch committed Oct 6, 2019
1 parent 8257f44 commit 0672587
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 19 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
Camelot Doctrine Inheritance Mapping
====================================

**NOTE:** For legacy PHP support (7.1+) please use the 1.0 branch.

Installation
------------

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"license": "MIT",
"keywords": ["doctrine", "orm", "inheritance-mapping", "symfony", "symfony-bundle"],
"require": {
"php": "^7.1.3",
"php": "^7.4",
"doctrine/annotations": "^1.7",
"doctrine/orm": "^2.5.11"
},
Expand Down
3 changes: 1 addition & 2 deletions src/Annotation/DiscriminatorMapItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@
*/
final class DiscriminatorMapItem
{
/** @var string|null */
private $value;
private ?string $value;

public function __construct(array $data)
{
Expand Down
9 changes: 3 additions & 6 deletions src/Annotation/DiscriminatorMapLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,9 @@
*/
final class DiscriminatorMapLoader
{
/** @var Reader */
private $reader;
/** @var MappingDriver */
private $mappingDriver;
/** @var array */
private $cachedMap;
private Reader $reader;
private MappingDriver $mappingDriver;
private array $cachedMap;

public function __construct(Reader $reader, Configuration $config)
{
Expand Down
3 changes: 1 addition & 2 deletions src/EventSubscriber/DiscriminatorSubscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@

class DiscriminatorSubscriber implements EventSubscriber
{
/** @var DiscriminatorMapLoader */
private $loader;
private DiscriminatorMapLoader $loader;

public function __construct(DiscriminatorMapLoader $loader)
{
Expand Down
6 changes: 2 additions & 4 deletions tests/Fixtures/Entity/SingleTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,8 @@
*/
class SingleTable
{
/** @var UuidInterface|null */
protected $id = null;
/** @var string|null */
protected $title = null;
protected ?UuidInterface $id = null;
protected ?string $title = null;

public function getId(): ?UuidInterface
{
Expand Down
3 changes: 1 addition & 2 deletions tests/Fixtures/Entity/SingleTableChild.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@
*/
class SingleTableChild extends SingleTable
{
/** @var int|null */
private $awesomeness = null;
private ?int $awesomeness = null;

public function getAwesomeness(): ?int
{
Expand Down
3 changes: 1 addition & 2 deletions tests/Fixtures/Entity/SingleTableGrandchild.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@
*/
class SingleTableGrandchild extends SingleTableChild
{
/** @var int|null */
private $vitality = null;
private ?int $vitality = null;

public function getVitality(): ?int
{
Expand Down

0 comments on commit 0672587

Please sign in to comment.