File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -960,7 +960,7 @@ Each Constant or Property definition or Variable where the type is ambiguous
960960or unknown SHOULD be preceded by a DocBlock containing the @var tag. Any
961961other variable MAY be preceded with a DocBlock containing the @var tag.
962962
963- The @var tag MUST contain the name of the element it documents. An exception
963+ The @var tag SHOULD contain the name of the element it documents. An exception
964964to this is when property declarations only refer to a single property. In this
965965case the name of the property MAY be omitted.
966966
983983``` php
984984class Foo
985985{
986- /** @var string|null Should contain a description */
986+ /**
987+ * @var string|null Should contain a description
988+ */
987989 protected $description = null;
988990
989991 public function setDescription($description)
@@ -998,7 +1000,7 @@ Another example is to document the variable in a foreach explicitly; many IDEs
9981000use this information to help you with auto-completion:
9991001
10001002``` php
1001- /** @var \Sqlite3 $sqlite */
1003+ /* @var \Sqlite3 $sqlite */
10021004foreach ($connections as $sqlite) {
10031005 // there should be no docblock here
10041006 $sqlite->open('/my/database/path');
You can’t perform that action at this time.
0 commit comments