Code Duplication    Length = 9-11 lines in 11 locations

lib/Exceptions/CircleAlreadyExistsException.php 1 location

@@ 29-38 (lines=10) @@
26
27
namespace OCA\Circles\Exceptions;
28
29
class CircleAlreadyExistsException extends \Exception {
30
31
	public function __construct($message = "", $code = 0, \Exception $previous = null) {
32
		if ($message === '') {
33
			$message = 'A circle with this name already exist';
34
		}
35
36
		parent::__construct($message, $code, $previous);
37
	}
38
39
}
40
41

lib/Exceptions/CircleCreationException.php 1 location

@@ 29-38 (lines=10) @@
26
27
namespace OCA\Circles\Exceptions;
28
29
class CircleCreationException extends \Exception {
30
31
	public function __construct($message = "", $code = 0, \Exception $previous = null) {
32
		if ($message === '') {
33
			$message = 'Unknown exception during Circle Creation';
34
		}
35
36
		parent::__construct($message, $code, $previous);
37
	}
38
39
}
40
41

lib/Exceptions/MemberAlreadyExistsException.php 1 location

@@ 29-38 (lines=10) @@
26
27
namespace OCA\Circles\Exceptions;
28
29
class MemberAlreadyExistsException extends \Exception {
30
31
	public function __construct($message = "", $code = 0, \Exception $previous = null) {
32
		if ($message === '') {
33
			$message = 'This user is already a member of the circle';
34
		}
35
36
		parent::__construct($message, $code, $previous);
37
	}
38
39
}
40
41

lib/Exceptions/MemberIsBlockedException.php 1 location

@@ 29-38 (lines=10) @@
26
27
namespace OCA\Circles\Exceptions;
28
29
class MemberIsBlockedException extends \Exception {
30
31
	public function __construct($message = "", $code = 0, \Exception $previous = null) {
32
		if ($message === '') {
33
			$message = 'This member is blocked';
34
		}
35
36
		parent::__construct($message, $code, $previous);
37
	}
38
39
}
40
41

lib/Exceptions/MemberIsNotInvitedException.php 1 location

@@ 29-38 (lines=10) @@
26
27
namespace OCA\Circles\Exceptions;
28
29
class MemberIsNotInvitedException extends \Exception {
30
31
	public function __construct($message = "", $code = 0, \Exception $previous = null) {
32
		if ($message === '') {
33
			$message = 'This member is not invited';
34
		}
35
36
		parent::__construct($message, $code, $previous);
37
	}
38
39
}
40
41

lib/Exceptions/MemberIsNotModeratorException.php 1 location

@@ 29-38 (lines=10) @@
26
27
namespace OCA\Circles\Exceptions;
28
29
class MemberIsNotModeratorException extends \Exception {
30
31
	public function __construct($message = "", $code = 0, \Exception $previous = null) {
32
		if ($message === '') {
33
			$message = 'This member is not a moderator';
34
		}
35
36
		parent::__construct($message, $code, $previous);
37
	}
38
39
}
40
41

lib/Exceptions/MemberIsOwnerException.php 1 location

@@ 29-38 (lines=10) @@
26
27
namespace OCA\Circles\Exceptions;
28
29
class MemberIsOwnerException extends \Exception {
30
31
	public function __construct($message = "", $code = 0, \Exception $previous = null) {
32
		if ($message === '') {
33
			$message = 'This member is the owner of the circle';
34
		}
35
36
		parent::__construct($message, $code, $previous);
37
	}
38
39
}
40
41

lib/Exceptions/CircleDoesNotExistException.php 1 location

@@ 29-38 (lines=10) @@
26
27
namespace OCA\Circles\Exceptions;
28
29
class CircleDoesNotExistException extends \Exception {
30
31
	public function __construct($message = "", $code = 0, \Exception $previous = null) {
32
		if ($message === '') {
33
			$message = 'The circle does not exist';
34
		}
35
36
		parent::__construct($message, $code, $previous);
37
	}
38
39
}
40
41

lib/Exceptions/CircleTypeDisabledException.php 1 location

@@ 30-40 (lines=11) @@
27
namespace OCA\Circles\Exceptions;
28
29
30
class CircleTypeDisabledException extends \Exception {
31
32
	public function __construct($message = "", $code = 0, \Exception $previous = null) {
33
		if ($message === '') {
34
			$message = 'The creation of this type of circle is not allowed';
35
		}
36
37
		parent::__construct($message, $code, $previous);
38
	}
39
40
}
41
42
43

lib/Exceptions/MemberDoesNotExistException.php 1 location

@@ 30-38 (lines=9) @@
27
namespace OCA\Circles\Exceptions;
28
29
30
class MemberDoesNotExistException extends \Exception {
31
32
	public function __construct($message = "", $code = 0, \Exception $previous = null) {
33
		if ($message === '') {
34
			$message = 'This member does not exist';
35
		}
36
37
		parent::__construct($message, $code, $previous);
38
	}
39
}
40
41

lib/Exceptions/ConfigNoCircleAvailable.php 1 location

@@ 29-39 (lines=11) @@
26
27
namespace OCA\Circles\Exceptions;
28
29
class ConfigNoCircleAvailable extends \Exception {
30
31
	public function __construct($message = "", $code = 0, \Exception $previous = null) {
32
		if ($message === '') {
33
			$message = 'No type of circle are selected in the global configuration of the app';
34
		}
35
36
		parent::__construct($message, $code, $previous);
37
	}
38
39
}
40
41