Failed Conditions
Push — develop ( 468b4b...eef6cb )
by Elvis Henrique
03:42
created

CarbonTerm::set()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 2
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 3
1
<?php
2
/**
3
 * Carbon Term.
4
 *
5
 * @package App
6
 */
7
8
declare(strict_types=1);
9
10
namespace App\Services\Meta;
11
12
use WPSteak\Services\Meta\IMeta;
13
use WPSteak\Services\Meta\TermInterface;
14
15
/**
16
 * Carbon Term class.
17
 *
18
 * @codeCoverageIgnore
19
 */
20
class CarbonTerm implements TermInterface {
21
22
	/**
23
	 * Get.
24
	 *
25
	 * @param integer $id Id.
26
	 * @param string  $key Key.
27
	 * @param boolean $single Single.
28
	 * @return mixed
29
	 */
30
	public function get( int $id, string $key, bool $single = false ) {
31
		return carbon_get_term_meta( $id, $key );
0 ignored issues
show
Bug introduced by
The function carbon_get_term_meta 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

31
		return /** @scrutinizer ignore-call */ carbon_get_term_meta( $id, $key );
Loading history...
32
	}
33
34
	/**
35
	 * Set.
36
	 *
37
	 * @param integer $id Id.
38
	 * @param string  $key Key.
39
	 * @param mixed   $value Value.
40
	 * @return IMeta
41
	 */
42
	public function set( int $id, string $key, $value ) : IMeta {
43
		carbon_set_term_meta( $id, $key, $value );
0 ignored issues
show
Bug introduced by
The function carbon_set_term_meta 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

43
		/** @scrutinizer ignore-call */ 
44
  carbon_set_term_meta( $id, $key, $value );
Loading history...
44
		return $this;
45
	}
46
}
47