Conditions | 4 |
Paths | 8 |
Total Lines | 14 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
25 | public function creating(Docs $docs): void |
||
26 | { |
||
27 | if (! $docs->github_org) { |
||
|
|||
28 | $docs->github_org = self::DEFAULT_GITHUB_ORG; |
||
29 | } |
||
30 | |||
31 | if (! $docs->github_repo) { |
||
32 | $docs->github_repo = self::DEFAULT_GITHUB_REPO; |
||
33 | } |
||
34 | |||
35 | if (! $docs->github_branch) { |
||
36 | $docs->github_branch = self::DEFAULT_GITHUB_BRANCH; |
||
37 | } |
||
38 | } |
||
39 | } |
Since your code implements the magic getter
_get
, this function will be called for any read access on an undefined variable. You can add the@property
annotation to your class or interface to document the existence of this variable.If the property has read access only, you can use the @property-read annotation instead.
Of course, you may also just have mistyped another name, in which case you should fix the error.
See also the PhpDoc documentation for @property.