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_Album_Shortcodes::init_shortcode()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
/*
3
 * FooGallery Album Shortcode
4
 */
5
6
if ( ! class_exists( 'FooGallery_Album_Shortcodes' ) ) {
7
8
	class FooGallery_Album_Shortcodes {
9
10
		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...
11
			add_action( 'foogallery_loaded_album_template', array( $this, 'render_custom_css' ) );
12
			add_shortcode( foogallery_album_shortcode_tag(), array( $this, 'render_foogallery_album_shortcode' ) );
13
		}
14
15
		function render_foogallery_album_shortcode( $atts ) {
16
17
			$args = wp_parse_args( $atts, array(
18
				'id'    => 0,
19
				'album' => '',
20
			) );
21
22
			$args = apply_filters( 'foogallery-album_shortcode_atts', $args );
23
24
			//create new instance of template engine
25
			$engine = new FooGallery_Album_Template_Loader();
26
27
			ob_start();
28
29
			$engine->render_template( $args );
30
31
			$output_string = ob_get_contents();
32
			ob_end_clean();
33
			return $output_string;
34
		}
35
36
		function render_custom_css( $foogallery_album ) {
37
			if ( !empty( $foogallery_album->custom_css ) ) {
38
				echo '<style type="text/css">';
39
				echo $foogallery_album->custom_css;
40
				echo '</style>';
41
			}
42
		}
43
	}
44
}
45