CheckException   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 3
dl 0
loc 11
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
1
<?php
2
/**
3
 * Nextcloud - Gallery
4
 *
5
 * This file is licensed under the Affero General Public License version 3 or
6
 * later. See the COPYING file.
7
 *
8
 * @author Olivier Paroz <[email protected]>
9
 *
10
 * @copyright Olivier Paroz 2017
11
 */
12
13
namespace OCA\Gallery\Middleware;
14
15
use OCP\Util;
0 ignored issues
show
Bug introduced by
The type OCP\Util was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
16
17
/**
18
 * Thrown when one of the tests in the "check" middlewares fails
19
 *
20
 * @package OCA\Gallery\Middleware
21
 */
22
class CheckException extends \Exception {
23
24
	/**
25
	 * Constructor
26
	 *
27
	 * @param string $msg the message contained in the exception
28
	 * @param int $code the HTTP status code
29
	 */
30
	public function __construct($msg, $code = 0) {
31
		Util::writeLog('gallery', 'Exception: ' . $msg . ' (' . $code . ')', Util::ERROR);
32
		parent::__construct($msg, $code);
33
	}
34
35
}
36