GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

Code Duplication    Length = 39-40 lines in 3 locations

component/admin/models/languages.php 1 location

@@ 79-117 (lines=39) @@
76
	 *
77
	 * @return  mixed  JForm object on success, false on failure.
78
	 */
79
	public function getForm()
80
	{
81
		// Initialise variables.
82
		$app = JFactory::getApplication();
83
84
		// Get the form.
85
		jimport('joomla.form.form');
86
		JForm::addFormPath(JPATH_COMPONENT . '/models/forms');
87
		JForm::addFieldPath(JPATH_COMPONENT . '/models/fields');
88
		$form = JForm::getInstance('com_localise.languages', 'languages', array('control' => 'filters','event'   => 'onPrepareForm'));
89
90
		// Check for an error.
91
		if (JError::isError($form))
92
		{
93
			$this->setError($form->getMessage());
94
95
			return false;
96
		}
97
98
		// Check the session for previously entered form data.
99
		$data = $app->getUserState('com_localise.select', array());
100
101
		// Bind the form data if present.
102
		if (!empty($data))
103
		{
104
			$form->bind(array('select' => $data));
105
		}
106
107
		// Check the session for previously entered form data.
108
		$data = $app->getUserState('com_localise.languages.search', array());
109
110
		// Bind the form data if present.
111
		if (!empty($data))
112
		{
113
			$form->bind(array('search' => $data));
114
		}
115
116
		return $form;
117
	}
118
119
	/**
120
	 * Get the items (according the filters and the pagination)

component/admin/models/packages.php 1 location

@@ 168-207 (lines=40) @@
165
	 *
166
	 * @return  mixed  JForm object on success, false on failure.
167
	 */
168
	public function getForm()
169
	{
170
		// Initialise variables.
171
		$app = JFactory::getApplication();
172
173
		// Get the form.
174
		jimport('joomla.form.form');
175
		JForm::addFormPath(JPATH_COMPONENT . '/models/forms');
176
		JForm::addFieldPath(JPATH_COMPONENT . '/models/fields');
177
178
		$form = JForm::getInstance('com_localise.packages', 'packages', array('control' => 'filters', 'event' => 'onPrepareForm'));
179
180
		// Check for an error.
181
		if (JError::isError($form))
182
		{
183
			$this->setError($form->getMessage());
184
185
			return false;
186
		}
187
188
		// Check the session for previously entered form data.
189
		$data = $app->getUserState('com_localise.select', array());
190
191
		// Bind the form data if present.
192
		if (!empty($data))
193
		{
194
			$form->bind(array('select' => $data));
195
		}
196
197
		// Check the session for previously entered form data.
198
		$data = $app->getUserState('com_localise.packages.search', array());
199
200
		// Bind the form data if present.
201
		if (!empty($data))
202
		{
203
			$form->bind(array('search' => $data));
204
		}
205
206
		return $form;
207
	}
208
209
	/**
210
	 * Remove packages

component/admin/models/translations.php 1 location

@@ 139-177 (lines=39) @@
136
	 *
137
	 * @return  mixed  JForm object on success, false on failure.
138
	 */
139
	public function getForm()
140
	{
141
		// Initialise variables.
142
		$app = JFactory::getApplication();
143
144
		// Get the form.
145
		jimport('joomla.form.form');
146
		JForm::addFormPath(JPATH_COMPONENT . '/models/forms');
147
		JForm::addFieldPath(JPATH_COMPONENT . '/models/fields');
148
		$form = JForm::getInstance('com_localise.translations', 'translations', array('control' => 'filters', 'event' => 'onPrepareForm'));
149
150
		// Check for an error.
151
		if (JError::isError($form))
152
		{
153
			$this->setError($form->getMessage());
154
155
			return false;
156
		}
157
158
		// Check the session for previously entered form data.
159
		$data = $app->getUserState('com_localise.select', array());
160
161
		// Bind the form data if present.
162
		if (!empty($data))
163
		{
164
			$form->bind(array('select' => $data));
165
		}
166
167
		// Check the session for previously entered form data.
168
		$data = $app->getUserState('com_localise.translations.filter.search', array());
169
170
		// Bind the form data if present.
171
		if (!empty($data))
172
		{
173
			$form->bind(array('search' => $data));
174
		}
175
176
		return $form;
177
	}
178
179
	/**
180
	 * todo: missing description