Code Duplication    Length = 13-13 lines in 2 locations

code/model/jobs/DNDeployment.php 1 location

@@ 95-107 (lines=13) @@
92
	 *
93
	 * @return boolean
94
	 */
95
	public static function flag_new_deploy_enabled() {
96
		if (defined('FLAG_NEWDEPLOY_ENABLED') && FLAG_NEWDEPLOY_ENABLED) {
97
			return true;
98
		}
99
		if (defined('FLAG_NEWDEPLOY_ENABLED_FOR_MEMBERS') && FLAG_NEWDEPLOY_ENABLED_FOR_MEMBERS) {
100
			$allowedMembers = explode(';', FLAG_NEWDEPLOY_ENABLED_FOR_MEMBERS);
101
			$member = Member::currentUser();
102
			if ($allowedMembers && $member && in_array($member->Email, $allowedMembers)) {
103
				return true;
104
			}
105
		}
106
		return false;
107
	}
108
109
	public function setResqueToken($token) {
110
		$this->ResqueToken = $token;

code/control/DNRoot.php 1 location

@@ 198-210 (lines=13) @@
195
	 *
196
	 * @return boolean
197
	 */
198
	public static function FlagSnapshotsEnabled() {
199
		if (defined('FLAG_SNAPSHOTS_ENABLED') && FLAG_SNAPSHOTS_ENABLED) {
200
			return true;
201
		}
202
		if (defined('FLAG_SNAPSHOTS_ENABLED_FOR_MEMBERS') && FLAG_SNAPSHOTS_ENABLED_FOR_MEMBERS) {
203
			$allowedMembers = explode(';', FLAG_SNAPSHOTS_ENABLED_FOR_MEMBERS);
204
			$member = Member::currentUser();
205
			if ($allowedMembers && $member && in_array($member->Email, $allowedMembers)) {
206
				return true;
207
			}
208
		}
209
		return false;
210
	}
211
212
	/**
213
	 * @return ArrayList