Changeset View
Changeset View
Standalone View
Standalone View
src/applications/phame/storage/PhamePost.php
Show First 20 Lines • Show All 61 Lines • ▼ Show 20 Lines | final class PhamePost extends PhameDAO | ||||
public function getMonogram() { | public function getMonogram() { | ||||
return 'J'.$this->getID(); | return 'J'.$this->getID(); | ||||
} | } | ||||
public function getLiveURI() { | public function getLiveURI() { | ||||
$blog = $this->getBlog(); | $blog = $this->getBlog(); | ||||
$is_draft = $this->isDraft(); | $is_draft = $this->isDraft(); | ||||
$is_archived = $this->isArchived(); | $is_archived = $this->isArchived(); | ||||
if (strlen($blog->getDomain()) && !$is_draft && !$is_archived) { | if (phutil_nonempty_string($blog->getDomain()) && | ||||
!$is_draft && !$is_archived) { | |||||
valerio.bozzolan: ✅ I verified the above line
The line was split so to make the linter happy.
I verified that… | |||||
return $this->getExternalLiveURI(); | return $this->getExternalLiveURI(); | ||||
} else { | } else { | ||||
return $this->getInternalLiveURI(); | return $this->getInternalLiveURI(); | ||||
} | } | ||||
} | } | ||||
public function getExternalLiveURI() { | public function getExternalLiveURI() { | ||||
$id = $this->getID(); | $id = $this->getID(); | ||||
▲ Show 20 Lines • Show All 326 Lines • Show Last 20 Lines |
Content licensed under Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) unless otherwise noted; code licensed under Apache 2.0 or other open source licenses. · CC BY-SA 4.0 · Apache 2.0
✅ I verified the above line
The line was split so to make the linter happy.
I verified that $blog->getDomain() is never a PhutilURI but always is null or a string provided by the user.
The function phutil_nonempty_string() will report any alien type, and that is OK.