Skip to content

Commit

Permalink
php-cs-fixer
Browse files Browse the repository at this point in the history
  • Loading branch information
vladimirDaron committed Apr 15, 2020
1 parent c152bab commit 9d3202f
Show file tree
Hide file tree
Showing 13 changed files with 10 additions and 49 deletions.
6 changes: 0 additions & 6 deletions src/Annotation/ApiProperty.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,8 @@ final class ApiProperty
*/
public $identifier;

/**
* @var mixed
*/
public $default;

/**
* @var mixed
*/
public $example;

/**
Expand Down
4 changes: 0 additions & 4 deletions src/Annotation/ApiResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -257,8 +257,6 @@ final class ApiResource
/**
* @see https://api-platform.com/docs/core/mercure
* @see https://github.com/Haehnchen/idea-php-annotation-plugin/issues/112
*
* @var mixed
*/
private $mercure;

Expand Down Expand Up @@ -433,8 +431,6 @@ final class ApiResource
/**
* @see https://api-platform.com/docs/core/validation/#using-validation-groups
* @see https://github.com/Haehnchen/idea-php-annotation-plugin/issues/112
*
* @var mixed
*/
private $validationGroups;

Expand Down
8 changes: 0 additions & 8 deletions src/Annotation/AttributesHydratorTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,6 @@
*/

declare(strict_types=1);
/*
* This file is part of the API Platform project.
*
* (c) Kévin Dunglas <dunglas@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace ApiPlatform\Core\Annotation;

Expand Down
4 changes: 2 additions & 2 deletions src/Bridge/Doctrine/Common/PropertyHelperTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ protected function isPropertyNested(string $property/*, string $resourceClass*/)
if (\func_num_args() > 1) {
$resourceClass = (string) func_get_arg(1);
} else {
if (__CLASS__ !== \get_class($this)) {
if (__CLASS__ !== static::class) {
$r = new \ReflectionMethod($this, __FUNCTION__);
if (__CLASS__ !== $r->getDeclaringClass()->getName()) {
@trigger_error(sprintf('Method %s() will have a second `$resourceClass` argument in version API Platform 3.0. Not defining it is deprecated since API Platform 2.1.', __FUNCTION__), E_USER_DEPRECATED);
Expand Down Expand Up @@ -91,7 +91,7 @@ protected function splitPropertyParts(string $property/*, string $resourceClass*

if (\func_num_args() > 1) {
$resourceClass = func_get_arg(1);
} elseif (__CLASS__ !== \get_class($this)) {
} elseif (__CLASS__ !== static::class) {
$r = new \ReflectionMethod($this, __FUNCTION__);
if (__CLASS__ !== $r->getDeclaringClass()->getName()) {
@trigger_error(sprintf('Method %s() will have a second `$resourceClass` argument in version API Platform 3.0. Not defining it is deprecated since API Platform 2.1.', __FUNCTION__), E_USER_DEPRECATED);
Expand Down
2 changes: 1 addition & 1 deletion src/Bridge/Doctrine/Orm/Filter/AbstractFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ protected function isPropertyEnabled(string $property/*, string $resourceClass*/
if (\func_num_args() > 1) {
$resourceClass = func_get_arg(1);
} else {
if (__CLASS__ !== \get_class($this)) {
if (__CLASS__ !== static::class) {
$r = new \ReflectionMethod($this, __FUNCTION__);
if (__CLASS__ !== $r->getDeclaringClass()->getName()) {
@trigger_error(sprintf('Method %s() will have a second `$resourceClass` argument in version API Platform 3.0. Not defining it is deprecated since API Platform 2.1.', __FUNCTION__), E_USER_DEPRECATED);
Expand Down
2 changes: 1 addition & 1 deletion src/Bridge/Doctrine/Orm/Filter/ExistsFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ protected function filterProperty(string $property, $value, QueryBuilder $queryB
if (\func_num_args() > 6) {
$context = func_get_arg(6);
} else {
if (__CLASS__ !== \get_class($this)) {
if (__CLASS__ !== static::class) {
$r = new \ReflectionMethod($this, __FUNCTION__);
if (__CLASS__ !== $r->getDeclaringClass()->getName()) {
@trigger_error(sprintf('Method %s() will have a seventh `$context` argument in version API Platform 3.0. Not defining it is deprecated since API Platform 2.5.', __FUNCTION__), E_USER_DEPRECATED);
Expand Down
4 changes: 2 additions & 2 deletions src/Bridge/Doctrine/Orm/PropertyHelperTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ protected function addJoinsForNestedProperty(string $property, string $rootAlias
if (\func_num_args() > 4) {
$resourceClass = func_get_arg(4);
} else {
if (__CLASS__ !== \get_class($this)) {
if (__CLASS__ !== static::class) {
$r = new \ReflectionMethod($this, __FUNCTION__);
if (__CLASS__ !== $r->getDeclaringClass()->getName()) {
@trigger_error(sprintf('Method %s() will have a fifth `$resourceClass` argument in version API Platform 3.0. Not defining it is deprecated since API Platform 2.1.', __FUNCTION__), E_USER_DEPRECATED);
Expand All @@ -57,7 +57,7 @@ protected function addJoinsForNestedProperty(string $property, string $rootAlias
if (\func_num_args() > 5) {
$joinType = func_get_arg(5);
} else {
if (__CLASS__ !== \get_class($this)) {
if (__CLASS__ !== static::class) {
$r = new \ReflectionMethod($this, __FUNCTION__);
if (__CLASS__ !== $r->getDeclaringClass()->getName()) {
@trigger_error(sprintf('Method %s() will have a sixth `$joinType` argument in version API Platform 3.0. Not defining it is deprecated since API Platform 2.3.', __FUNCTION__), E_USER_DEPRECATED);
Expand Down
9 changes: 0 additions & 9 deletions src/Bridge/Symfony/Bundle/Test/BrowserKitAssertionsTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,6 @@

declare(strict_types=1);

/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace ApiPlatform\Core\Bridge\Symfony\Bundle\Test;

use PHPUnit\Framework\Constraint\LogicalAnd;
Expand Down
4 changes: 2 additions & 2 deletions src/DataProvider/Pagination.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,9 @@ public function getOffset(string $resourceClass = null, string $operationName =
if ($graphql && null !== ($last = $this->getParameterFromContext($context, 'last'))) {
return ($offset = ($context['count'] ?? 0) - $last) < 0 ? 0 : $offset;
}

$offset = ($this->getPage($context) - 1) * $limit;

if (!\is_int($offset)) {
throw new InvalidArgumentException('Page parameter is too large.');
}
Expand Down
4 changes: 2 additions & 2 deletions src/Filter/Validator/ValidatorInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ interface ValidatorInterface
{
/**
* @var string the parameter name to validate
* @var array<string, mixed> $filterDescription the filter descriptions as returned by `ApiPlatform\Core\Api\FilterInterface::getDescription()`
* @var array<string, mixed> $queryParameters the list of query parameter
* @var array<string, mixed> the filter descriptions as returned by `ApiPlatform\Core\Api\FilterInterface::getDescription()`
* @var array<string, mixed> the list of query parameter
*/
public function validate(string $name, array $filterDescription, array $queryParameters): array;
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,6 @@
*/

declare(strict_types=1);
/*
* This file is part of the API Platform project.
*
* (c) Kévin Dunglas <dunglas@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace ApiPlatform\Core\Tests\Bridge\Symfony\Validator\Exception;

Expand Down
2 changes: 0 additions & 2 deletions tests/Fixtures/TestBundle/Document/ContainNonResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@
class ContainNonResource
{
/**
* @var mixed
*
* @ODM\Id(strategy="INCREMENT", type="integer")
*
* @Groups("contain_non_resource")
Expand Down
2 changes: 0 additions & 2 deletions tests/Fixtures/TestBundle/Entity/ContainNonResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@
class ContainNonResource
{
/**
* @var mixed
*
* @ORM\Column(type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
Expand Down

0 comments on commit 9d3202f

Please sign in to comment.