Passed
Push — master ( 9e08b1...d0105f )
by Salim
08:36
created
src/data/_config/tus_server.php 1 patch
Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -2,20 +2,20 @@
 block discarded – undo
2 2
 
3 3
 return [
4 4
 
5
-    /**
6
-     * Redis connection parameters.
7
-     */
8
-    'redis' => [
9
-        'host' => getenv('REDIS_HOST') !== false ? getenv('REDIS_HOST') : '127.0.0.1',
10
-        'port' => getenv('REDIS_PORT') !== false ? getenv('REDIS_PORT') : '6379',
11
-        'database' => getenv('REDIS_DB') !== false ? getenv('REDIS_DB') : 0,
12
-    ],
5
+	/**
6
+	 * Redis connection parameters.
7
+	 */
8
+	'redis' => [
9
+		'host' => getenv('REDIS_HOST') !== false ? getenv('REDIS_HOST') : '127.0.0.1',
10
+		'port' => getenv('REDIS_PORT') !== false ? getenv('REDIS_PORT') : '6379',
11
+		'database' => getenv('REDIS_DB') !== false ? getenv('REDIS_DB') : 0,
12
+	],
13 13
 
14
-    /**
15
-     * File cache configs.
16
-     */
17
-    'file' => [
18
-        'dir' => $_SERVER['DOCUMENT_ROOT'].'/data/upload' . DIRECTORY_SEPARATOR . '.cache' . DIRECTORY_SEPARATOR,
19
-        'name' => 'tus_php.server.cache',
20
-    ],
14
+	/**
15
+	 * File cache configs.
16
+	 */
17
+	'file' => [
18
+		'dir' => $_SERVER['DOCUMENT_ROOT'].'/data/upload' . DIRECTORY_SEPARATOR . '.cache' . DIRECTORY_SEPARATOR,
19
+		'name' => 'tus_php.server.cache',
20
+	],
21 21
 ];
22 22
\ No newline at end of file
Please login to merge, or discard this patch.
src/scripts/tus_reverse_proxy.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -32,9 +32,9 @@  discard block
 block discarded – undo
32 32
 
33 33
 if ($roleAllowed ) {   
34 34
 
35
-    unset($_GET['page']);
35
+	unset($_GET['page']);
36 36
 	// Create a PSR7 request based on the current browser request.
37
-    $request=ServerRequestFactory::fromGlobals();
37
+	$request=ServerRequestFactory::fromGlobals();
38 38
     
39 39
 	// Create a guzzle client
40 40
 	$guzzle=new GuzzleHttp\Client();
@@ -50,13 +50,13 @@  discard block
 block discarded – undo
50 50
 		$url = getenv("HOST_URL");
51 51
 		$port = getenv("HOST_PORT");
52 52
 		$protocol = getenv("HOST_PROTOCOL");
53
-        $request=$request->withHeader('X-Forwarded-Host', $url.':'.$port);
54
-        $request=$request->withHeader('X-Forwarded-Proto', $protocol);
53
+		$request=$request->withHeader('X-Forwarded-Host', $url.':'.$port);
54
+		$request=$request->withHeader('X-Forwarded-Proto', $protocol);
55 55
 		$response=$next($request, $response);
56 56
         
57 57
 		return $response;
58 58
 	}) -> to(TUS_SERVER);
59
-    //error_log(print_r($response, true));
59
+	//error_log(print_r($response, true));
60 60
 	// Output response to the browser.
61 61
 	(new Narrowspark\HttpEmitter\SapiEmitter)->emit($response);
62 62
 
Please login to merge, or discard this patch.
src/models/Visit.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -236,7 +236,7 @@  discard block
 block discarded – undo
236 236
         
237 237
 		$update->execute(array('id_visit' => $this->id_visit));
238 238
 		//Set visit to not review available (include a refresh of the current object)
239
-        $this->changeReviewAvailability(false);
239
+		$this->changeReviewAvailability(false);
240 240
         
241 241
 	}
242 242
     
@@ -335,7 +335,7 @@  discard block
 block discarded – undo
335 335
 	 * @return Review|Review[]
336 336
 	 */
337 337
 	public function getReviewsObject(bool $local, bool $onlyValidated=false) {
338
-        if(!$onlyValidated){
338
+		if(!$onlyValidated){
339 339
 			$reviewQuery=$this->linkpdo->prepare('SELECT id_review FROM reviews WHERE id_visit=:idVisit AND deleted=0 AND is_local=:isLocal');
340 340
         
341 341
 		}else{
Please login to merge, or discard this patch.
src/scripts/validate_dicom_upload_tus.php 1 patch
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
 	ignore_user_abort(true);
60 60
 	//Set Visit as upload processing status
61 61
 	$visitObject->changeUploadStatus(Visit::UPLOAD_PROCESSING);
62
-    $start_time=microtime(true);
62
+	$start_time=microtime(true);
63 63
 	/**
64 64
 	 * Try block as each interruption of the proccess must make visit return as upload not done
65 65
 	 * To allow new upload
@@ -165,11 +165,11 @@  discard block
 block discarded – undo
165 165
 			continue;
166 166
 		}
167 167
 		$files[]=$file->getPathname();
168
-    }
168
+	}
169 169
     
170
-    if(sizeof($files) != $nbOfInstances){
171
-        throw new Exception("Number Of Uploaded Files dosen't match expected instance number");
172
-    }
170
+	if(sizeof($files) != $nbOfInstances){
171
+		throw new Exception("Number Of Uploaded Files dosen't match expected instance number");
172
+	}
173 173
 	
174 174
 	$importedMap=null;
175 175
 	$importedInstances=0;
@@ -271,31 +271,31 @@  discard block
 block discarded – undo
271 271
 
272 272
 function get_tus_file($fileName) {
273 273
     
274
-    $client = new Client([
275
-        // Base URI is used with relative requests
274
+	$client = new Client([
275
+		// Base URI is used with relative requests
276 276
 		'base_uri' => TUS_SERVER.'/tus/',
277 277
 		'headers' => ['Tus-Resumable' => '1.0.0']
278
-    ]);
278
+	]);
279 279
 	$downloadedFileName = tempnam(sys_get_temp_dir(), 'dicom');
280 280
 
281 281
 	$resource  = fopen( $downloadedFileName, 'r+');
282 282
 	
283 283
 	$client->request('GET', $fileName, ['sink' => $resource]);
284 284
 
285
-    return $downloadedFileName;
285
+	return $downloadedFileName;
286 286
 }
287 287
 
288 288
 function delete_tus_file($fileName){
289 289
 
290
-    $client = new Client([
291
-        // Base URI is used with relative requests
290
+	$client = new Client([
291
+		// Base URI is used with relative requests
292 292
 		'base_uri' => TUS_SERVER.'/tus/',
293 293
 		'headers' => ['Tus-Resumable' => '1.0.0']
294
-    ]);
294
+	]);
295 295
 
296 296
 	$client->request('DELETE', $fileName);
297 297
 	
298
-    //$code = $response->getStatusCode(); // 200
298
+	//$code = $response->getStatusCode(); // 200
299 299
 	//$reason = $response->getReasonPhrase(); // OK
300 300
 
301 301
 }
Please login to merge, or discard this patch.