| @@ -6,46 +6,46 @@ | ||
| 6 | 6 | |
| 7 | 7 | defined( 'ABSPATH' ) || exit; |
| 8 | 8 | |
| 9 | 9 | class Hostinger { |
| 10 | - protected string $plugin_name = 'Hostinger'; | |
| 11 | - protected string $version; | |
| 10 | + protected string $plugin_name = 'Hostinger'; | |
| 11 | + protected string $version; | |
| 12 | 12 | |
| 13 | - /** | |
| 14 | - * @return void | |
| 15 | - */ | |
| 16 | - public function bootstrap(): void { | |
| 17 | - $this->version = $this->get_plugin_version(); | |
| 18 | - $bootstrap = new Bootstrap(); | |
| 19 | - $bootstrap->run(); | |
| 20 | - } | |
| 13 | + /** | |
| 14 | + * @return void | |
| 15 | + */ | |
| 16 | + public function bootstrap(): void { | |
| 17 | + $this->version = $this->get_plugin_version(); | |
| 18 | + $bootstrap = new Bootstrap(); | |
| 19 | + $bootstrap->run(); | |
| 20 | + } | |
| 21 | 21 | |
| 22 | - /** | |
| 23 | - * @return void | |
| 24 | - */ | |
| 25 | - public function run(): void { | |
| 26 | - $this->bootstrap(); | |
| 27 | - } | |
| 28 | - /** PHPCS:disable WordPress.NamingConventions.PrefixAllGlobals.VariableConstantNameFound */ | |
| 29 | - /** | |
| 30 | - * Define constant | |
| 31 | - * | |
| 32 | - * @param string $name Constant name. | |
| 33 | - * @param string|bool $value Constant value. | |
| 34 | - */ | |
| 35 | - private function define( string $name, $value ): void { | |
| 36 | - if ( ! defined( $name ) ) { | |
| 37 | - define( $name, $value ); | |
| 38 | - } | |
| 39 | - } | |
| 40 | - /** PHPCS:enable */ | |
| 41 | - /** | |
| 42 | - * @return string | |
| 43 | - */ | |
| 44 | - private function get_plugin_version(): string { | |
| 45 | - if ( defined( 'HOSTINGER_WORDPRESS_PLUGIN_VERSION' ) ) { | |
| 46 | - return HOSTINGER_WORDPRESS_PLUGIN_VERSION; | |
| 47 | - } | |
| 22 | + /** | |
| 23 | + * @return void | |
| 24 | + */ | |
| 25 | + public function run(): void { | |
| 26 | + $this->bootstrap(); | |
| 27 | + } | |
| 28 | + /** PHPCS:disable WordPress.NamingConventions.PrefixAllGlobals.VariableConstantNameFound */ | |
| 29 | + /** | |
| 30 | + * Define constant | |
| 31 | + * | |
| 32 | + * @param string $name Constant name. | |
| 33 | + * @param string|bool $value Constant value. | |
| 34 | + */ | |
| 35 | + private function define( string $name, $value ): void { | |
| 36 | + if ( ! defined( $name ) ) { | |
| 37 | + define( $name, $value ); | |
| 38 | + } | |
| 39 | + } | |
| 40 | + /** PHPCS:enable */ | |
| 41 | + /** | |
| 42 | + * @return string | |
| 43 | + */ | |
| 44 | + private function get_plugin_version(): string { | |
| 45 | + if ( defined( 'HOSTINGER_VERSION' ) ) { | |
| 46 | + return HOSTINGER_VERSION; | |
| 47 | + } | |
| 48 | 48 | |
| 49 | - return '1.0.0'; | |
| 50 | - } | |
| 49 | + return '1.0.0'; | |
| 50 | + } | |
| 51 | 51 | } |