chore: lint code

This commit is contained in:
Ben Goldsworthy 2021-05-02 20:12:47 +01:00
parent c25bd7d8a2
commit 8bb41c7a7a
9 changed files with 49 additions and 50 deletions

View file

@ -185,10 +185,10 @@ class Convert {
$p_int_index = (int) $p_int_index;
}
// Return the whole arrow array.
if ($p_int_index < 0) {
if ( $p_int_index < 0 ) {
return $l_arr_arrows;
}
if ($p_int_index > count( $l_arr_arrows )) {
if ( $p_int_index > count( $l_arr_arrows ) ) {
return $l_arr_arrows;
}
// Return a single arrow.

View file

@ -54,7 +54,7 @@ class Core {
*
* @var Loader $loader Maintains and registers all hooks for the plugin.
*/
protected ?\footnotes\includes\Loader $loader = null;
protected \footnotes\includes\Loader $loader;
/**
* The unique identifier of this plugin

View file

@ -40,7 +40,7 @@ class i18n {
load_plugin_textdomain(
'footnotes',
false,
dirname(plugin_basename( __FILE__ ), 2) . '/languages/'
dirname( plugin_basename( __FILE__ ), 2 ) . '/languages/'
);
}

View file

@ -1109,7 +1109,6 @@ class Settings {
/**
* Stores a singleton reference of this class.
*
*
* @since 1.5.0
*/
private static ?\footnotes\includes\Settings $a_obj_instance = null;
@ -1344,7 +1343,6 @@ class Settings {
/**
* Returns a singleton of this class.
*
*
* @since 1.5.0
* @todo Remove?
*/

View file

@ -81,10 +81,10 @@ class Template {
*/
public function __construct( string $p_str_file_type, string $p_str_file_name, string $p_str_extension = 'html' ) {
// No template file type and/or file name set.
if (empty( $p_str_file_type )) {
if ( empty( $p_str_file_type ) ) {
return;
}
if (empty( $p_str_file_name )) {
if ( empty( $p_str_file_name ) ) {
return;
}
$this->plugin_directory = plugin_dir_path( __DIR__ );