Completed
Push — milestone/2_0/container-condit... ( af96ef...c41f81 )
by
unknown
03:01
created

Broken_Container   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 14
rs 10
c 0
b 0
f 0
wmc 6
lcom 0
cbo 1

6 Methods

Rating   Name   Duplication   Size   Complexity  
A add_fields() 0 1 1
A init() 0 1 1
A get_environment_for_request() 0 1 1
A is_valid_attach_for_request() 0 1 1
A get_environment_for_object() 0 1 1
A is_valid_attach_for_object() 0 1 1
1
<?php
2
3
namespace Carbon_Fields\Container;
4
5
/**
6
 * Broken container class.
7
 * Used when a container gets misconfigured.
8
 **/
9
class Broken_Container extends Container {
10
	
11
	public function add_fields( $fields ) {}
12
13
	public function init() {}
14
15
	protected function get_environment_for_request() { return array(); }
16
17
	public function is_valid_attach_for_request() { return false; }
18
19
	protected function get_environment_for_object( $object_id ) { return array(); }
20
21
	public function is_valid_attach_for_object( $object_id = null ) { return false; }
22
}
23