Skip to content

Commit

Permalink
Fix CS
Browse files Browse the repository at this point in the history
  • Loading branch information
teohhanhui committed Feb 18, 2016
1 parent d8b5a54 commit 21acc3d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
9 changes: 9 additions & 0 deletions Nelmio/Extractor/ApiDocExtractor.php
@@ -1,5 +1,14 @@
<?php

/*
* This file is part of the DunglasApiBundle package.
*
* (c) Kévin Dunglas <dunglas@gmail.com>
*
* 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;
Expand Down
10 changes: 5 additions & 5 deletions Nelmio/Parser/ApiParser.php
Expand Up @@ -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;

Expand All @@ -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 (
Expand All @@ -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()) {
Expand Down

0 comments on commit 21acc3d

Please sign in to comment.