Conditions | 2 |
Paths | 2 |
Total Lines | 22 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
1 | <?php |
||
21 | protected function processInfo(Template\Asset\Block $info) { |
||
22 | |||
23 | # Set times |
||
24 | |||
25 | $info->time_created = Date::get(DATE_FORMAT_DATETIME, @filectime($this->entity->pathFull())); |
||
|
|||
26 | |||
27 | $info->time_modified = Date::get(DATE_FORMAT_DATETIME, @filemtime($this->entity->pathFull())); |
||
28 | |||
29 | # Set permissions |
||
30 | |||
31 | $info->permissions = @fileperms($this->entity->pathFull()); |
||
32 | |||
33 | # Set size |
||
34 | |||
35 | $info->size = Number::size(@filesize($this->entity->pathFull())); |
||
36 | |||
37 | # Set MIME type |
||
38 | |||
39 | $mime = Mime::get(strtolower(Explorer::extension($this->entity->name(), false))); |
||
40 | |||
41 | $info->mime = ((false !== $mime) ? $mime : '-'); |
||
42 | } |
||
43 | } |
||
45 |
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@property
annotation 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.