Code Duplication    Length = 13-13 lines in 2 locations

src/Component/Component.php 1 location

@@ 195-207 (lines=13) @@
192
	 *
193
	 * @return  \stdClass
194
	 */
195
	protected function loadExtension()
196
	{
197
		$db = \JFactory::getDbo();
198
		$query = $db->getQuery(true)
199
			->select('*')
200
			->from('#__extensions')
201
			->where('type = ' . $db->quote('component'))
202
			->where('element = ' . $db->q($this->option));
203
204
		$db->setQuery($query);
205
206
		return $db->loadObject() ?: new \stdClass;
207
	}
208
209
	/**
210
	 * Load parameters from database.

src/Module/Module.php 1 location

@@ 277-289 (lines=13) @@
274
	 *
275
	 * @return  \stdClass
276
	 */
277
	protected function loadExtension()
278
	{
279
		$db = \JFactory::getDbo();
280
		$query = $db->getQuery(true)
281
			->select('*')
282
			->from('#__extensions')
283
			->where('type = ' . $db->quote('module'))
284
			->where('name = ' . $db->q($this->element));
285
286
		$db->setQuery($query);
287
288
		return $db->loadObject() ?: new \stdClass;
289
	}
290
291
	/**
292
	 * Load layout data.