From: <var...@us...> - 2014-11-15 17:44:59
|
Revision: 9312 http://sourceforge.net/p/phpwiki/code/9312 Author: vargenau Date: 2014-11-15 17:44:51 +0000 (Sat, 15 Nov 2014) Log Message: ----------- PHP Doc Modified Paths: -------------- trunk/lib/Units.php Modified: trunk/lib/Units.php =================================================================== --- trunk/lib/Units.php 2014-11-15 17:38:49 UTC (rev 9311) +++ trunk/lib/Units.php 2014-11-15 17:44:51 UTC (rev 9312) @@ -35,6 +35,9 @@ /** * $this->_attribute_base = $units->Definition($this->_attribute); + * + * @param string $query + * @return string */ function Definition($query) { @@ -67,10 +70,15 @@ * We must ensure that the same baseunits are matched against. * We cannot compare m^2 to m or '' * $val_base = $this->_units->basevalue($value); // SemanticAttributeSearchQuery + * + * @param string $query + * @param bool $def + * @return bool|string */ function basevalue($query, $def = false) { - if (!$def) $def = $this->Definition($query); + if (!$def) + $def = $this->Definition($query); if ($def) { if (is_numeric($def)) // e.g. "1 million" return $def; @@ -83,10 +91,15 @@ /** * $this->_unit = $units->baseunit($this->_attribute); // SemanticAttributeSearchQuery * and Cached_SemanticLink::_expandurl() + * + * @param string $query + * @param bool $def + * @return string */ function baseunit($query, $def = false) { - if (!$def) $def = $this->Definition($query); + if (!$def) + $def = $this->Definition($query); if ($def) { if (preg_match("/ (.+)$/", $def, $m)) return $m[1]; @@ -96,7 +109,8 @@ function _cmd($args) { - if ($this->errcode) return $args; + if ($this->errcode) + return $args; if (defined("UNITS_EXE")) { $s = UNITS_EXE . " $args"; $result = `$s`; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |