Skip to content

Commit 40c5b05

Browse files
committed
don't use one-line var docblocks;
don't include varname in var docblock;
1 parent 612d655 commit 40c5b05

File tree

8 files changed

+114
-39
lines changed

8 files changed

+114
-39
lines changed

src/phpDocumentor/Reflection/Php/Argument.php

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,24 @@ final class Argument
2424
*/
2525
private $name = null;
2626

27-
/** @var string[] $type an array of normalized types that should be in this Argument */
27+
/**
28+
* @var mixed[] an array of normalized types that should be in this Argument
29+
*/
2830
private $types = [];
2931

30-
/** @var string|null $default the default value for an argument or null if none is provided */
32+
/**
33+
* @var string|null the default value for an argument or null if none is provided
34+
*/
3135
private $default = null;
3236

33-
/** @var bool $byReference whether the argument passes the parameter by reference instead of by value */
37+
/**
38+
* @var bool whether the argument passes the parameter by reference instead of by value
39+
*/
3440
private $byReference = false;
3541

36-
/** @var boolean Determines if this Argument represents a variadic argument */
42+
/**
43+
* @var boolean Determines if this Argument represents a variadic argument
44+
*/
3745
private $isVariadic = false;
3846

3947
/**

src/phpDocumentor/Reflection/Php/Class_.php

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,30 +36,44 @@ final class Class_ implements Element
3636
*/
3737
private $docBlock = null;
3838

39-
/** @var boolean $abstract Whether this is an abstract class. */
39+
/**
40+
* @var boolean Whether this is an abstract class.
41+
*/
4042
private $abstract = false;
4143

42-
/** @var boolean $final Whether this class is marked as final and can't be subclassed. */
44+
/**
45+
* @var boolean Whether this class is marked as final and can't be subclassed.
46+
*/
4347
private $final = false;
4448

4549
/**
4650
* @var null|Fqsen The class this class is extending.
4751
*/
4852
private $parent = null;
4953

50-
/** @var Fqsen[] $implements References to interfaces that are implemented by this class. */
54+
/**
55+
* @var Fqsen[] References to interfaces that are implemented by this class.
56+
*/
5157
private $implements = [];
5258

53-
/** @var Constant[] $constants References to constants defined in this class. */
59+
/**
60+
* @var Constant[] References to constants defined in this class.
61+
*/
5462
private $constants = [];
5563

56-
/** @var Property[] $properties References to properties defined in this class. */
64+
/**
65+
* @var Property[] References to properties defined in this class.
66+
*/
5767
private $properties = [];
5868

59-
/** @var Method[] $methods References to methods defined in this class. */
69+
/**
70+
* @var Method[] References to methods defined in this class.
71+
*/
6072
private $methods = [];
6173

62-
/** @var Fqsen[] $usedTraits References to traits consumed by this class */
74+
/**
75+
* @var Fqsen[] References to traits consumed by this class
76+
*/
6377
private $usedTraits = [];
6478

6579
/**

src/phpDocumentor/Reflection/Php/Factory/PropertyIterator.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@ final class PropertyIterator implements Iterator
3131
*/
3232
private $property;
3333

34-
/** @var int index of the current propertyProperty to use */
34+
/**
35+
* @var int index of the current propertyProperty to use
36+
*/
3537
private $index = 0;
3638

3739
/**

src/phpDocumentor/Reflection/Php/File.php

Lines changed: 33 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -27,43 +27,64 @@ final class File
2727
*/
2828
private $docBlock = null;
2929

30-
/** @var string $hash */
30+
/**
31+
* @var string
32+
*/
3133
private $hash;
3234

33-
/** @var string $name */
35+
/**
36+
* @var string
37+
*/
3438
private $name = null;
3539

36-
/** @var string $path */
40+
/**
41+
* @var string
42+
*/
3743
private $path = null;
3844

39-
/** @var string $source */
45+
/**
46+
* @var string
47+
*/
4048
private $source = null;
4149

42-
/** @var Fqsen[] $namespaces */
50+
/**
51+
* @var Fqsen[]
52+
*/
4353
private $namespaces = [];
4454

45-
/** @var string[] $includes */
55+
/**
56+
* @var string[]
57+
*/
4658
private $includes = [];
4759

48-
/** @var Function_[] $functions */
60+
/**
61+
* @var Function_[]
62+
*/
4963
private $functions = [];
5064

51-
/** @var Constant[] $constants */
65+
/**
66+
* @var Constant[]
67+
*/
5268
private $constants = [];
5369

54-
/** @var Class_[] $classes */
70+
/**
71+
* @var Class_[]
72+
*/
5573
private $classes = [];
5674

57-
/** @var Interface_[] $interfaces */
75+
/**
76+
* @var Interface_[]
77+
*/
5878
private $interfaces = [];
5979

60-
/** @var Trait_[] $traits */
80+
/**
81+
* @var Trait_[]
82+
*/
6183
private $traits = [];
6284

6385
/**
6486
* Initializes a new file descriptor with the given hash of its contents.
6587
*
66-
*
6788
* @param string $hash An MD5 hash of the contents if this file.
6889
*/
6990
public function __construct(string $hash, string $path, string $source = '', ?DocBlock $docBlock = null)

src/phpDocumentor/Reflection/Php/Interface_.php

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,19 @@ final class Interface_ implements Element
3636
*/
3737
private $docBlock;
3838

39-
/** @var Constant[] $constants */
39+
/**
40+
* @var Constant[]
41+
*/
4042
private $constants = [];
4143

42-
/** @var Method[] $methods */
44+
/**
45+
* @var Method[]
46+
*/
4347
private $methods = [];
4448

45-
/** @var Fqsen[] $parents */
49+
/**
50+
* @var Fqsen[]
51+
*/
4652
private $parents = [];
4753

4854
/**

src/phpDocumentor/Reflection/Php/Method.php

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,19 +36,29 @@ final class Method implements Element
3636
*/
3737
private $fqsen;
3838

39-
/** @var bool $abstract */
39+
/**
40+
* @var bool
41+
*/
4042
private $abstract = false;
4143

42-
/** @var bool $final */
44+
/**
45+
* @var bool
46+
*/
4347
private $final = false;
4448

45-
/** @var bool $static */
49+
/**
50+
* @var bool
51+
*/
4652
private $static = false;
4753

48-
/** @var null|Visibility visibility of this method */
54+
/**
55+
* @var null|Visibility visibility of this method
56+
*/
4957
private $visibility = null;
5058

51-
/** @var Argument[] */
59+
/**
60+
* @var Argument[]
61+
*/
5262
private $arguments = [];
5363

5464
/**

src/phpDocumentor/Reflection/Php/Namespace_.php

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,19 +29,29 @@ final class Namespace_ implements Element
2929
*/
3030
private $fqsen;
3131

32-
/** @var Fqsen[] $functions fqsen of all functions in this namespace */
32+
/**
33+
* @var Fqsen[] fqsen of all functions in this namespace
34+
*/
3335
private $functions = [];
3436

35-
/** @var Fqsen[] $constants fqsen of all constants in this namespace */
37+
/**
38+
* @var Fqsen[] fqsen of all constants in this namespace
39+
*/
3640
private $constants = [];
3741

38-
/** @var Fqsen[] $classes fqsen of all classes in this namespace */
42+
/**
43+
* @var Fqsen[] fqsen of all classes in this namespace
44+
*/
3945
private $classes = [];
4046

41-
/** @var Fqsen[] $interfaces fqsen of all interfaces in this namespace */
47+
/**
48+
* @var Fqsen[] fqsen of all interfaces in this namespace
49+
*/
4250
private $interfaces = [];
4351

44-
/** @var Fqsen[] $traits fqsen of all traits in this namespace */
52+
/**
53+
* @var Fqsen[] fqsen of all traits in this namespace
54+
*/
4555
private $traits = [];
4656

4757
/**

src/phpDocumentor/Reflection/Php/Project.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,14 @@
2222
*/
2323
final class Project implements ProjectInterface
2424
{
25-
/** @var string $name */
25+
/**
26+
* @var string
27+
*/
2628
private $name = '';
2729

28-
/** @var Namespace_|null */
30+
/**
31+
* @var Namespace_|null
32+
*/
2933
private $rootNamespace;
3034

3135
/**

0 commit comments

Comments
 (0)