From 21acc3d5fbe291a0064847435284d93a96f7e426 Mon Sep 17 00:00:00 2001 From: Teoh Han Hui Date: Thu, 18 Feb 2016 23:05:58 +0800 Subject: [PATCH] Fix CS --- Nelmio/Extractor/ApiDocExtractor.php | 9 +++++++++ Nelmio/Parser/ApiParser.php | 10 +++++----- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/Nelmio/Extractor/ApiDocExtractor.php b/Nelmio/Extractor/ApiDocExtractor.php index 79c74a3ecf0..cb10e8f4a86 100644 --- a/Nelmio/Extractor/ApiDocExtractor.php +++ b/Nelmio/Extractor/ApiDocExtractor.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace Dunglas\ApiBundle\Nelmio\Extractor; use Doctrine\Common\Util\ClassUtils; diff --git a/Nelmio/Parser/ApiParser.php b/Nelmio/Parser/ApiParser.php index 3c8acfd9c70..7741eed3311 100644 --- a/Nelmio/Parser/ApiParser.php +++ b/Nelmio/Parser/ApiParser.php @@ -88,7 +88,7 @@ public function parse(array $item) * * @return array */ - private function parseClass(ResourceInterface $resource, $entityClass, $io, array $visited = array()) + private function parseClass(ResourceInterface $resource, $entityClass, $io, array $visited = []) { $visited[] = $entityClass; @@ -99,7 +99,7 @@ private function parseClass(ResourceInterface $resource, $entityClass, $io, arra $resource->getValidationGroups() ); - $data = array(); + $data = []; /** @var AttributeMetadataInterface $attributeMetadata */ foreach ($classMetadata->getAttributesMetadata() as $name => $attributeMetadata) { if ( @@ -124,14 +124,14 @@ private function parseClass(ResourceInterface $resource, $entityClass, $io, arra * * @return array */ - private function parseAttribute(ResourceInterface $resource, AttributeMetadataInterface $attributeMetadata, $io, Type $type = null, array $visited = array()) + private function parseAttribute(ResourceInterface $resource, AttributeMetadataInterface $attributeMetadata, $io, Type $type = null, array $visited = []) { - $data = array( + $data = [ 'dataType' => null, 'required' => $attributeMetadata->isRequired(), 'description' => $attributeMetadata->getDescription(), 'readonly' => !$attributeMetadata->isWritable(), - ); + ]; if (null == $type) { if (null === $attributeMetadata->getType()) {