Is there a way to "reuse" a PHP DocBlock? -


itemprop = "text">

I currently have code like this:

  / ** * Such thing1 * * @return string is a thing1 * / function thing1 () {//} / ** * Such thing2 * * @return string is a thing2 * / function thing2 () {//} // More than a dozen formats   

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 @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) {....}}   

but your thing1 () and thing2 () , so in that case there is no short (lazy) way to do this

Comments

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -