Completed
Push — master ( 6a57b0...e13082 )
by Marin
02:25
created

Container   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 2
c 1
b 0
f 1
lcom 0
cbo 1
dl 0
loc 19
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A factory() 0 3 1
A make() 0 3 1
1
<?php 
2
3
namespace Carbon_Fields;
4
5
use Carbon_Fields\Container\Container as Abstract_Container;
6
7
/**
8
 * Container proxy factory class.
9
 * Used for shorter namespace access when creating a container.
10
 **/
11
class Container {
12
	/**
13
	 * A proxy for the abstract field factory method.
14
	 *
15
	 * @see Carbon_Fields\Container\Container::factory()
16
	 **/
17
	public static function factory( $type, $name, $label = null ) {
18
		return Abstract_Container::factory( $type, $name, $label );
0 ignored issues
show
Unused Code introduced by
The call to Container::factory() has too many arguments starting with $label.

This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue.

If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress.

In this case you can add the @ignore PhpDoc annotation to the duplicate definition and it will be ignored.

Loading history...
19
	}
20
21
	/**
22
	 * An alias of factory().
23
	 *
24
	 * @see Container::factory()
25
	 **/
26
	public static function make( $type, $name, $label = null ) {
27
		return self::factory( $type, $name, $label );
28
	}
29
}
30