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.
Completed
Push — master ( 8970a4...b3ee5f )
by Brad
06:24 queued 03:11
created

FooGallery_ElasticPress_Compatibility   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
dl 0
loc 15
rs 10
c 0
b 0
f 0
wmc 3
lcom 0
cbo 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A exclude_foogallery_from_index() 0 6 2
1
<?php
2
/**
3
 * ElasticPress Compatibility Class
4
 * Date: 14/10/2018
5
 */
6
if ( ! class_exists( 'FooGallery_ElasticPress_Compatibility' ) ) {
7
8
	class FooGallery_ElasticPress_Compatibility {
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...
9
		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...
10
			add_action( 'ep_indexable_post_types', array( $this, 'exclude_foogallery_from_index' ), 99 );
11
		}
12
13
		/*
14
		 * Do not include FooGallery posts in the ElasticPress index
15
		 */
16
		function exclude_foogallery_from_index( $post_types ) {
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...
17
			if ( array_key_exists( 'foogallery',  $post_types ) ) {
18
				unset( $post_types['foogallery'] );
19
			}
20
			return $post_types;
21
		}
22
	}
23
}