-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[static-analysis] Fixes PHPStan errors minus - access to an undefined…
… property object.
- Loading branch information
Showing
19 changed files
with
556 additions
and
133 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
<?php | ||
|
||
/** | ||
* @param mixed $object | ||
* | ||
* @return array<string, mixed> | ||
*/ | ||
function fs_get_object_public_vars($object) { | ||
return []; | ||
} | ||
|
||
class FS_Entity { | ||
|
||
/** | ||
* @var int | ||
*/ | ||
public $id; | ||
|
||
/** | ||
* @var string | ||
*/ | ||
public $updated; | ||
|
||
/** | ||
* @var string | ||
*/ | ||
public $created; | ||
|
||
/** | ||
* FS_Entity constructor. | ||
* @param mixed $entity | ||
*/ | ||
function __construct($entity = false) { | ||
// Implementation here | ||
} | ||
|
||
/** | ||
* @return string | ||
*/ | ||
static function get_type() { | ||
// Implementation here | ||
return ''; | ||
} | ||
|
||
/** | ||
* @param mixed $entity1 | ||
* @param mixed $entity2 | ||
* @return bool | ||
*/ | ||
static function equals($entity1, $entity2) { | ||
// Implementation here | ||
return false; | ||
} | ||
|
||
/** | ||
* @var bool | ||
*/ | ||
private $_is_updated = false; | ||
|
||
/** | ||
* @param string $key | ||
* @param bool $val | ||
* @return bool | ||
*/ | ||
function update($key, $val = false) { | ||
return false; | ||
} | ||
|
||
/** | ||
* @return bool | ||
*/ | ||
function is_updated() { | ||
// Implementation here | ||
return $this->_is_updated; | ||
} | ||
|
||
/** | ||
* @param int $id | ||
* @return bool | ||
*/ | ||
static function is_valid_id($id) { | ||
// Implementation here | ||
return false; | ||
} | ||
|
||
/** | ||
* @return string | ||
*/ | ||
public static function get_class_name() { | ||
// Implementation here | ||
return ''; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,129 @@ | ||
<?php | ||
class FS_Plugin_Plan extends FS_Entity { | ||
|
||
/** | ||
* @var int | ||
*/ | ||
public $plugin_id; | ||
|
||
/** | ||
* @var string | ||
*/ | ||
public $name; | ||
|
||
/** | ||
* @var string | ||
*/ | ||
public $title; | ||
|
||
/** | ||
* @var string | ||
*/ | ||
public $description; | ||
|
||
/** | ||
* @var bool | ||
*/ | ||
public $is_free_localhost; | ||
|
||
/** | ||
* @var bool | ||
*/ | ||
public $is_block_features; | ||
|
||
/** | ||
* @var string | ||
*/ | ||
public $license_type; | ||
|
||
/** | ||
* @var bool | ||
*/ | ||
public $is_https_support; | ||
|
||
/** | ||
* @var int | ||
*/ | ||
public $trial_period; | ||
|
||
/** | ||
* @var bool | ||
*/ | ||
public $is_require_subscription; | ||
|
||
/** | ||
* @var string | ||
*/ | ||
public $support_kb; | ||
|
||
/** | ||
* @var string | ||
*/ | ||
public $support_forum; | ||
|
||
/** | ||
* @var string | ||
*/ | ||
public $support_email; | ||
|
||
/** | ||
* @var string | ||
*/ | ||
public $support_phone; | ||
|
||
/** | ||
* @var string | ||
*/ | ||
public $support_skype; | ||
|
||
/** | ||
* @var bool | ||
*/ | ||
public $is_success_manager; | ||
|
||
/** | ||
* @var bool | ||
*/ | ||
public $is_featured; | ||
|
||
/** | ||
* @var bool | ||
*/ | ||
public $is_hidden; | ||
|
||
/** | ||
* @var array<string, mixed> | ||
*/ | ||
public $pricing; | ||
|
||
/** | ||
* @var array<string, mixed> | ||
*/ | ||
public $features; | ||
|
||
/** | ||
* FS_Plugin_Plan constructor. | ||
* @param object|bool $plan | ||
*/ | ||
public function __construct($plan = false) {} | ||
|
||
/** | ||
* @return string | ||
*/ | ||
public static function get_type() {} | ||
|
||
/** | ||
* @return bool | ||
*/ | ||
public function is_free() {} | ||
|
||
/** | ||
* @return bool | ||
*/ | ||
public function has_technical_support() {} | ||
|
||
/** | ||
* @return bool | ||
*/ | ||
public function has_trial() {} | ||
} |
Oops, something went wrong.