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

core/Container.php (1 issue)

Severity

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

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
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