This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
`return $this` causes a method to return its own object. 1) When this code is used and PHP Doc comments are then added, NetBeans automatically puts `@return $this` which, as far as I understand it, is not valid PhpDoc usage. Rather it should be `@return self` or `@return TheNameOfTheClass` 2) If a return type declaration is attempted in the PHP, e.g. `public function MyMethod(): self`, then once the colon has been typed and code completion is requested the six data types are suggested and the names of classes, but not `self`. 3) If `self` is added manually and PHP Doc comments are then added, NetBeans will treat `self` as it is the name of a class, meaning that if you're in a namespace, it will prepend a backslash for the root namespace i.e. `@return \self`, which again is not correct documentation. It seems that NetBeans does not recognise the keyword `self` as a return-type alias for the current class.