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
4 changes: 2 additions & 2 deletions src/Api/CachedIdentifiersExtractor.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<?php

declare(strict_types=1);

/*
* This file is part of the API Platform project.
*
Expand All @@ -11,6 +9,8 @@
* file that was distributed with this source code.
*/

declare(strict_types=1);

namespace ApiPlatform\Core\Api;

use ApiPlatform\Core\Util\ClassInfoTrait;
Expand Down
4 changes: 2 additions & 2 deletions src/Api/IdentifiersExtractor.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<?php

declare(strict_types=1);

/*
* This file is part of the API Platform project.
*
Expand All @@ -11,6 +9,8 @@
* file that was distributed with this source code.
*/

declare(strict_types=1);

namespace ApiPlatform\Core\Api;

use ApiPlatform\Core\Exception\RuntimeException;
Expand Down
4 changes: 2 additions & 2 deletions src/Api/IdentifiersExtractorInterface.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<?php

declare(strict_types=1);

/*
* This file is part of the API Platform project.
*
Expand All @@ -11,6 +9,8 @@
* file that was distributed with this source code.
*/

declare(strict_types=1);

namespace ApiPlatform\Core\Api;

/**
Expand Down
3 changes: 2 additions & 1 deletion src/Api/OperationType.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?php

declare(strict_types=1);
/*
* This file is part of the API Platform project.
*
Expand All @@ -10,6 +9,8 @@
* file that was distributed with this source code.
*/

declare(strict_types=1);

namespace ApiPlatform\Core\Api;

final class OperationType
Expand Down
3 changes: 2 additions & 1 deletion src/Api/OperationTypeDeprecationHelper.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?php

declare(strict_types=1);
/*
* This file is part of the API Platform project.
*
Expand All @@ -10,6 +9,8 @@
* file that was distributed with this source code.
*/

declare(strict_types=1);

namespace ApiPlatform\Core\Api;

/**
Expand Down
3 changes: 2 additions & 1 deletion src/Bridge/Doctrine/Orm/SubresourceDataProvider.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?php

declare(strict_types=1);
/*
* This file is part of the API Platform project.
*
Expand All @@ -10,6 +9,8 @@
* file that was distributed with this source code.
*/

declare(strict_types=1);

namespace ApiPlatform\Core\Bridge\Doctrine\Orm;

use ApiPlatform\Core\Bridge\Doctrine\Orm\Extension\QueryCollectionExtensionInterface;
Expand Down
3 changes: 2 additions & 1 deletion src/DataProvider/ChainSubresourceDataProvider.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?php

declare(strict_types=1);
/*
* This file is part of the API Platform project.
*
Expand All @@ -10,6 +9,8 @@
* file that was distributed with this source code.
*/

declare(strict_types=1);

namespace ApiPlatform\Core\DataProvider;

use ApiPlatform\Core\Exception\ResourceClassNotSupportedException;
Expand Down
3 changes: 2 additions & 1 deletion src/DataProvider/SubresourceDataProviderInterface.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?php

declare(strict_types=1);
/*
* This file is part of the API Platform project.
*
Expand All @@ -10,6 +9,8 @@
* file that was distributed with this source code.
*/

declare(strict_types=1);

namespace ApiPlatform\Core\DataProvider;

use ApiPlatform\Core\Exception\ResourceClassNotSupportedException;
Expand Down
4 changes: 2 additions & 2 deletions tests/Api/CachedIdentifiersExtractorTest.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<?php

declare(strict_types=1);

/*
* This file is part of the API Platform project.
*
Expand All @@ -11,6 +9,8 @@
* file that was distributed with this source code.
*/

declare(strict_types=1);

namespace ApiPlatform\Core\Tests\Api;

use ApiPlatform\Core\Api\CachedIdentifiersExtractor;
Expand Down
4 changes: 2 additions & 2 deletions tests/Api/IdentifiersExtractorTest.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<?php

declare(strict_types=1);

/*
* This file is part of the API Platform project.
*
Expand All @@ -11,6 +9,8 @@
* file that was distributed with this source code.
*/

declare(strict_types=1);

namespace ApiPlatform\Core\Tests\Api;

use ApiPlatform\Core\Api\IdentifiersExtractor;
Expand Down
3 changes: 2 additions & 1 deletion tests/Bridge/Doctrine/Orm/SubresourceDataProviderTest.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?php

declare(strict_types=1);
/*
* This file is part of the API Platform project.
*
Expand All @@ -10,6 +9,8 @@
* file that was distributed with this source code.
*/

declare(strict_types=1);

namespace ApiPlatform\Core\Tests\Bridge\Doctrine\Orm;

use ApiPlatform\Core\Bridge\Doctrine\Orm\Extension\QueryResultCollectionExtensionInterface;
Expand Down
3 changes: 2 additions & 1 deletion tests/DataProvider/ChainSubresourcedataProviderTest.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?php

declare(strict_types=1);
/*
* This file is part of the API Platform project.
*
Expand All @@ -10,6 +9,8 @@
* file that was distributed with this source code.
*/

declare(strict_types=1);

namespace ApiPlatform\Core\Tests\DataProvider;

use ApiPlatform\Core\DataProvider\ChainSubresourceDataProvider;
Expand Down
8 changes: 4 additions & 4 deletions tests/Fixtures/TestBundle/Entity/Answer.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?php

declare(strict_types=1);
/*
* This file is part of the API Platform project.
*
Expand All @@ -10,6 +9,8 @@
* file that was distributed with this source code.
*/

declare(strict_types=1);

namespace ApiPlatform\Core\Tests\Fixtures\TestBundle\Entity;

use ApiPlatform\Core\Annotation\ApiResource;
Expand All @@ -19,7 +20,6 @@
/**
* Answer.
*
* @ORM\Table(name="answer")
* @ORM\Entity
* @ApiResource(collectionOperations={
* "get_subresource_answer"={"method"="GET", "normalization_context"={"groups"={"foobar"}}}
Expand All @@ -28,15 +28,15 @@
class Answer
{
/**
* @ORM\Column(name="id", type="integer")
* @ORM\Column(type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
* @Serializer\Groups({"foobar"})
*/
private $id;

/**
* @ORM\Column(name="content", type="string", nullable=false)
* @ORM\Column(nullable=false)
* @Serializer\Groups({"foobar"})
*/
private $content;
Expand Down
11 changes: 3 additions & 8 deletions tests/Fixtures/TestBundle/Entity/Container.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?php

declare(strict_types=1);
/*
* This file is part of the API Platform project.
*
Expand All @@ -10,6 +9,8 @@
* file that was distributed with this source code.
*/

declare(strict_types=1);

namespace ApiPlatform\Core\Tests\Fixtures\TestBundle\Entity;

use ApiPlatform\Core\Annotation\ApiProperty;
Expand All @@ -25,7 +26,7 @@ class Container
{
/**
* @ORM\Id
* @ORM\Column(name="id", type="guid")
* @ORM\Column(type="guid")
*
* @var string UUID
*/
Expand All @@ -47,17 +48,11 @@ class Container
*/
private $nodes;

/**
* @return string
*/
public function getId(): string
{
return $this->id;
}

/**
* @param string id
*/
public function setId(string $id)
{
$this->id = $id;
Expand Down
3 changes: 2 additions & 1 deletion tests/Fixtures/TestBundle/Entity/Node.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?php

declare(strict_types=1);
/*
* This file is part of the API Platform project.
*
Expand All @@ -10,6 +9,8 @@
* file that was distributed with this source code.
*/

declare(strict_types=1);

namespace ApiPlatform\Core\Tests\Fixtures\TestBundle\Entity;

use ApiPlatform\Core\Annotation\ApiResource;
Expand Down
8 changes: 4 additions & 4 deletions tests/Fixtures/TestBundle/Entity/Question.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?php

declare(strict_types=1);
/*
* This file is part of the API Platform project.
*
Expand All @@ -10,28 +9,29 @@
* file that was distributed with this source code.
*/

declare(strict_types=1);

namespace ApiPlatform\Core\Tests\Fixtures\TestBundle\Entity;

use ApiPlatform\Core\Annotation\ApiProperty;
use ApiPlatform\Core\Annotation\ApiResource;
use Doctrine\ORM\Mapping as ORM;

/**
* @ORM\Table(name="question")
* @ORM\Entity
* @ApiResource
*/
class Question
{
/**
* @ORM\Column(name="id", type="integer")
* @ORM\Column(type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;

/**
* @ORM\Column(name="content", type="string", nullable=true)
* @ORM\Column(nullable=true)
*/
private $content;

Expand Down