Skip to content

Commit

Permalink
fix: tests and CS
Browse files Browse the repository at this point in the history
  • Loading branch information
dunglas committed Dec 17, 2020
1 parent 48d78b7 commit 46bbf6b
Show file tree
Hide file tree
Showing 8 changed files with 5 additions and 12 deletions.
1 change: 1 addition & 0 deletions .php_cs.dist
Expand Up @@ -17,6 +17,7 @@ $finder = PhpCsFixer\Finder::create()
'tests/Fixtures/app/var',
])
->notPath('src/Bridge/Symfony/Bundle/DependencyInjection/Configuration.php')
->notPath('tests/Fixtures/TestBundle/Entity/DummyPhp8.php') // temporary
->append([
'tests/Fixtures/app/console',
]);
Expand Down
6 changes: 0 additions & 6 deletions phpstan.neon.dist
Expand Up @@ -46,12 +46,6 @@ parameters:
message: '#Strict comparison using !== between .+ and .+ will always evaluate to false\.#'
paths:
- src/Bridge/Doctrine/Common/PropertyHelperTrait.php
-
message: '#Variable \$iri might not be defined\.#'
path: src/JsonApi/Serializer/ItemNormalizer.php
-
message: '#Variable \$positionPm might not be defined\.#'
path: src/Util/ClassInfoTrait.php
- '#Access to an undefined property Prophecy\\Prophecy\\ObjectProphecy<(\\?[a-zA-Z0-9_]+)+>::\$[a-zA-Z0-9_]+#'
-
message: '#Call to an undefined method Doctrine\\Persistence\\ObjectManager::getConnection\(\)#'
Expand Down
Expand Up @@ -32,7 +32,7 @@ class PropertySchemaFormat implements PropertySchemaRestrictionMetadataInterface
public function create(Constraint $constraint, PropertyMetadata $propertyMetadata): array
{
if ($constraint instanceof Email) {
return ['format' => 'email'];
return ['format' => 'email'];
}

if ($constraint instanceof Uuid) {
Expand Down
2 changes: 1 addition & 1 deletion src/GraphQl/Resolver/Stage/ReadStage.php
Expand Up @@ -35,9 +35,9 @@
*/
final class ReadStage implements ReadStageInterface
{
use ArrayTrait;
use ClassInfoTrait;
use IdentifierTrait;
use ArrayTrait;

private $resourceMetadataFactory;
private $iriConverter;
Expand Down
1 change: 0 additions & 1 deletion src/Util/Inflector.php
Expand Up @@ -13,7 +13,6 @@

namespace ApiPlatform\Core\Util;

use ApiPlatform\Core\Exception\RuntimeException;
use Doctrine\Common\Inflector\Inflector as LegacyInflector;
use Doctrine\Inflector\Inflector as InflectorObject;
use Doctrine\Inflector\InflectorFactory;
Expand Down
2 changes: 1 addition & 1 deletion tests/Bridge/Symfony/Routing/IriConverterTest.php
Expand Up @@ -43,8 +43,8 @@
*/
class IriConverterTest extends TestCase
{
use ProphecyTrait;
use ExpectDeprecationTrait;
use ProphecyTrait;

public function testGetItemFromIriNoRouteException()
{
Expand Down
1 change: 0 additions & 1 deletion tests/OpenApi/Factory/OpenApiFactoryTest.php
Expand Up @@ -182,7 +182,6 @@ public function testInvoke(): void
$dummySchema->setDefinitions(new \ArrayObject([
'type' => 'object',
'description' => 'This is a dummy.',
'additionalProperties' => true,
'properties' => [
'id' => new \ArrayObject([
'type' => 'integer',
Expand Down
2 changes: 1 addition & 1 deletion tests/Swagger/Serializer/DocumentationNormalizerV2Test.php
Expand Up @@ -66,8 +66,8 @@
*/
class DocumentationNormalizerV2Test extends TestCase
{
use ProphecyTrait;
use ExpectDeprecationTrait;
use ProphecyTrait;

private const OPERATION_FORMATS = [
'input_formats' => ['jsonld' => ['application/ld+json']],
Expand Down

0 comments on commit 46bbf6b

Please sign in to comment.