From 4fba087867b8cdb74ebe097fdb0af2b401950bbd Mon Sep 17 00:00:00 2001 From: Maximilian Berghoff Date: Sat, 12 May 2018 01:40:53 +0200 Subject: [PATCH] Apply fixes from StyleCI (#65) [ci skip] [skip ci] --- src/Controller/ResourceController.php | 1 + src/Security/ResourcePathVoter.php | 1 + src/Serializer/Jms/Handler/ResourceHandler.php | 4 ++++ tests/Features/Context/ResourceContext.php | 1 + tests/Unit/Registry/PayloadAliasRegistryTest.php | 2 ++ .../Jms/EventSubscriber/PhpcrNodeSubscriberTest.php | 2 ++ .../Unit/Serializer/Jms/Handler/PhpcrNodeHandlerTest.php | 2 ++ .../Unit/Serializer/Jms/Handler/ResourceHandlerTest.php | 9 +++++++++ 8 files changed, 22 insertions(+) diff --git a/src/Controller/ResourceController.php b/src/Controller/ResourceController.php index 3720241..435ee39 100644 --- a/src/Controller/ResourceController.php +++ b/src/Controller/ResourceController.php @@ -25,6 +25,7 @@ class ResourceController { const ROLE_RESOURCE_READ = 'CMF_RESOURCE_READ'; + const ROLE_RESOURCE_WRITE = 'CMF_RESOURCE_WRITE'; /** diff --git a/src/Security/ResourcePathVoter.php b/src/Security/ResourcePathVoter.php index c43979e..70f3611 100644 --- a/src/Security/ResourcePathVoter.php +++ b/src/Security/ResourcePathVoter.php @@ -22,6 +22,7 @@ class ResourcePathVoter extends Voter { private $accessDecisionManager; + private $accessMap; public function __construct(AccessDecisionManagerInterface $accessDecisionManager, array $accessMap) diff --git a/src/Serializer/Jms/Handler/ResourceHandler.php b/src/Serializer/Jms/Handler/ResourceHandler.php index 44c980b..7dcaa68 100644 --- a/src/Serializer/Jms/Handler/ResourceHandler.php +++ b/src/Serializer/Jms/Handler/ResourceHandler.php @@ -31,9 +31,13 @@ class ResourceHandler implements SubscribingHandlerInterface { private $registry; + private $payloadAliasRegistry; + private $descriptionFactory; + private $maxDepth; + private $exposePayload; public function __construct( diff --git a/tests/Features/Context/ResourceContext.php b/tests/Features/Context/ResourceContext.php index 137e4c5..879b820 100644 --- a/tests/Features/Context/ResourceContext.php +++ b/tests/Features/Context/ResourceContext.php @@ -26,6 +26,7 @@ class ResourceContext implements Context { private $session; + private $manager; /** diff --git a/tests/Unit/Registry/PayloadAliasRegistryTest.php b/tests/Unit/Registry/PayloadAliasRegistryTest.php index c5593b5..4200826 100644 --- a/tests/Unit/Registry/PayloadAliasRegistryTest.php +++ b/tests/Unit/Registry/PayloadAliasRegistryTest.php @@ -16,7 +16,9 @@ class PayloadAliasRegistryTest extends \PHPUnit_Framework_TestCase { private $repositoryRegistry; + private $resource; + private $repository; public function setUp() diff --git a/tests/Unit/Serializer/Jms/EventSubscriber/PhpcrNodeSubscriberTest.php b/tests/Unit/Serializer/Jms/EventSubscriber/PhpcrNodeSubscriberTest.php index b569f22..bcd62cf 100644 --- a/tests/Unit/Serializer/Jms/EventSubscriber/PhpcrNodeSubscriberTest.php +++ b/tests/Unit/Serializer/Jms/EventSubscriber/PhpcrNodeSubscriberTest.php @@ -16,7 +16,9 @@ class PhpcrNodeSubscriberTest extends \PHPUnit_Framework_TestCase { private $node; + private $event; + private $subscriber; public function setUp() diff --git a/tests/Unit/Serializer/Jms/Handler/PhpcrNodeHandlerTest.php b/tests/Unit/Serializer/Jms/Handler/PhpcrNodeHandlerTest.php index 32cf5e3..5454154 100644 --- a/tests/Unit/Serializer/Jms/Handler/PhpcrNodeHandlerTest.php +++ b/tests/Unit/Serializer/Jms/Handler/PhpcrNodeHandlerTest.php @@ -16,7 +16,9 @@ class PhpcrNodeHandlerTest extends \PHPUnit_Framework_TestCase { private $handler; + private $property1; + private $property2; public function setUp() diff --git a/tests/Unit/Serializer/Jms/Handler/ResourceHandlerTest.php b/tests/Unit/Serializer/Jms/Handler/ResourceHandlerTest.php index 74135bf..cab497e 100644 --- a/tests/Unit/Serializer/Jms/Handler/ResourceHandlerTest.php +++ b/tests/Unit/Serializer/Jms/Handler/ResourceHandlerTest.php @@ -25,14 +25,23 @@ class ResourceHandlerTest extends \PHPUnit_Framework_TestCase { private $repositoryRegistry; + private $payloadAliasRegistry; + private $descriptionFactory; + private $visitor; + private $resource; + private $childResource; + private $repository; + private $context; + private $handler; + private $description; protected function setUp()