GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

FooGallery_Pro::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 14

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 0
loc 14
rs 9.7998
c 0
b 0
f 0
1
<?php
0 ignored issues
show
Coding Style Compatibility introduced by
For compatibility and reusability of your code, PSR1 recommends that a file should introduce either new symbols (like classes, functions, etc.) or have side-effects (like outputting something, or including other files), but not both at the same time. The first symbol is defined on line 26 and the first side effect is on line 6.

The PSR-1: Basic Coding Standard recommends that a file should either introduce new symbols, that is classes, functions, constants or similar, or have side effects. Side effects are anything that executes logic, like for example printing output, changing ini settings or writing to a file.

The idea behind this recommendation is that merely auto-loading a class should not change the state of an application. It also promotes a cleaner style of programming and makes your code less prone to errors, because the logic is not spread out all over the place.

To learn more about the PSR-1, please see the PHP-FIG site on the PSR-1.

Loading history...
2
3
/**
4
 * FooGallery PRO includes
5
 */
6
require_once( FOOGALLERY_PATH . 'pro/functions.php' );
7
require_once( FOOGALLERY_PATH . 'pro/includes/class-foogallery-pro-presets.php' );
8
require_once( FOOGALLERY_PATH . 'pro/includes/class-foogallery-pro-loaded-effects.php' );
9
require_once( FOOGALLERY_PATH . 'pro/includes/class-foogallery-pro-paging.php' );
10
require_once( FOOGALLERY_PATH . 'pro/extensions/default-templates/class-foogallery-pro-default-templates.php' );
11
require_once( FOOGALLERY_PATH . 'pro/includes/class-foogallery-pro-bulk-copy.php' );
12
require_once( FOOGALLERY_PATH . 'pro/includes/class-foogallery-pro-gallery-override.php' );
13
require_once( FOOGALLERY_PATH . 'pro/includes/class-foogallery-pro-filtering.php' );
14
require_once( FOOGALLERY_PATH . 'pro/includes/class-foogallery-pro-attachment-taxonomies.php' );
15
require_once( FOOGALLERY_PATH . 'pro/includes/video/class-foogallery-pro-video.php' );
16
require_once( FOOGALLERY_PATH . 'pro/includes/video/class-foogallery-pro-video-legacy.php' );
17
require_once( FOOGALLERY_PATH . 'pro/includes/video/class-foogallery-pro-video-migration-helper.php' );
18
require_once( FOOGALLERY_PATH . 'pro/includes/class-foogallery-pro-advanced-gallery-settings.php' );
19
require_once( FOOGALLERY_PATH . 'pro/includes/class-foogallery-pro-instagram-filters.php' );
20
21
/**
22
 * FooGallery PRO Main Class
23
 */
24
if ( ! class_exists( 'FooGallery_Pro' ) ) {
25
26
	define( 'FOOGALLERY_PRO_PATH', plugin_dir_path( __FILE__ ) );
27
	define( 'FOOGALLERY_PRO_URL', plugin_dir_url( __FILE__ ) );
28
29
	class FooGallery_Pro {
0 ignored issues
show
Coding Style Compatibility introduced by
PSR1 recommends that each class must be in a namespace of at least one level to avoid collisions.

You can fix this by adding a namespace to your class:

namespace YourVendor;

class YourClass { }

When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.

Loading history...
30
31
		function __construct() {
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
32
			new FooGallery_Pro_Hover_Presets();
33
			new FooGallery_Pro_Loaded_Effects();
34
			new FooGallery_Pro_Paging();
35
			new FooGallery_Pro_Default_Templates();
36
			new FooGallery_Pro_Bulk_Copy();
37
			new FooGallery_Pro_Gallery_Shortcode_Override();
38
			new FooGallery_Pro_Attachment_Taxonomies();
39
			new FooGallery_Pro_Filtering();
40
			new FooGallery_Pro_Video();
41
			new FooGallery_Pro_Advanced_Gallery_Settings();
42
			new FooGallery_Pro_Video_Legacy();
43
			new FooGallery_Pro_Instagram_Filters();
44
		}
45
	}
46
}