Code Duplication    Length = 7-13 lines in 2 locations

lib/UserLacksOwnership.php 1 location

@@ 61-67 (lines=7) @@
58
	 * @param string $message
59
	 * @param \Exception|null $previous
60
	 */
61
	public function __construct(User $user, $resource, $message = self::DEFAULT_MESSAGE, \Exception $previous = null)
62
	{
63
		$this->user = $user;
64
		$this->resource = $resource;
65
66
		parent::__construct($message, Status::FORBIDDEN, $previous);
67
	}
68
}
69

lib/UserLacksPermission.php 1 location

@@ 76-88 (lines=13) @@
73
	 * @param string $message
74
	 * @param \Exception|null $previous
75
	 */
76
	public function __construct(
77
		User $user,
78
		$permission,
79
		$resource = null,
80
		$message = self::DEFAULT_MESSAGE,
81
		\Exception $previous = null
82
	) {
83
		$this->user = $user;
84
		$this->permission = $permission;
85
		$this->resource = $resource;
86
87
		parent::__construct($message, Status::FORBIDDEN, $previous);
88
	}
89
}
90