Code Duplication    Length = 3-3 lines in 3 locations

apps/workflowengine/lib/Check/AbstractStringCheck.php 1 location

@@ 94-96 (lines=3) @@
91
	 * @throws \UnexpectedValueException
92
	 */
93
	public function validateCheck($operator, $value) {
94
		if (!in_array($operator, ['is', '!is', 'matches', '!matches'])) {
95
			throw new \UnexpectedValueException($this->l->t('The given operator is invalid'), 1);
96
		}
97
98
		if (in_array($operator, ['matches', '!matches']) &&
99
			  @preg_match($value, null) === false) {

apps/workflowengine/lib/Check/FileSize.php 1 location

@@ 88-90 (lines=3) @@
85
	 * @throws \UnexpectedValueException
86
	 */
87
	public function validateCheck($operator, $value) {
88
		if (!in_array($operator, ['less', '!less', 'greater', '!greater'])) {
89
			throw new \UnexpectedValueException($this->l->t('The given operator is invalid'), 1);
90
		}
91
92
		if (!preg_match('/^[0-9]+[ ]?[kmgt]?b$/i', $value)) {
93
			throw new \UnexpectedValueException($this->l->t('The given file size is invalid'), 2);

apps/workflowengine/lib/Check/RequestRemoteAddress.php 1 location

@@ 81-83 (lines=3) @@
78
	 * @throws \UnexpectedValueException
79
	 */
80
	public function validateCheck($operator, $value) {
81
		if (!in_array($operator, ['matchesIPv4', '!matchesIPv4', 'matchesIPv6', '!matchesIPv6'])) {
82
			throw new \UnexpectedValueException($this->l->t('The given operator is invalid'), 1);
83
		}
84
85
		$decodedValue = explode('/', $value);
86
		if (sizeof($decodedValue) !== 2) {