More code cleanup
This commit is contained in:
@ -50,7 +50,8 @@
|
||||
"symfony/polyfill-php81": "^1.31.0",
|
||||
"symfony/polyfill-php82": "^1.31.0",
|
||||
"symfony/polyfill-php83": "^1.31.0",
|
||||
"symfony/polyfill-php84": "^1.31.0"
|
||||
"symfony/polyfill-php84": "^1.31.0",
|
||||
"ext-curl": "*"
|
||||
},
|
||||
"require-dev": {
|
||||
"composer/installers": "^1.9.0",
|
||||
|
@ -73,7 +73,7 @@ class Dashboard_Statistics {
|
||||
* @since 2.0.0
|
||||
* @return void.
|
||||
*/
|
||||
public function init() {}
|
||||
public function init(): void {}
|
||||
|
||||
/**
|
||||
* Main function to call the get data functions based on the array of types.
|
||||
|
@ -29,6 +29,6 @@ class Domain_Mapping_Compat {
|
||||
* @since 2.0.0
|
||||
* @return void
|
||||
*/
|
||||
public function init() {
|
||||
public function init(): void {
|
||||
}
|
||||
}
|
||||
|
@ -36,7 +36,7 @@ abstract class Enum {
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $value = '';
|
||||
private $value;
|
||||
|
||||
/**
|
||||
* Constructor method. Takes the value you want to set.
|
||||
|
@ -24,12 +24,12 @@ if ( ! class_exists('MUCD_Log') ) {
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $log_dir_path = '';
|
||||
private $log_dir_path;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $log_file_name = '';
|
||||
private $log_file_name;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
|
@ -74,12 +74,12 @@ class CPanel_API {
|
||||
/**
|
||||
* @var integer
|
||||
*/
|
||||
private $port = 2083;
|
||||
private $port;
|
||||
|
||||
/**
|
||||
* @var boolean
|
||||
*/
|
||||
private $log = false;
|
||||
private $log;
|
||||
|
||||
/**
|
||||
* Creates the CPanel_API Object.
|
||||
|
@ -27,7 +27,7 @@ class Trial_Limits {
|
||||
* @since 2.0.0
|
||||
* @return void
|
||||
*/
|
||||
public function init() {
|
||||
public function init(): void {
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -277,5 +277,5 @@ class Membership_List_Table_Widget extends Base_List_Table {
|
||||
* @since 2.0.0
|
||||
* @return void
|
||||
*/
|
||||
public function _js_vars() {}
|
||||
public function _js_vars(): void {}
|
||||
}
|
||||
|
@ -241,5 +241,5 @@ class Payment_List_Table_Widget extends Base_List_Table {
|
||||
* @since 2.0.0
|
||||
* @return void
|
||||
*/
|
||||
public function _js_vars() {}
|
||||
public function _js_vars(): void {}
|
||||
}
|
||||
|
@ -31,6 +31,6 @@ class Job_Manager {
|
||||
* @since 2.0.0
|
||||
* @return void
|
||||
*/
|
||||
public function init() {
|
||||
public function init(): void {
|
||||
}
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -11,8 +11,6 @@
|
||||
|
||||
namespace WP_Ultimo\Objects;
|
||||
|
||||
use WP_Ultimo\Objects\Limitations;
|
||||
|
||||
// Exit if accessed directly
|
||||
defined('ABSPATH') || exit;
|
||||
|
||||
|
@ -7,8 +7,5 @@
|
||||
<testsuite name="testing">
|
||||
<directory suffix="Test.php">./tests/</directory>
|
||||
</testsuite>
|
||||
<testsuite name="rector">
|
||||
<directory>utils/rector/tests</directory>
|
||||
</testsuite>
|
||||
</testsuites>
|
||||
</phpunit>
|
||||
|
Reference in New Issue
Block a user