mirror of
https://github.com/retailcrm/NelmioApiDocBundle.git
synced 2025-04-02 21:36:14 +03:00
CS Fixes
This commit is contained in:
parent
73ad2e3cdf
commit
a945a47e32
1 changed files with 4 additions and 4 deletions
|
@ -105,16 +105,16 @@ final class FosRestDescriber implements RouteDescriberInterface
|
|||
private function getFormat($requirements)
|
||||
{
|
||||
if ($requirements instanceof Constraint && !$requirements instanceof Regex) {
|
||||
|
||||
|
||||
if ($requirements instanceof DateTime) {
|
||||
// As defined per RFC3339
|
||||
if ($requirements->format === 'Y-m-d\TH:i:s') {
|
||||
if ('Y-m-d\TH:i:s' === $requirements->format) {
|
||||
return 'date-time';
|
||||
} else if ($requirements->format === 'Y-m-d') {
|
||||
} elseif ('Y-m-d' === $requirements->format) {
|
||||
return 'date';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$reflectionClass = new \ReflectionClass($requirements);
|
||||
|
||||
return $reflectionClass->getShortName();
|
||||
|
|
Loading…
Add table
Reference in a new issue