Code Duplication    Length = 6-10 lines in 2 locations

apps/dav/lib/CalDAV/CalDavBackend.php 1 location

@@ 128-133 (lines=6) @@
125
	 * @param Principal $principalBackend
126
	 * @param IUserManager $userManager
127
	 */
128
	public function __construct(IDBConnection $db, Principal $principalBackend, IUserManager $userManager) {
129
		$this->db = $db;
130
		$this->principalBackend = $principalBackend;
131
		$this->userManager = $userManager;
132
		$this->sharingBackend = new Backend($this->db, $principalBackend, 'calendar');
133
	}
134
135
	/**
136
	 * Returns a list of calendars for a principal.

apps/dav/lib/CardDAV/CardDavBackend.php 1 location

@@ 90-99 (lines=10) @@
87
	 * @param IUserManager $userManager
88
	 * @param EventDispatcherInterface $dispatcher
89
	 */
90
	public function __construct(IDBConnection $db,
91
								Principal $principalBackend,
92
								IUserManager $userManager,
93
								EventDispatcherInterface $dispatcher = null) {
94
		$this->db = $db;
95
		$this->principalBackend = $principalBackend;
96
		$this->userManager = $userManager;
97
		$this->dispatcher = $dispatcher;
98
		$this->sharingBackend = new Backend($this->db, $principalBackend, 'addressbook');
99
	}
100
101
	/**
102
	 * Returns the list of address books for a specific user.