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

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