Changeset View
Changeset View
Standalone View
Standalone View
src/applications/ponder/constants/PonderQuestionStatus.php
Show First 20 Lines • Show All 80 Lines • ▼ Show 20 Lines | final class PonderQuestionStatus extends PonderConstants { | ||||
public static function getQuestionStatusClosedMap() { | public static function getQuestionStatusClosedMap() { | ||||
return array( | return array( | ||||
self::STATUS_CLOSED_RESOLVED, | self::STATUS_CLOSED_RESOLVED, | ||||
self::STATUS_CLOSED_OBSOLETE, | self::STATUS_CLOSED_OBSOLETE, | ||||
self::STATUS_CLOSED_INVALID, | self::STATUS_CLOSED_INVALID, | ||||
); | ); | ||||
} | } | ||||
/** | |||||
* Check whenever a Ponder question status is Closed | |||||
* | |||||
* @param $status string | |||||
* @return bool | |||||
*/ | |||||
public static function isQuestionStatusClosed($status) { | |||||
return in_array($status, self::getQuestionStatusClosedMap(), true); | |||||
} | |||||
} | } |
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