Skip to content

Commit 35e7ac4

Browse files
committed
Fix PHPCS findings: docblock cleanup, →$instance, index.php
1 parent 413d5d3 commit 35e7ac4

4 files changed

Lines changed: 8 additions & 30 deletions

File tree

include/class-alpha-google-map-widget.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1119,8 +1119,8 @@ protected function render() {
11191119
// Sanitize IDs.
11201120
$gallery_ids = ! empty( $pin['pin_desc_gallery'] ) && is_array( $pin['pin_desc_gallery'] ) ? $pin['pin_desc_gallery'] : array();
11211121
$ids = array_map( 'intval', wp_list_pluck( $gallery_ids, 'id' ) );
1122-
$count = count( $ids );
1123-
$data_count = max( 0, $count - 4 );
1122+
$count = count( $ids );
1123+
$data_count = max( 0, $count - 4 );
11241124
$this->add_render_attribute( 'shortcode' . $index, 'ids', implode( ',', $ids ) );
11251125

11261126
?>

include/class-alpha-google-map.php

Lines changed: 4 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -23,55 +23,44 @@ final class Alpha_Google_Map {
2323
/**
2424
* Minimum Elementor Version
2525
*
26-
* @since 1.0.0
2726
* @var string Minimum Elementor version required to run the addon.
2827
*/
2928
const MINIMUM_ELEMENTOR_VERSION = '3.21.0';
3029

3130
/**
3231
* Minimum PHP Version
3332
*
34-
* @since 1.0.0
3533
* @var string Minimum PHP version required to run the addon.
3634
*/
3735
const MINIMUM_PHP_VERSION = '7.4';
3836

3937
/**
4038
* Instance
4139
*
42-
* @since 1.0.0
43-
* @access private
44-
* @static
4540
* @var \Elementor_Alpha_Google_Map_Addon\Alpha_Google_Map The single instance of the class.
4641
*/
47-
private static $_instance = null;
42+
private static $instance = null;
4843

4944
/**
5045
* Instance
5146
*
5247
* Ensures only one instance of the class is loaded or can be loaded.
5348
*
54-
* @since 1.0.0
55-
* @access public
56-
* @static
5749
* @return \Elementor_Alpha_Google_Map_Addon\Alpha_Google_Map An instance of the class.
5850
*/
5951
public static function instance(): self {
6052

61-
if ( is_null( self::$_instance ) ) {
62-
self::$_instance = new self();
53+
if ( is_null( self::$instance ) ) {
54+
self::$instance = new self();
6355
}
64-
return self::$_instance;
56+
return self::$instance;
6557
}
6658

6759
/**
6860
* Constructor
6961
*
7062
* Perform some compatibility checks to make sure basic requirements are meet.
7163
* If all compatibility checks pass, initialize the functionality.
72-
*
73-
* @since 1.0.0
74-
* @access private
7564
*/
7665
private function __construct() {
7766
if ( $this->is_compatible() ) {
@@ -83,9 +72,6 @@ private function __construct() {
8372
* Compatibility Checks
8473
*
8574
* Checks whether the site meets the addon requirement.
86-
*
87-
* @since 1.0.0
88-
* @access public
8975
*/
9076
public function is_compatible(): bool {
9177

@@ -137,9 +123,6 @@ public function register_frontend_styles(): void {
137123
* Admin notice
138124
*
139125
* Warning when the site doesn't have Elementor installed or activated.
140-
*
141-
* @since 1.0.0
142-
* @access public
143126
*/
144127
public function admin_notice_missing_main_plugin(): void {
145128
$message = sprintf(
@@ -184,9 +167,6 @@ public function admin_notice_missing_main_plugin(): void {
184167
* Admin notice
185168
*
186169
* Warning when the site doesn't have a minimum required Elementor version.
187-
*
188-
* @since 1.0.0
189-
* @access public
190170
*/
191171
public function admin_notice_minimum_elementor_version(): void {
192172
$message = sprintf(
@@ -215,9 +195,6 @@ public function admin_notice_minimum_elementor_version(): void {
215195
* Admin notice
216196
*
217197
* Warning when the site doesn't have a minimum required PHP version.
218-
*
219-
* @since 1.0.0
220-
* @access public
221198
*/
222199
public function admin_notice_minimum_php_version(): void {
223200
$message = sprintf(

index.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
<?php
2-
// Silence is golden.
2+
/** Silence is golden. */

phpcs.xml.dist

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,6 @@
2020
<exclude name="WordPress.NamingConventions.ValidVariableName" />
2121
<exclude name="Squiz.Commenting.FileComment.Missing" />
2222
<exclude name="Squiz.Commenting.FileComment.MissingPackageTag" />
23+
<exclude name="WordPress.Files.FileName.InvalidClassFileName" />
2324
</rule>
2425
</ruleset>

0 commit comments

Comments
 (0)