GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

FileManagerController   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 4

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 4
dl 0
loc 20
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A getPublish() 0 13 1
1
<?php
2
3
namespace rdx\filemanager;
4
5
use Illuminate\Routing\Controller;
6
use rdx\filemanager\FileManager;
7
8
class FileManagerController extends Controller {
9
10
	/**
11
	 *
12
	 */
13
	public function getPublish(FileManager $files, $publisher, $path) {
14
		$file = $files->findByPathOrFail($path);
15
		$mime = $file->file->getMimeType();
16
17
		$_time = microtime(1);
18
		$files->publish($publisher, $file);
19
		$_time = microtime(1) - $_time;
20
21
		header("Content-type: $mime");
22
		header("X-publishing-time: " . round($_time * 1000));
23
		readfile($file->publicPath($publisher));
24
		exit;
0 ignored issues
show
Coding Style Compatibility introduced by
The method getPublish() contains an exit expression.

An exit expression should only be used in rare cases. For example, if you write a short command line script.

In most cases however, using an exit expression makes the code untestable and often causes incompatibilities with other libraries. Thus, unless you are absolutely sure it is required here, we recommend to refactor your code to avoid its usage.

Loading history...
25
	}
26
27
}
28