ODDMetaData   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
dl 0
loc 32
ccs 0
cts 12
cp 0
rs 10
c 0
b 0
f 0
wmc 2
lcom 0
cbo 1

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 10 1
A getTagName() 0 3 1
1
<?php
2
/**
3
 * ODD Metadata class.
4
 *
5
 * @package    Elgg.Core
6
 * @subpackage ODD
7
 * @deprecated 1.9
8
 */
9
class ODDMetaData extends ODD {
0 ignored issues
show
Deprecated Code introduced by
The class ODD has been deprecated with message: 1.9

This class, trait or interface has been deprecated. The supplier of the file has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the type will be removed from the class and what other constant to use instead.

Loading history...
10
11
	/**
12
	 * New ODD metadata
13
	 *
14
	 * @param string $uuid        Unique ID
15
	 * @param string $entity_uuid Another unique ID
16
	 * @param string $name        Name
17
	 * @param string $value       Value
18
	 * @param string $type        Type
19
	 * @param string $owner_uuid  Owner ID
20
	 */
21
	function __construct($uuid, $entity_uuid, $name, $value, $type = "", $owner_uuid = "") {
22
		parent::__construct();
23
24
		$this->setAttribute('uuid', $uuid);
25
		$this->setAttribute('entity_uuid', $entity_uuid);
26
		$this->setAttribute('name', $name);
27
		$this->setAttribute('type', $type);
28
		$this->setAttribute('owner_uuid', $owner_uuid);
29
		$this->setBody($value);
30
	}
31
32
	/**
33
	 * Returns 'metadata'
34
	 *
35
	 * @return string 'metadata'
36
	 */
37
	protected function getTagName() {
38
		return "metadata";
39
	}
40
}
41