| Conditions | 4 |
| Paths | 3 |
| Total Lines | 20 |
| Code Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php namespace EmailLog\Core\Request; |
||
| 33 | public function inject_addon_install_resource( $res, $action, $args ) { |
||
| 34 | if ( 'plugin_information' !== $action || empty( $args->slug ) ) { |
||
| 35 | return $res; |
||
| 36 | } |
||
| 37 | |||
| 38 | $addon_list = new AddonList(); |
||
| 39 | $addon = $addon_list->get_addon_by_slug( $args->slug ); |
||
| 40 | |||
| 41 | if ( ! $addon ) { |
||
| 42 | return $res; |
||
| 43 | } |
||
| 44 | |||
| 45 | $res = new stdClass(); |
||
| 46 | $res->name = 'Email Log - ' . $addon->name; |
||
|
|
|||
| 47 | $res->version = ''; // TODO: Implement Version. |
||
| 48 | $res->download_link = $addon->get_download_url(); |
||
| 49 | $res->tested = false; // TODO: Implement tested up to. |
||
| 50 | |||
| 51 | return $res; |
||
| 52 | } |
||
| 53 | } |
||
| 54 |
Since your code implements the magic setter
_set, this function will be called for any write access on an undefined variable. You can add the@propertyannotation to your class or interface to document the existence of this variable.Since the property has write access only, you can use the @property-write 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.