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 ( f6fad4...6b3106 )
by Marko
07:00
created

Tabify_Edit_Screen_Feature_Plugin_Support   A

Complexity

Total Complexity 13

Size/Duplication

Total Lines 66
Duplicated Lines 0 %

Importance

Changes 3
Bugs 0 Features 0
Metric Value
eloc 18
c 3
b 0
f 0
dl 0
loc 66
rs 10
wmc 13

5 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 13 2
A members() 0 3 3
A wpseo() 0 3 3
A wpml() 0 8 4
A types() 0 1 1
1
<?php
2
3
class Tabify_Edit_Screen_Feature_Plugin_Support {
4
5
	public function __construct() {
6
		$screen = get_current_screen();
0 ignored issues
show
Bug introduced by
The function get_current_screen was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

6
		$screen = /** @scrutinizer ignore-call */ get_current_screen();
Loading history...
7
8
		if ( 'settings_page_tabify-edit-screen' != $screen->base ) {
9
			return;
10
		}
11
12
		add_action( 'tabify_add_meta_boxes', array( $this, 'types' ) );
0 ignored issues
show
Bug introduced by
The function add_action was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

12
		/** @scrutinizer ignore-call */ 
13
  add_action( 'tabify_add_meta_boxes', array( $this, 'types' ) );
Loading history...
13
		add_action( 'tabify_add_meta_boxes', array( $this, 'members' ) );
14
		add_action( 'tabify_add_meta_boxes', array( $this, 'wpml' ) );
15
16
		add_filter( 'wpseo_always_register_metaboxes_on_admin', '__return_true' );
0 ignored issues
show
Bug introduced by
The function add_filter was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

16
		/** @scrutinizer ignore-call */ 
17
  add_filter( 'wpseo_always_register_metaboxes_on_admin', '__return_true' );
Loading history...
17
		add_action( 'tabify_add_meta_boxes', array( $this, 'wpseo' ) ); // The old way, will be removed in 1.0
18
	}
19
20
	/**
21
	 * Load widgets created by Types
22
	 *
23
	 * @param string $posttype The posttype the metaboxes should be loaded from
24
	 * 
25
	 * @since 0.4.0
26
	 */
27
	public function types( $posttype ) {
0 ignored issues
show
Unused Code introduced by
The parameter $posttype is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

27
	public function types( /** @scrutinizer ignore-unused */ $posttype ) {

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
28
		
29
	}
30
31
	/**
32
	 * Load widgets created by WordPress SEO
33
	 * 
34
	 * @since 0.4.0
35
	 */
36
	public function wpseo() {
37
		if ( defined( 'WPSEO_PATH' ) && is_file( WPSEO_PATH . 'admin/class-metabox.php' ) ) {
0 ignored issues
show
Bug introduced by
The constant WPSEO_PATH was not found. Maybe you did not declare it correctly or list all dependencies?
Loading history...
38
			include_once WPSEO_PATH . 'admin/class-metabox.php';
39
		}
40
	}
41
	
42
43
	/**
44
	 * Load widgets created by Members
45
	 * 
46
	 * @since 0.4.0
47
	 */
48
	public function members() {
49
		if ( function_exists( 'members_admin_setup' ) && ! did_action( 'load-post.php' ) ) {
0 ignored issues
show
Bug introduced by
The function did_action was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

49
		if ( function_exists( 'members_admin_setup' ) && ! /** @scrutinizer ignore-call */ did_action( 'load-post.php' ) ) {
Loading history...
50
			do_action( 'load-post.php' );
0 ignored issues
show
Bug introduced by
The function do_action was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

50
			/** @scrutinizer ignore-call */ 
51
   do_action( 'load-post.php' );
Loading history...
51
		}
52
	}
53
	
54
	/**
55
	 * Load widgets created by Members
56
	 *
57
	 * @param string $posttype The posttype the metaboxes should be loaded from
58
	 * 
59
	 * @since 0.7.0
60
	 */
61
	public function wpml( $posttype ) {
62
		global $sitepress, $post;
63
64
		if ( defined('ICL_SITEPRESS_VERSION') && $sitepress && ! $post ) {
65
			$post = (object) array( 'post_type' => $posttype );
66
			$sitepress->post_edit_language_options();
67
68
			$post = null;
69
		}
70
	}
71
72
}