mirror of
https://github.com/retailcrm/NelmioApiDocBundle.git
synced 2025-03-12 02:26:09 +03:00
Fix CS
This commit is contained in:
parent
4e443c43b1
commit
f03e33f551
@ -37,26 +37,26 @@ class SwaggerPropertyAnnotationReader
|
||||
{
|
||||
$swgProperty = $this->annotationsReader->getPropertyAnnotation($reflectionProperty, SwgProperty::class);
|
||||
if ($swgProperty instanceof SwgProperty) {
|
||||
if ($swgProperty->type !== null) {
|
||||
if (null !== $swgProperty->type) {
|
||||
$property->setType($swgProperty->type);
|
||||
}
|
||||
if ($swgProperty->default !== UNDEFINED) {
|
||||
if (UNDEFINED !== $swgProperty->default) {
|
||||
$property->setDefault($swgProperty->default);
|
||||
}
|
||||
if ($swgProperty->enum !== null) {
|
||||
if (null !== $swgProperty->enum) {
|
||||
$property->setEnum($swgProperty->enum);
|
||||
}
|
||||
if ($property instanceof Schema) {
|
||||
if ($swgProperty->description !== null) {
|
||||
if (null !== $swgProperty->description) {
|
||||
$property->setDescription($swgProperty->description);
|
||||
}
|
||||
if ($swgProperty->title !== null) {
|
||||
if (null !== $swgProperty->title) {
|
||||
$property->setTitle($swgProperty->title);
|
||||
}
|
||||
if ($swgProperty->example !== null) {
|
||||
if (null !== $swgProperty->example) {
|
||||
$property->setExample($swgProperty->example);
|
||||
}
|
||||
if ($swgProperty->readOnly !== null) {
|
||||
if (null !== $swgProperty->readOnly) {
|
||||
$property->setReadOnly($swgProperty->readOnly);
|
||||
}
|
||||
}
|
||||
|
@ -54,7 +54,7 @@ class User
|
||||
|
||||
/**
|
||||
* @var float
|
||||
* @SWG\Property(default = 0.0)
|
||||
* @SWG\Property(default = 0.0)
|
||||
*/
|
||||
private $money;
|
||||
|
||||
|
@ -156,7 +156,7 @@ class FunctionalTest extends WebTestCase
|
||||
'money' => [
|
||||
'type' => 'number',
|
||||
'format' => 'float',
|
||||
'default' => 0.0
|
||||
'default' => 0.0,
|
||||
],
|
||||
'id' => [
|
||||
'type' => 'integer',
|
||||
@ -195,7 +195,7 @@ class FunctionalTest extends WebTestCase
|
||||
],
|
||||
'status' => [
|
||||
'type' => 'string',
|
||||
'enum' => ["disabled", "enabled"],
|
||||
'enum' => ['disabled', 'enabled'],
|
||||
],
|
||||
],
|
||||
],
|
||||
|
@ -55,7 +55,7 @@ class JMSFunctionalTest extends WebTestCase
|
||||
],
|
||||
'status' => [
|
||||
'type' => 'string',
|
||||
'enum' => ["disabled", "enabled"],
|
||||
'enum' => ['disabled', 'enabled'],
|
||||
],
|
||||
],
|
||||
], $this->getModel('JMSUser')->toArray());
|
||||
|
Loading…
x
Reference in New Issue
Block a user