mirror of
https://ghproxy.net/https://github.com/fairpm/fair-plugin.git
synced 2025-09-04 10:32:01 +08:00
Fix errors discovered by static analysis (#32)
Signed-off-by: Viktor Szépe <viktor@szepe.net>
This commit is contained in:
parent
6cf11c81a8
commit
948818d1c6
6 changed files with 6 additions and 7 deletions
|
@ -33,7 +33,6 @@ function get_emoji_base_url() : string {
|
|||
/**
|
||||
* Replace the CDN domain for regular Twemoji images.
|
||||
*
|
||||
* @param string $url The emoji URLs from s.w.org.
|
||||
* @return string Replaced URL.
|
||||
*/
|
||||
function replace_emoji_url() {
|
||||
|
@ -43,7 +42,6 @@ function replace_emoji_url() {
|
|||
/**
|
||||
* Replace the CDN domain for regular Twemoji images.
|
||||
*
|
||||
* @param string $url The emoji URLs from s.w.org.
|
||||
* @return string Replaced URL.
|
||||
*/
|
||||
function replace_emoji_svg_url() {
|
||||
|
|
|
@ -234,7 +234,6 @@ function get_avatar_url( $id_or_email, $args ) {
|
|||
* Get the default avatar alt text.
|
||||
*
|
||||
* @param mixed $id_or_email User ID, email, or comment object.
|
||||
* @param array $args Avatar arguments.
|
||||
*
|
||||
* @return string Filtered avatar URL.
|
||||
*/
|
||||
|
|
|
@ -23,7 +23,7 @@ function bootstrap() {
|
|||
/**
|
||||
* Replace versions 1.0 and 1.1 of the Credits API with local file copies.
|
||||
*
|
||||
* @param bool|array $value Filtered value, or false to proceed.
|
||||
* @param false|array|WP_Error $response Filtered response.
|
||||
* @param array $parsed_args The request's arguments.
|
||||
* @param string $url The request's URL.
|
||||
* @return bool|array|WP_Error Replaced value, false to proceed, or WP_Error on failure.
|
||||
|
|
|
@ -7,6 +7,8 @@
|
|||
|
||||
namespace FAIR\Importers;
|
||||
|
||||
use WP_Error;
|
||||
|
||||
/**
|
||||
* Bootstrap.
|
||||
*/
|
||||
|
|
|
@ -99,7 +99,7 @@ function define_salt_keynames() {
|
|||
/**
|
||||
* Generate a unique string for the salt, using multiple crypto methods.
|
||||
*
|
||||
* @return array
|
||||
* @return string
|
||||
*/
|
||||
function generate_salt_string() {
|
||||
|
||||
|
|
|
@ -98,7 +98,7 @@ function get_browser_check_response( string $agent ) {
|
|||
],
|
||||
'body' => json_encode( [
|
||||
'platform' => _x( 'your platform', 'browser version check', 'fair' ),
|
||||
'name' => __( 'your browser', 'browser version check', 'fair' ),
|
||||
'name' => _x( 'your browser', 'browser version check', 'fair' ),
|
||||
'version' => '',
|
||||
'current_version' => '',
|
||||
'upgrade' => ! $supported,
|
||||
|
@ -168,7 +168,7 @@ function get_php_branches() {
|
|||
* - Else if is_lower_than_future_minimum, show "outdated version which does not receive security updates and will soon not be supported"
|
||||
* - Else, show "outdated version which does not receive security updates"
|
||||
*
|
||||
* @param string $agent User-agent to check.
|
||||
* @param string $version Version to check.
|
||||
* @return array HTTP API response-like data.
|
||||
*/
|
||||
function check_php_version( string $version ) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue