| Conditions | 4 |
| Paths | 8 |
| Total Lines | 9 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 34 | public function checkConfigTimeDiff($configName, $timeDiff, $callable, $configType = WATCHDOG_TIME_UNIX, $forceLoad = false) { |
||
| 35 | $configValue = $forceLoad ? $this->config->db_loadItem($configName) : $this->config[$configName]; |
||
| 36 | $configType == WATCHDOG_TIME_SQL ? $configValue = strtotime($configValue, SN_TIME_NOW) : false; |
||
| 37 | |||
| 38 | if(SN_TIME_NOW - $configValue > $timeDiff) { |
||
| 39 | $callable(); |
||
| 40 | } |
||
| 41 | |||
| 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@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.