Is there a way to "reuse" a PHP DocBlock? -
I currently have code like this: Is there a more concise way to do this? Assume docblocks are really similar, often the case when you are overriding a legacy method, but To maintain the same signature, you can use the but your
/ ** * Such thing1 * * @return string is a thing1 * / function thing1 () {//} / ** * Such thing2 * * @return string is a thing2 * / function thing2 () {//} // More than a dozen formats
@see ....
class MyBaseModel / ** * @param boolean $ excludeDeleted soft Removed records should be excluded * / public function newQuery ($ excludeDeleted = true) {....}} MyEssifiedModel class extends MyBaseModel / ** * base newQuery overload () method so that we can query any security filter * * @see MyBaseModel :: newQuery * / public function newQuery ($ Excluded deleted = true) can be injected) {....}}
thing1 () and
thing2 () , so in that case there is no short (lazy) way to do this
Comments
Post a Comment