Completed
Push — master ( 626d03...c1030a )
by Morris
27:45 queued 15:55
created

RootCollection   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 0
Metric Value
dl 0
loc 22
rs 10
c 0
b 0
f 0
wmc 2
lcom 0
cbo 3

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getChildForPrincipal() 0 4 1
A getName() 0 3 1
1
<?php
2
3
namespace OCA\DAV\Avatars;
4
5
use Sabre\DAVACL\AbstractPrincipalCollection;
6
7
8
class RootCollection extends AbstractPrincipalCollection {
9
10
	/**
11
	 * This method returns a node for a principal.
12
	 *
13
	 * The passed array contains principal information, and is guaranteed to
14
	 * at least contain a uri item. Other properties may or may not be
15
	 * supplied by the authentication backend.
16
	 *
17
	 * @param array $principalInfo
18
	 * @return AvatarHome
19
	 */
20
	public function getChildForPrincipal(array $principalInfo) {
21
		$avatarManager = \OC::$server->getAvatarManager();
22
		return new AvatarHome($principalInfo, $avatarManager);
23
	}
24
25
	public function getName() {
26
		return 'avatars';
27
	}
28
29
}
30