Johannes Schmitt 13 лет назад
Родитель
Сommit
19eac8cfd1

+ 4 - 1
Annotation/Exclude.php

@@ -18,7 +18,10 @@
 
 namespace JMS\SerializerBundle\Annotation;
 
-/** @Annotation */
+/**
+ * @Annotation
+ * @Target({"PROPERTY", "CLASS"})
+ */
 final class Exclude
 {
 }

+ 4 - 1
Annotation/ExclusionPolicy.php

@@ -20,7 +20,10 @@ namespace JMS\SerializerBundle\Annotation;
 
 use JMS\SerializerBundle\Exception\RuntimeException;
 
-/** @Annotation */
+/**
+ * @Annotation
+ * @Target("CLASS")
+ */
 final class ExclusionPolicy
 {
     const NONE = 'NONE';

+ 4 - 1
Annotation/Expose.php

@@ -18,7 +18,10 @@
 
 namespace JMS\SerializerBundle\Annotation;
 
-/** @Annotation */
+/**
+ * @Annotation
+ * @Target("PROPERTY")
+ */
 final class Expose
 {
 }

+ 1 - 0
Annotation/PostDeserialize.php

@@ -25,6 +25,7 @@ namespace JMS\SerializerBundle\Annotation;
  * These methods do not necessarily have to be public.
  *
  * @Annotation
+ * @Target("METHOD")
  * @author Johannes M. Schmitt <schmittjoh@gmail.com>
  */
 final class PostDeserialize

+ 4 - 1
Annotation/PostSerialize.php

@@ -18,7 +18,10 @@
 
 namespace JMS\SerializerBundle\Annotation;
 
-/** @Annotation */
+/**
+ * @Annotation
+ * @Target("METHOD")
+ */
 final class PostSerialize
 {
 }

+ 1 - 0
Annotation/PreSerialize.php

@@ -26,6 +26,7 @@ namespace JMS\SerializerBundle\Annotation;
  * preparation of the object that is necessary.
  *
  * @Annotation
+ * @Target("METHOD")
  * @author Johannes M. Schmitt <schmittjoh@gmail.com>
  */
 final class PreSerialize

+ 4 - 1
Annotation/SerializedName.php

@@ -20,7 +20,10 @@ namespace JMS\SerializerBundle\Annotation;
 
 use JMS\SerializerBundle\Exception\RuntimeException;
 
-/** @Annotation */
+/**
+ * @Annotation
+ * @Target("PROPERTY")
+ */
 final class SerializedName
 {
     public $name;

+ 4 - 1
Annotation/Since.php

@@ -18,7 +18,10 @@
 
 namespace JMS\SerializerBundle\Annotation;
 
-/** @Annotation */
+/**
+ * @Annotation
+ * @Target("PROPERTY")
+ */
 final class Since extends Version
 {
 }

+ 4 - 1
Annotation/Type.php

@@ -20,7 +20,10 @@ namespace JMS\SerializerBundle\Annotation;
 
 use JMS\SerializerBundle\Exception\RuntimeException;
 
-/** @Annotation */
+/**
+ * @Annotation
+ * @Target("PROPERTY")
+ */
 final class Type
 {
     public $name;

+ 4 - 1
Annotation/Until.php

@@ -18,7 +18,10 @@
 
 namespace JMS\SerializerBundle\Annotation;
 
-/** @Annotation */
+/**
+ * @Annotation
+ * @Target("PROPERTY")
+ */
 final class Until extends Version
 {
 }

+ 4 - 1
Annotation/XmlAttribute.php

@@ -18,7 +18,10 @@
 
 namespace JMS\SerializerBundle\Annotation;
 
-/** @Annotation */
+/**
+ * @Annotation
+ * @Target("PROPERTY")
+ */
 final class XmlAttribute
 {
 }

+ 4 - 1
Annotation/XmlList.php

@@ -18,7 +18,10 @@
 
 namespace JMS\SerializerBundle\Annotation;
 
-/** @Annotation */
+/**
+ * @Annotation
+ * @Target("PROPERTY")
+ */
 final class XmlList extends XmlCollection
 {
 }

+ 4 - 1
Annotation/XmlMap.php

@@ -20,7 +20,10 @@ namespace JMS\SerializerBundle\Annotation;
 
 use JMS\SerializerBundle\Exception\InvalidArgumentException;
 
-/** @Annotation */
+/**
+ * @Annotation
+ * @Target("PROPERTY")
+ */
 final class XmlMap extends XmlCollection
 {
     public $keyAttribute = '_key';

+ 4 - 1
Annotation/XmlRoot.php

@@ -20,7 +20,10 @@ namespace JMS\SerializerBundle\Annotation;
 
 use JMS\SerializerBundle\Exception\RuntimeException;
 
-/** @Annotation */
+/**
+ * @Annotation
+ * @Target("CLASS")
+ */
 final class XmlRoot
 {
     public $name;