From bca3184e3b7aec5b9237f8f32de785fafc5476d3 Mon Sep 17 00:00:00 2001 From: Marek Bartos Date: Mon, 17 Sep 2018 10:19:25 +0200 Subject: [PATCH] Class is final -> all protected methods could be private --- src/Schema/Serialization/ArrayHydrator.php | 2 +- src/Schema/Serialization/ArraySerializator.php | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Schema/Serialization/ArrayHydrator.php b/src/Schema/Serialization/ArrayHydrator.php index 00df6663..4771fded 100644 --- a/src/Schema/Serialization/ArrayHydrator.php +++ b/src/Schema/Serialization/ArrayHydrator.php @@ -33,7 +33,7 @@ public function hydrate($data): Schema /** * @param mixed[] $data */ - protected function hydrateEndpoint(array $data): Endpoint + private function hydrateEndpoint(array $data): Endpoint { if (!isset($data['handler'])) { throw new InvalidStateException("Schema route 'handler' is required"); diff --git a/src/Schema/Serialization/ArraySerializator.php b/src/Schema/Serialization/ArraySerializator.php index cae24e80..2522096c 100644 --- a/src/Schema/Serialization/ArraySerializator.php +++ b/src/Schema/Serialization/ArraySerializator.php @@ -42,7 +42,7 @@ public function serialize(SchemaBuilder $builder): array /** * @return mixed[] */ - protected function serializeEndpoint(Controller $controller, Method $method): array + private function serializeEndpoint(Controller $controller, Method $method): array { $endpoint = $this->serializeInit($controller, $method); $this->serializeNegotiations($endpoint, $method); @@ -55,7 +55,7 @@ protected function serializeEndpoint(Controller $controller, Method $method): ar /** * @return mixed[] */ - protected function serializeInit(Controller $controller, Method $method): array + private function serializeInit(Controller $controller, Method $method): array { // Build full mask (@GroupPath(s) + @ControllerPath + @Path) // without duplicated slashes (//) @@ -106,7 +106,7 @@ protected function serializeInit(Controller $controller, Method $method): array /** * @param mixed[] $endpoint */ - protected function serializePattern(array &$endpoint, Controller $controller, Method $method): void + private function serializePattern(array &$endpoint, Controller $controller, Method $method): void { $mask = $endpoint['mask']; $maskParameters = []; @@ -174,7 +174,7 @@ protected function serializePattern(array &$endpoint, Controller $controller, Me /** * @param mixed[] $endpoint */ - protected function serializeNegotiations(array &$endpoint, Method $method): void + private function serializeNegotiations(array &$endpoint, Method $method): void { // Add negotiations foreach ($method->getNegotiations() as $negotiation) { @@ -189,7 +189,7 @@ protected function serializeNegotiations(array &$endpoint, Method $method): void /** * @param mixed[] $endpoint */ - protected function serializeMappers(array &$endpoint, Method $method): void + private function serializeMappers(array &$endpoint, Method $method): void { // Add request & response mappers if ($method->getRequestMapper()) { @@ -209,7 +209,7 @@ protected function serializeMappers(array &$endpoint, Method $method): void * @param mixed[] $endpoint * @param mixed[] $parameter */ - protected function serializeEndpointParameter(array &$endpoint, array $parameter, Method $method): void + private function serializeEndpointParameter(array &$endpoint, array $parameter, Method $method): void { // Build parameters $p = [