@@ -604,9 +604,6 @@ single parameter of a function or method. When provided it MUST contain a
604
604
@param tags are omitted due to all useful info already being visible in the
605
605
code signature itself. The description is OPTIONAL yet RECOMMENDED.
606
606
607
- The @param tag MAY have a multi-line description and does not need explicit
608
- delimiting.
609
-
610
607
It is RECOMMENDED when documenting to use this tag with every function and
611
608
method.
612
609
@@ -693,16 +690,10 @@ function or method. When provided, it MUST contain a "Type"
693
690
to indicate what is returned; the description on the other hand is OPTIONAL yet
694
691
RECOMMENDED in case of complicated return structures, such as associative arrays.
695
692
696
- The @return tag MAY have a multi-line description and does not need explicit
697
- delimiting.
698
-
699
- It is RECOMMENDED to use this tag with every function and method. An exception to
700
- this recommendation, as defined by the Coding Standard of any individual project,
701
- MAY be:
702
-
703
- ** functions and methods without a ` return ` value** : the @return tag MAY be
704
- omitted here, in which case an interpreter MUST interpret this as if
705
- ` @return void ` is provided.
693
+ It is RECOMMENDED to use this tag with every function and method.
694
+ If no ` @return ` type is given, and no return type declaration is provided in
695
+ the code signature, an interpreter MUST interpret this as if ` @return mixed `
696
+ is provided.
706
697
707
698
This tag MUST NOT occur more than once in a "DocBlock" and is limited to the
708
699
"DocBlock" of a "Structural Element" of a method or function.
@@ -748,9 +739,7 @@ element (also called the "FQSEN").
748
739
A URI MUST be complete and well-formed as specified in [ RFC 2396] [ RFC2396 ] .
749
740
750
741
The @see tag SHOULD have a description to provide additional information
751
- regarding the relationship between the element and its target. Additionally, the
752
- @see tag MAY have a tag specialization to add further definition to this
753
- relationship.
742
+ regarding the relationship between the element and its target.
754
743
755
744
#### Examples
756
745
@@ -789,8 +778,8 @@ This information can be used to generate a set of API Documentation where the
789
778
consumer is informed which application version is necessary for a specific
790
779
element.
791
780
792
- The @since tag SHOULD NOT be used to show the current version of an element, the
793
- @version tag MAY be used for that purpose.
781
+ The @since tag SHOULD NOT be used to show the current version of an element...
782
+ the @version tag SHOULD be used for that purpose.
794
783
795
784
#### Examples
796
785
@@ -901,28 +890,24 @@ Indicates whether the current "Structural Element" consumes the
901
890
902
891
#### Syntax
903
892
904
- @uses [file | "FQSEN"] [<description>]
893
+ @uses ["FQSEN"] [<description>]
905
894
906
895
#### Description
907
896
908
- The ` @uses ` tag describes whether any part of the associated "Structural Element"
909
- uses, or consumes, another "Structural Element" or a file that is situated in
897
+ The ` @uses ` tag describes whether any part of the associated "Structural
898
+ Element" uses, or consumes, another "Structural Element" that is situated in
910
899
the current project.
911
900
912
901
When defining a reference to another "Structural Element" you can refer to a
913
902
specific element by appending a double colon and providing the name of that
914
903
element (also called the "FQSEN").
915
904
916
- Files that are contained in this project can be referred to by this tag. This
917
- can be used, for example, to indicate a relationship between a Controller and
918
- a template file (as View).
919
-
920
905
This tag MUST NOT be used to indicate relations to elements outside of the
921
906
system, so URLs are not usable. To indicate relations with outside elements the
922
907
@see tag can be used.
923
908
924
909
Applications consuming this tag, such as generators, are RECOMMENDED to provide
925
- a ` @used-by ` tag on the destination element. This can be used to provide a
910
+ a ` @usedby ` tag on the destination element. This can be used to provide a
926
911
bi-directional experience and allow for static analysis.
927
912
928
913
#### Examples
@@ -969,9 +954,9 @@ Each Constant or Property definition or Variable where the type is ambiguous
969
954
or unknown SHOULD be preceded by a DocBlock containing the @var tag. Any
970
955
other variable MAY be preceded with a DocBlock containing the @var tag.
971
956
972
- The @var tag MUST contain the name of the element it documents. An exception
973
- to this is when property declarations only refer to a single property. In this
974
- case the name of the property MAY be omitted.
957
+ The @var tag MUST contain the name of the element it documents, unless this
958
+ property declaration only refers to a single property. In this case the name of
959
+ the property MAY be omitted.
975
960
976
961
` element_name ` is used when compound statements are used to define a series of Constants
977
962
or Properties. Such a compound statement can only have one DocBlock while several
992
977
``` php
993
978
class Foo
994
979
{
995
- /** @var string|null Should contain a description */
980
+ /**
981
+ * @var string|null Should contain a description
982
+ */
996
983
protected $description = null;
997
984
998
985
public function setDescription($description)
@@ -1015,7 +1002,20 @@ foreach ($connections as $sqlite) {
1015
1002
}
1016
1003
```
1017
1004
1018
- Even compound statements may be documented:
1005
+ Even compound statements may be documented... these two property blocks are
1006
+ equivalent:
1007
+
1008
+ ``` php
1009
+ class Foo
1010
+ {
1011
+ /**
1012
+ * @var string $name Should contain a description
1013
+ * @var string $description Should contain a description
1014
+ */
1015
+ protected $name, $description;
1016
+
1017
+ }
1018
+ ```
1019
1019
1020
1020
``` php
1021
1021
class Foo
0 commit comments