More code cleanup
This commit is contained in:
@ -244,7 +244,7 @@ class Broadcast extends Post_Base_Model {
|
||||
* @param string $type The type being set.
|
||||
* @return void
|
||||
*/
|
||||
public function set_type($type) {
|
||||
public function set_type($type): void {
|
||||
|
||||
if ( ! in_array($type, $this->allowed_types, true)) {
|
||||
$type = 'broadcast_notice';
|
||||
@ -261,7 +261,7 @@ class Broadcast extends Post_Base_Model {
|
||||
* @param string $status The status being set.
|
||||
* @return void
|
||||
*/
|
||||
public function set_status($status) {
|
||||
public function set_status($status): void {
|
||||
|
||||
if ( ! in_array($status, $this->allowed_status, true)) {
|
||||
$status = 'publish';
|
||||
|
@ -482,7 +482,7 @@ class Membership extends Base_Model {
|
||||
if ($plan && ($plan->get_duration() !== $this->get_duration() || $plan->get_duration_unit() !== $this->get_duration_unit())) {
|
||||
$variation = $plan->get_as_variation($this->get_duration(), $this->get_duration_unit());
|
||||
|
||||
$plan = ($variation ?: null) ?? $plan;
|
||||
$plan = ($variation ? $variation : null) ?? $plan;
|
||||
}
|
||||
|
||||
return $plan;
|
||||
|
Reference in New Issue
Block a user