Rev 1116 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1116 | Rev 1121 | ||
---|---|---|---|
Line 228... | Line 228... | ||
228 | * @param $to |
228 | * @param $to |
229 | * @return int|null |
229 | * @return int|null |
230 | */ |
230 | */ |
231 | public function distance($to) { |
231 | public function distance($to) { |
232 | if (!is_object($to)) $to = OIDplusObject::parse($to); |
232 | if (!is_object($to)) $to = OIDplusObject::parse($to); |
- | 233 | if (!$to) return null; |
|
233 | if (!($to instanceof $this)) return null; |
234 | if (!($to instanceof $this)) return null; |
234 | 235 | ||
235 | $a = $to->doi; |
236 | $a = $to->doi; |
236 | $b = $this->doi; |
237 | $b = $this->doi; |
237 | 238 |