Permalink
Browse files

changes from automatic review

  • Loading branch information...
1 parent 9aa006b commit 76a115e74402c4b61a0d333a4d8f387ce2dbc972 @JMSBot JMSBot committed Nov 14, 2012
Showing with 297 additions and 358 deletions.
  1. +1 −1 Annotation/AccessType.php
  2. +1 −1 Annotation/Accessor.php
  3. +1 −1 Annotation/AccessorOrder.php
  4. +1 −1 Annotation/Exclude.php
  5. +1 −1 Annotation/ExclusionPolicy.php
  6. +1 −1 Annotation/Expose.php
  7. +1 −3 Annotation/Groups.php
  8. +1 −1 Annotation/HandlerCallback.php
  9. +1 −1 Annotation/Inline.php
  10. +1 −1 Annotation/PostDeserialize.php
  11. +1 −1 Annotation/PostSerialize.php
  12. +1 −1 Annotation/PreSerialize.php
  13. +1 −1 Annotation/ReadOnly.php
  14. +1 −1 Annotation/SerializedName.php
  15. +1 −1 Annotation/Since.php
  16. +1 −3 Annotation/Type.php
  17. +1 −1 Annotation/Until.php
  18. +1 −3 Annotation/Version.php
  19. +1 −1 Annotation/VirtualProperty.php
  20. +1 −1 Annotation/XmlAttribute.php
  21. +1 −3 Annotation/XmlCollection.php
  22. +1 −1 Annotation/XmlList.php
  23. +1 −3 Annotation/XmlMap.php
  24. +1 −3 Annotation/XmlRoot.php
  25. +1 −1 Annotation/XmlValue.php
  26. +1 −3 DependencyInjection/Compiler/CustomHandlersPass.php
  27. +3 −3 DependencyInjection/Compiler/RegisterEventListenersAndSubscribersPass.php
  28. +1 −1 DependencyInjection/Compiler/SetVisitorsPass.php
  29. +1 −1 Exception/Exception.php
  30. +1 −1 Exception/InvalidArgumentException.php
  31. +1 −1 Exception/RuntimeException.php
  32. +1 −1 Exception/UnsupportedFormatException.php
  33. +1 −1 Exception/XmlErrorException.php
  34. +0 −9 JMSSerializerBundle.php
  35. +6 −1 Metadata/ClassMetadata.php
  36. +31 −38 Metadata/Driver/AnnotationDriver.php
  37. +3 −3 Metadata/Driver/PhpDriver.php
  38. +3 −4 Metadata/Driver/XmlDriver.php
  39. +6 −7 Metadata/Driver/YamlDriver.php
  40. +1 −2 Metadata/PropertyMetadata.php
  41. +1 −1 Serializer/AbstractVisitor.php
  42. +2 −3 Serializer/Construction/DoctrineObjectConstructor.php
  43. +2 −2 Serializer/Construction/ObjectConstructorInterface.php
  44. +1 −1 Serializer/Construction/UnserializeObjectConstructor.php
  45. +1 −2 Serializer/EventDispatcher/Event.php
  46. +4 −1 Serializer/EventDispatcher/EventDispatcher.php
  47. +4 −1 Serializer/EventDispatcher/EventDispatcherInterface.php
  48. +1 −1 Serializer/EventDispatcher/EventSubscriberInterface.php
  49. +2 −2 Serializer/EventDispatcher/Events.php
  50. +1 −1 Serializer/EventDispatcher/LazyEventDispatcher.php
  51. +4 −1 Serializer/EventDispatcher/PreSerializeEvent.php
  52. +1 −1 Serializer/EventDispatcher/Subscriber/DoctrineProxySubscriber.php
  53. +4 −4 Serializer/Exclusion/ExclusionStrategyInterface.php
  54. +0 −1 Serializer/Exclusion/GroupsExclusionStrategy.php
  55. +0 −2 Serializer/GenericDeserializationVisitor.php
  56. +6 −2 Serializer/GenericSerializationVisitor.php
  57. +3 −3 Serializer/GraphNavigator.php
  58. +32 −34 Serializer/Handler/ConstraintViolationHandler.php
  59. +13 −20 Serializer/Handler/DateTimeHandler.php
  60. +55 −57 Serializer/Handler/FormErrorHandler.php
  61. +1 −1 Serializer/Handler/HandlerRegistry.php
  62. +1 −1 Serializer/Handler/HandlerRegistryInterface.php
  63. +1 −1 Serializer/Handler/LazyHandlerRegistry.php
  64. +4 −1 Serializer/Handler/SubscribingHandlerInterface.php
  65. +1 −1 Serializer/JsonDeserializationVisitor.php
  66. +1 −1 Serializer/JsonSerializationVisitor.php
  67. +1 −1 Serializer/LazyLoadingSerializer.php
  68. +1 −1 Serializer/Naming/CacheNamingStrategy.php
  69. +1 −1 Serializer/Naming/CamelCaseNamingStrategy.php
  70. +2 −2 Serializer/Naming/PropertyNamingStrategyInterface.php
  71. +1 −2 Serializer/Naming/SerializedNameAnnotationStrategy.php
  72. +0 −3 Serializer/Serializer.php
  73. +3 −3 Serializer/SerializerInterface.php
  74. +30 −21 Serializer/TypeParser.php
  75. +15 −14 Serializer/VisitorInterface.php
  76. +0 −2 Serializer/XmlDeserializationVisitor.php
  77. +0 −1 Serializer/XmlSerializationVisitor.php
  78. +5 −2 Serializer/YamlSerializationVisitor.php
  79. +0 −1 Tests/DependencyInjection/JMSSerializerExtensionTest.php
  80. +0 −1 Tests/Metadata/Driver/BaseDriverTest.php
  81. +0 −1 Tests/Metadata/Driver/php/AuthorReadOnly.php
  82. +0 −1 Tests/Metadata/Driver/php/ObjectWithVirtualPropertiesAndExcludeAll.php
  83. +0 −14 Tests/PerformanceTest.php
  84. +0 −5 Tests/Serializer/BaseSerializationTest.php
  85. +0 −1 Tests/Serializer/EventDispatcher/EventDispatcherTest.php
  86. +0 −4 Tests/Serializer/GraphNavigatorTest.php
  87. +0 −7 Tests/Serializer/JsonSerializationTest.php
  88. +0 −9 Tests/Serializer/XmlSerializationTest.php
  89. +0 −1 Tests/Serializer/YamlSerializationTest.php
  90. +7 −1 Util/Writer.php
@@ -15,4 +15,4 @@
* @var string
*/
public $type;
-}
+}
View
@@ -19,4 +19,4 @@
* @var string
*/
public $setter;
-}
+}
@@ -21,4 +21,4 @@
* @var array<string>
*/
public $custom = array();
-}
+}
View
@@ -24,4 +24,4 @@
*/
final class Exclude
{
-}
+}
@@ -43,4 +43,4 @@ public function __construct(array $values)
throw new RuntimeException('Exclusion policy must either be "ALL", or "NONE".');
}
}
-}
+}
View
@@ -24,4 +24,4 @@
*/
final class Expose
{
-}
+}
View
@@ -18,8 +18,6 @@
namespace JMS\SerializerBundle\Annotation;
-use JMS\SerializerBundle\Exception\InvalidArgumentException;
-
/**
* @Annotation
* @Target({"PROPERTY","METHOD"})
@@ -28,4 +26,4 @@
{
/** @var array<string> @Required */
public $groups;
-}
+}
@@ -21,4 +21,4 @@
* @var string
*/
public $direction;
-}
+}
View
@@ -24,4 +24,4 @@
*/
final class Inline
{
-}
+}
@@ -30,4 +30,4 @@
*/
final class PostDeserialize
{
-}
+}
@@ -24,4 +24,4 @@
*/
final class PostSerialize
{
-}
+}
@@ -31,4 +31,4 @@
*/
final class PreSerialize
{
-}
+}
View
@@ -24,4 +24,4 @@
*/
final class ReadOnly
{
-}
+}
@@ -36,4 +36,4 @@ public function __construct(array $values)
$this->name = $values['value'];
}
-}
+}
View
@@ -24,4 +24,4 @@
*/
final class Since extends Version
{
-}
+}
View
@@ -18,8 +18,6 @@
namespace JMS\SerializerBundle\Annotation;
-use JMS\SerializerBundle\Exception\RuntimeException;
-
/**
* @Annotation
* @Target("PROPERTY")
@@ -31,4 +29,4 @@
* @var string
*/
public $name;
-}
+}
View
@@ -24,4 +24,4 @@
*/
final class Until extends Version
{
-}
+}
View
@@ -18,13 +18,11 @@
namespace JMS\SerializerBundle\Annotation;
-use JMS\SerializerBundle\Exception\RuntimeException;
-
abstract class Version
{
/**
* @Required
* @var string
*/
public $version;
-}
+}
@@ -10,4 +10,4 @@
*/
final class VirtualProperty
{
-}
+}
@@ -24,4 +24,4 @@
*/
final class XmlAttribute
{
-}
+}
@@ -18,8 +18,6 @@
namespace JMS\SerializerBundle\Annotation;
-use JMS\SerializerBundle\Exception\InvalidArgumentException;
-
abstract class XmlCollection
{
/**
@@ -31,4 +29,4 @@
* @var boolean
*/
public $inline = false;
-}
+}
View
@@ -24,4 +24,4 @@
*/
final class XmlList extends XmlCollection
{
-}
+}
View
@@ -18,8 +18,6 @@
namespace JMS\SerializerBundle\Annotation;
-use JMS\SerializerBundle\Exception\InvalidArgumentException;
-
/**
* @Annotation
* @Target({"PROPERTY","METHOD"})
@@ -30,4 +28,4 @@
* @var string
*/
public $keyAttribute = '_key';
-}
+}
View
@@ -18,8 +18,6 @@
namespace JMS\SerializerBundle\Annotation;
-use JMS\SerializerBundle\Exception\RuntimeException;
-
/**
* @Annotation
* @Target("CLASS")
@@ -31,4 +29,4 @@
* @var string
*/
public $name;
-}
+}
View
@@ -24,4 +24,4 @@
*/
final class XmlValue
{
-}
+}
@@ -3,9 +3,7 @@
namespace JMS\SerializerBundle\DependencyInjection\Compiler;
use JMS\SerializerBundle\Serializer\Handler\HandlerRegistry;
-
use JMS\SerializerBundle\Serializer\GraphNavigator;
-
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
@@ -63,4 +61,4 @@ public function process(ContainerBuilder $container)
$container->getDefinition('jms_serializer.handler_registry')
->addArgument($handlers);
}
-}
+}
@@ -32,11 +32,11 @@ public function process(ContainerBuilder $container)
}
foreach ($container->findTaggedServiceIds('jms_serializer.event_subscriber') as $id => $tags) {
- $subscriberDefinition = $container->getDefinition($id);
+ $subscriberDefinition = $container->getDefinition($id);
$subscriberClass = $container->getDefinition($id)->getClass();
-
+
$subscriberClassReflectionObj = new \ReflectionClass($subscriberClass);
-
+
if ( ! $subscriberClassReflectionObj->implementsInterface('JMS\SerializerBundle\Serializer\EventDispatcher\EventSubscriberInterface') ) {
throw new \RuntimeException(sprintf('The service "%s" (class: %s) does not implement the EventSubscriberInterface.', $id, $subscriberClass));
}
@@ -66,4 +66,4 @@ public function process(ContainerBuilder $container)
;
}
}
-}
+}
View
@@ -25,4 +25,4 @@
*/
interface Exception
{
-}
+}
@@ -25,4 +25,4 @@
*/
class InvalidArgumentException extends \InvalidArgumentException implements Exception
{
-}
+}
@@ -25,4 +25,4 @@
*/
class RuntimeException extends \RuntimeException implements Exception
{
-}
+}
@@ -20,4 +20,4 @@
class UnsupportedFormatException extends InvalidArgumentException
{
-}
+}
@@ -50,4 +50,4 @@ public function getXmlError()
{
return $this->xmlError;
}
-}
+}
View
@@ -19,18 +19,9 @@
namespace JMS\SerializerBundle;
use Symfony\Component\DependencyInjection\Compiler\PassConfig;
-
use JMS\SerializerBundle\DependencyInjection\Compiler\SetVisitorsPass;
use JMS\SerializerBundle\DependencyInjection\Compiler\CustomHandlersPass;
use JMS\SerializerBundle\DependencyInjection\Compiler\RegisterEventListenersAndSubscribersPass;
-use JMS\SerializerBundle\DependencyInjection\Factory\FormErrorFactory;
-use JMS\SerializerBundle\DependencyInjection\Factory\DateTimeFactory;
-use JMS\SerializerBundle\DependencyInjection\Factory\ConstraintViolationFactory;
-use JMS\SerializerBundle\DependencyInjection\Factory\ArrayCollectionFactory;
-use JMS\SerializerBundle\DependencyInjection\Factory\ObjectBasedFactory;
-use JMS\SerializerBundle\DependencyInjection\Factory\DoctrineProxyFactory;
-use JMS\SerializerBundle\DependencyInjection\JMSSerializerExtension;
-use Symfony\Component\HttpKernel\KernelInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\HttpKernel\Bundle\Bundle;
@@ -87,6 +87,11 @@ public function addPostDeserializeMethod(MethodMetadata $method)
$this->postDeserializeMethods[] = $method;
}
+ /**
+ * @param integer $direction
+ * @param string|integer $format
+ * @param string $methodName
+ */
public function addHandlerCallback($direction, $format, $methodName)
{
$this->handlerCallbacks[$direction][$format] = $methodName;
@@ -175,4 +180,4 @@ private function sortProperties()
break;
}
}
-}
+}
Oops, something went wrong.

0 comments on commit 76a115e

Please sign in to comment.