Code Duplication    Length = 11-12 lines in 2 locations

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

@@ 130-141 (lines=12) @@
127
	 * @param Principal $principalBackend
128
	 * @param IConfig $config
129
	 */
130
	public function __construct(IDBConnection $db,
131
								Principal $principalBackend,
132
								IConfig $config,
133
								ISecureRandom $random,
134
								$legacyMode = false) {
135
		$this->db = $db;
136
		$this->principalBackend = $principalBackend;
137
		$this->sharingBackend = new Backend($this->db, $principalBackend, 'calendar');
138
		$this->config = $config;
139
		$this->random = $random;
140
		$this->legacyMode = $legacyMode;
141
	}
142
143
	/**
144
	 * Returns a list of calendars for a principal.

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

@@ 83-93 (lines=11) @@
80
	 * @param Principal $principalBackend
81
	 * @param EventDispatcherInterface $dispatcher
82
	 */
83
	public function __construct(IDBConnection $db,
84
								Principal $principalBackend,
85
								EventDispatcherInterface $dispatcher = null,
86
								$legacyMode = false) {
87
		$this->db = $db;
88
		$this->principalBackend = $principalBackend;
89
		$this->dispatcher = $dispatcher;
90
		$this->sharingBackend = new Backend($this->db, $principalBackend, 'addressbook');
91
		$this->legacyMode = $legacyMode;
92
		$this->idCache = new CappedMemoryCache();
93
	}
94
95
	/**
96
	 * Returns the list of address books for a specific user.