forked from Cavemanon/cavepaintings
drop php7.3 support, make use of 7.4 features
This commit is contained in:
@@ -4,11 +4,11 @@ class NumericScoreInfo extends ExtensionInfo
|
||||
{
|
||||
public const KEY = "numeric_score";
|
||||
|
||||
public $key = self::KEY;
|
||||
public $name = "Post Scores (Numeric)";
|
||||
public $url = self::SHIMMIE_URL;
|
||||
public $authors = self::SHISH_AUTHOR;
|
||||
public $license = self::LICENSE_GPLV2;
|
||||
public $description = "Allow users to score images";
|
||||
public $documentation ="Each registered user may vote a post +1 or -1, the image's score is the sum of all votes.";
|
||||
public string $key = self::KEY;
|
||||
public string $name = "Post Scores (Numeric)";
|
||||
public string $url = self::SHIMMIE_URL;
|
||||
public array $authors = self::SHISH_AUTHOR;
|
||||
public string $license = self::LICENSE_GPLV2;
|
||||
public string $description = "Allow users to score images";
|
||||
public ?string $documentation ="Each registered user may vote a post +1 or -1, the image's score is the sum of all votes.";
|
||||
}
|
||||
|
@@ -2,9 +2,9 @@
|
||||
|
||||
class NumericScoreSetEvent extends Event
|
||||
{
|
||||
public $image_id;
|
||||
public $user;
|
||||
public $score;
|
||||
public int $image_id;
|
||||
public User $user;
|
||||
public int $score;
|
||||
|
||||
public function __construct(int $image_id, User $user, int $score)
|
||||
{
|
||||
@@ -18,7 +18,7 @@ class NumericScoreSetEvent extends Event
|
||||
class NumericScore extends Extension
|
||||
{
|
||||
/** @var NumericScoreTheme */
|
||||
protected $theme;
|
||||
protected ?Themelet $theme;
|
||||
|
||||
public function onDisplayingImage(DisplayingImageEvent $event)
|
||||
{
|
||||
|
@@ -94,7 +94,7 @@ class NumericScoreTheme extends Themelet
|
||||
}
|
||||
|
||||
|
||||
public function get_help_html()
|
||||
public function get_help_html(): string
|
||||
{
|
||||
return '<p>Search for posts that have received numeric scores by the score or by the scorer.</p>
|
||||
<div class="command_example">
|
||||
|
Reference in New Issue
Block a user