| @@ -15,9 +15,9 @@ | ||
| 15 | 15 | * Transient key |
| 16 | 16 | * |
| 17 | 17 | * @var string |
| 18 | 18 | */ |
| 19 | - const TRANSIENT_KEY_PLUGIN = 't15s-registry-plugins'; | |
| 19 | + public const TRANSIENT_KEY_PLUGIN = 't15s-registry-plugins'; | |
| 20 | 20 | |
| 21 | 21 | /** |
| 22 | 22 | * Project directory slug |
| 23 | 23 | * |
| @@ -34,9 +34,9 @@ | ||
| 34 | 34 | |
| 35 | 35 | /** |
| 36 | 36 | * Installed translations. |
| 37 | 37 | * |
| 38 | - * @var array | |
| 38 | + * @var array|null | |
| 39 | 39 | */ |
| 40 | 40 | private static $installed_translations; |
| 41 | 41 | |
| 42 | 42 | /** |
| @@ -41,9 +41,9 @@ | ||
| 41 | 41 | |
| 42 | 42 | /** |
| 43 | 43 | * Available languages. |
| 44 | 44 | * |
| 45 | - * @var array | |
| 45 | + * @var array|null | |
| 46 | 46 | */ |
| 47 | 47 | private static $available_languages; |
| 48 | 48 | |
| 49 | 49 | /** |
| @@ -57,9 +57,9 @@ | ||
| 57 | 57 | public function __construct( $slug, $api_url ) { |
| 58 | 58 | $this->slug = $slug; |
| 59 | 59 | $this->api_url = $api_url; |
| 60 | 60 | |
| 61 | - add_action( 'init', array( __CLASS__, 'register_clean_translations_cache' ), 9999 ); | |
| 61 | + add_action( 'init', array( self::class, 'register_clean_translations_cache' ), 9999 ); | |
| 62 | 62 | add_filter( 'translations_api', array( $this, 'translations_api' ), 10, 3 ); |
| 63 | 63 | add_filter( 'site_transient_update_plugins', array( $this, 'site_transient_update_plugins' ) ); |
| 64 | 64 | } |
| 65 | 65 | |
| @@ -136,10 +136,10 @@ | ||
| 136 | 136 | * |
| 137 | 137 | * @return void |
| 138 | 138 | */ |
| 139 | 139 | public static function register_clean_translations_cache() { |
| 140 | - add_action( 'set_site_transient_update_plugins', array( __CLASS__, 'clean_translations_cache' ) ); | |
| 141 | - add_action( 'delete_site_transient_update_plugins', array( __CLASS__, 'clean_translations_cache' ) ); | |
| 140 | + add_action( 'set_site_transient_update_plugins', array( self::class, 'clean_translations_cache' ) ); | |
| 141 | + add_action( 'delete_site_transient_update_plugins', array( self::class, 'clean_translations_cache' ) ); | |
| 142 | 142 | } |
| 143 | 143 | |
| 144 | 144 | /** |
| 145 | 145 | * Clears existing translation cache. |