Arne Jørgensen d5b3cc0534 [PHP] Fix date format serialization (#5754)
* [PHP] Honor Swagger/OpenAPI 'date' format

Per spec
(https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types),
DateTime instances defined as 'date' datatype need to be serialized as
defined by full-date - RFC3339, which has the format:

full-date       = date-fullyear "-" date-month "-" date-mday

ref:
https://xml2rfc.tools.ietf.org/public/rfc/html/rfc3339.html#anchor14

see #5531
fixes #5607

* [PHP] Add `date` and `date-time` serializer tests

See #5531
See #5607

* [PHP] Improve codestyle of generated code

* [PHP] Regenerate PHP Petstore sample

* [PHP] Regenerate PHP Security sample
2017-06-05 00:47:56 +08:00

18 lines
610 B
XML

<?xml version="1.0"?>
<!-- See http://pear.php.net/manual/en/package.php.php-codesniffer.annotated-ruleset.php -->
<ruleset name="PhpSwaggerCodegen">
<description>Arnes Drupal code checker</description>
<rule ref="PSR2" />
<!-- Getting rid of extra newlines at the end of generated files is not worth the trouble -->
<rule ref="PSR2.Files.EndFileNewline.TooMany">
<exclude-pattern>*</exclude-pattern>
</rule>
<!-- Avoiding generating code lines to grow too long is not worth the trouble -->
<rule ref="Generic.Files.LineLength.TooLong">
<exclude-pattern>*</exclude-pattern>
</rule>
</ruleset>