Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F3749248
D1544.id3940.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
752 B
Referenced Files
None
Subscribers
None
D1544.id3940.diff
View Options
diff --git a/app/Phabricator/PhabricatorStory.php b/app/Phabricator/PhabricatorStory.php
--- a/app/Phabricator/PhabricatorStory.php
+++ b/app/Phabricator/PhabricatorStory.php
@@ -123,13 +123,17 @@
/// Helper methods
///
+ private function hasVoidObjectType () : bool {
+ return $this->data === null || !isset($this->data['objectPHID']);
+ }
+
/**
* Gets object type (e.g. TASK for PHID-TASK-l34fw5wievp6n6rnvpuk)
*
* @return string The object type, as a 4 letters string (e.g. 'TASK')
*/
public function getObjectType () {
- if ($this->data === null || !array_key_exists('objectPHID', $this->data)) {
+ if ($this->hasVoidObjectType()) {
return 'VOID';
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Nov 17, 13:54 (21 h, 17 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2249284
Default Alt Text
D1544.id3940.diff (752 B)
Attached To
Mode
D1544: Extract complex condition in its own method
Attached
Detach File
Event Timeline
Log In to Comment