mirror of
https://github.com/retailcrm/NelmioApiDocBundle.git
synced 2025-03-10 09:36:10 +03:00
Fix CS
This commit is contained in:
parent
1df3ddf49f
commit
d5395cc0ea
@ -15,10 +15,7 @@ use Nelmio\ApiDocBundle\DataTypes;
|
||||
use Nelmio\ApiDocBundle\Util\LegacyFormHelper;
|
||||
use Symfony\Component\Form\Exception\FormException;
|
||||
use Symfony\Component\Form\Exception\InvalidArgumentException;
|
||||
use Symfony\Component\Form\Exception\UnexpectedTypeException;
|
||||
use Symfony\Component\Form\ChoiceList\ChoiceListInterface;
|
||||
use Symfony\Component\Form\ChoiceList\View\ChoiceListView;
|
||||
use Symfony\Component\Form\Extension\Core\ChoiceList\ChoiceListInterface as LegacyChoiceListInterface;
|
||||
use Symfony\Component\Form\Extension\Core\View\ChoiceView;
|
||||
use Symfony\Component\Form\Form;
|
||||
use Symfony\Component\Form\FormFactoryInterface;
|
||||
@ -108,7 +105,6 @@ class FormTypeParser implements ParserInterface
|
||||
),
|
||||
);
|
||||
|
||||
|
||||
public function __construct(FormFactoryInterface $formFactory, $entityToChoice)
|
||||
{
|
||||
$this->formFactory = $formFactory;
|
||||
@ -194,7 +190,8 @@ class FormTypeParser implements ParserInterface
|
||||
);
|
||||
}
|
||||
|
||||
private function getDataType($type) {
|
||||
private function getDataType($type)
|
||||
{
|
||||
foreach ($this->extendedMapTypes as $data => $types) {
|
||||
if (in_array($type, $types)) {
|
||||
return $data;
|
||||
@ -415,6 +412,7 @@ class FormTypeParser implements ParserInterface
|
||||
|
||||
if (!LegacyFormHelper::hasBCBreaks() && !isset($form) && $this->implementsType($type)) {
|
||||
$type = $this->getTypeInstance($type);
|
||||
|
||||
return $this->formFactory->create($type, null, $options);
|
||||
}
|
||||
}
|
||||
|
@ -46,7 +46,8 @@ class CollectionType extends AbstractType
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getBlockPrefix() {
|
||||
public function getBlockPrefix()
|
||||
{
|
||||
return 'collection_type';
|
||||
}
|
||||
}
|
||||
|
@ -42,7 +42,8 @@ class CompoundType extends AbstractType
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getBlockPrefix() {
|
||||
public function getBlockPrefix()
|
||||
{
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
@ -66,7 +66,8 @@ class DependencyType extends AbstractType
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getBlockPrefix() {
|
||||
public function getBlockPrefix()
|
||||
{
|
||||
return 'dependency_type';
|
||||
}
|
||||
}
|
||||
|
@ -59,7 +59,8 @@ class EntityType extends AbstractType
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getBlockPrefix() {
|
||||
public function getBlockPrefix()
|
||||
{
|
||||
return 'entity';
|
||||
}
|
||||
}
|
||||
|
@ -91,7 +91,8 @@ class ImprovedTestType extends AbstractType
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getBlockPrefix() {
|
||||
public function getBlockPrefix()
|
||||
{
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
@ -72,7 +72,8 @@ class RequireConstructionType extends AbstractType
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getBlockPrefix() {
|
||||
public function getBlockPrefix()
|
||||
{
|
||||
return 'require_construction_type';
|
||||
}
|
||||
}
|
||||
|
@ -39,7 +39,8 @@ class RequiredType extends AbstractType
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getBlockPrefix() {
|
||||
public function getBlockPrefix()
|
||||
{
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
@ -50,7 +50,8 @@ class SimpleType extends AbstractType
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getBlockPrefix() {
|
||||
public function getBlockPrefix()
|
||||
{
|
||||
return 'simple';
|
||||
}
|
||||
}
|
||||
|
@ -66,7 +66,8 @@ class TestType extends AbstractType
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getBlockPrefix() {
|
||||
public function getBlockPrefix()
|
||||
{
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
@ -12,8 +12,10 @@ use FOS\RestBundle\Controller\Annotations\RequestParam;
|
||||
*
|
||||
* @author Ener-Getick
|
||||
*/
|
||||
class RequestParamHelper extends RequestParam {
|
||||
public function __construct(array $data) {
|
||||
class RequestParamHelper extends RequestParam
|
||||
{
|
||||
public function __construct(array $data)
|
||||
{
|
||||
foreach ($data as $key => $value) {
|
||||
if ($key === 'array') {
|
||||
if (property_exists($this, 'map')) {
|
||||
|
@ -12,7 +12,6 @@
|
||||
namespace Nelmio\ApiDocBundle\Tests;
|
||||
|
||||
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase as BaseWebTestCase;
|
||||
use Symfony\Component\Filesystem\Filesystem;
|
||||
use Symfony\Component\HttpKernel\Kernel;
|
||||
|
||||
abstract class WebTestCase extends BaseWebTestCase
|
||||
|
Loading…
x
Reference in New Issue
Block a user