Rev 1121 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1121 | Rev 1130 | ||
---|---|---|---|
Line 22... | Line 22... | ||
22 | // phpcs:disable PSR1.Files.SideEffects |
22 | // phpcs:disable PSR1.Files.SideEffects |
23 | \defined('INSIDE_OIDPLUS') or die; |
23 | \defined('INSIDE_OIDPLUS') or die; |
24 | // phpcs:enable PSR1.Files.SideEffects |
24 | // phpcs:enable PSR1.Files.SideEffects |
25 | 25 | ||
26 | class OIDplusOther extends OIDplusObject { |
26 | class OIDplusOther extends OIDplusObject { |
- | 27 | /** |
|
- | 28 | * @var string |
|
- | 29 | */ |
|
27 | private $other; |
30 | private $other; |
28 | 31 | ||
29 | /** |
32 | /** |
30 | * @param $other |
33 | * @param string $other |
31 | */ |
34 | */ |
32 | public function __construct($other) { |
35 | public function __construct(string $other) { |
33 | // No syntax checks |
36 | // No syntax checks |
34 | $this->other = $other; |
37 | $this->other = $other; |
35 | } |
38 | } |
36 | 39 | ||
37 | /** |
40 | /** |
Line 198... | Line 201... | ||
198 | 201 | ||
199 | return self::parse(self::ns().':'.$oid_up); |
202 | return self::parse(self::ns().':'.$oid_up); |
200 | } |
203 | } |
201 | 204 | ||
202 | /** |
205 | /** |
203 | * @param $to |
206 | * @param OIDplusObject|string $to |
204 | * @return int|null |
207 | * @return int|null |
205 | */ |
208 | */ |
206 | public function distance($to) { |
209 | public function distance($to) { |
207 | if (!is_object($to)) $to = OIDplusObject::parse($to); |
210 | if (!is_object($to)) $to = OIDplusObject::parse($to); |
208 | if (!$to) return null; |
211 | if (!$to) return null; |