Skip to content
This repository has been archived by the owner on Jan 15, 2024. It is now read-only.

Commit

Permalink
PSR2 fix
Browse files Browse the repository at this point in the history
  • Loading branch information
kleijnweb committed Mar 6, 2018
1 parent a33ec02 commit 7671e51
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Expand Up @@ -18,5 +18,5 @@ matrix:
- php: 7.1
script:
- bin/phpunit
- bin/phpcs
- bin/phpcs --standard=PSR2 src tests
fast_finish: true
16 changes: 2 additions & 14 deletions tests/unit/Routing/OpenApiRouteLoaderTest.php
Expand Up @@ -8,7 +8,7 @@

namespace KleijnWeb\PhpApi\RoutingBundle\Tests\Routing;

use An\Inokable\Controller;
use KleijnWeb\PhpApi\RoutingBundle\Tests\Routing\Stubs\InvokableController;
use KleijnWeb\PhpApi\Descriptions\Description\Description;
use KleijnWeb\PhpApi\Descriptions\Description\Operation;
use KleijnWeb\PhpApi\Descriptions\Description\Parameter;
Expand Down Expand Up @@ -224,7 +224,7 @@ public function canUseOperationIdAsControllerKey()
*/
public function canUseOperationIdAsInvokableControllerKey()
{
$expected = Controller::class;
$expected = InvokableController::class;

$this->decriptionMock
->expects($this->any())
Expand Down Expand Up @@ -513,15 +513,3 @@ public function willAddRequirementsForStringEnumParams()
$this->assertSame($expected, $requirements['aString']);
}
}

namespace An\Inokable;

use Symfony\Component\HttpFoundation\Response;

class Controller
{
public function __invoke(): Response
{
return new Response();
}
}
22 changes: 22 additions & 0 deletions tests/unit/Routing/Stubs/InvokableController.php
@@ -0,0 +1,22 @@
<?php declare(strict_types=1);
/*
* This file is part of the KleijnWeb\PhpApi\RoutingBundle package.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace KleijnWeb\PhpApi\RoutingBundle\Tests\Routing\Stubs;

use Symfony\Component\HttpFoundation\Response;

/**
* @author John Kleijn <john@kleijnweb.nl>
*/
class InvokableController
{
public function __invoke(): Response
{
return new Response();
}
}

0 comments on commit 7671e51

Please sign in to comment.