Passed
Push — master ( 9e08b1...d0105f )
by Salim
08:36
created
src/scripts/get_account_details.php 1 patch
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
 		if ($_SESSION['admin'] && isset($_POST['Username'])) {
34 34
 			//Administrator updating data
35 35
 
36
-		}else {
36
+		} else {
37 37
 			//User updates it's own data
38 38
 			$userObject->updateUser($_POST['LastName'], $_POST['FirstName'], $userObject->userEmail, $_POST['Phone'], $userObject->userJob,
39 39
 									$userObject->userStatus, $userObject->isAdministrator, $userObject->mainCenter, $userObject->orthancAddress, 
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 	echo(json_encode($answer));
57 57
    
58 58
     
59
-}else {
59
+} else {
60 60
 
61 61
 	header('HTTP/1.0 403 Forbidden');
62 62
 	die('You are not allowed to access this file.');
Please login to merge, or discard this patch.
src/scripts/dicom_web.php 2 patches
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 $permissionDicomWebObject=new Dicom_Web_Access($_SERVER['REQUEST_URI'], $userObject, $_SESSION['role'], $linkpdo);
33 33
 try {
34 34
 	$permissionDicomWeb=$permissionDicomWebObject->getDecision();
35
-}catch (Exception $e) {
35
+} catch (Exception $e) {
36 36
 	header('HTTP/1.0 403 Forbidden');
37 37
 	exit();
38 38
 }
@@ -77,6 +77,6 @@  discard block
 block discarded – undo
77 77
 	// Output response to the browser.
78 78
 	(new Narrowspark\HttpEmitter\SapiEmitter)->emit($response);
79 79
 
80
-}else {
80
+} else {
81 81
 	header('HTTP/1.0 403 Forbidden');
82 82
 }
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -57,9 +57,9 @@
 block discarded – undo
57 57
 	// Forward the request and get the response.
58 58
 	$response=$proxy -> forward($request) -> filter(function($request, $response, $next) {
59 59
 		// Manipulate the request object.
60
-		$url = getenv("HOST_URL");
61
-		$port = getenv("HOST_PORT");
62
-		$protocol = getenv("HOST_PROTOCOL");
60
+		$url=getenv("HOST_URL");
61
+		$port=getenv("HOST_PORT");
62
+		$protocol=getenv("HOST_PROTOCOL");
63 63
 		$request=$request->withHeader('Forwarded', 'by=localhost;for=localhost;host='.$url.':'.$port.'/orthanc'.';proto='.$protocol);
64 64
 
65 65
 		$response=$next($request, $response);
Please login to merge, or discard this patch.
src/scripts/delete_form.php 1 patch
Braces   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 			$actionDetails['reason']=$reason;
48 48
 			Tracker::logActivity($_SESSION['username'], $_SESSION['role'], $_SESSION['study'], $reviewObject->id_visit, "Delete Form", $actionDetails);
49 49
 			$answer=true;
50
-		}catch (Throwable $t) {
50
+		} catch (Throwable $t) {
51 51
 			error_log($t->getMessage());
52 52
 			$answer=false;
53 53
 		}
@@ -57,12 +57,12 @@  discard block
 block discarded – undo
57 57
 		$email->addEmail($email->getUserEmails($reviewObject->username));
58 58
 		$email->sendDeletedFormMessage($visitObject->study, $visitObject->patientCode, $visitObject->visitType);
59 59
 
60
-	}else {
60
+	} else {
61 61
 		$answer=false;
62 62
 	}
63 63
 	
64 64
 	echo(json_encode($answer));
65 65
 	
66
-}else {
66
+} else {
67 67
 	echo(json_encode(false));
68 68
 }
Please login to merge, or discard this patch.
src/scripts/export_users.php 1 patch
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
 		}
42 42
         
43 43
         
44
-	}else {
44
+	} else {
45 45
 		//Select users from the called study
46 46
 		$studyObject=new Study($study, $linkpdo);
47 47
 		$usersObjectArray=$studyObject->getUsersWithRoleInStudy();
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 	fclose($output);
72 72
 
73 73
     
74
-}else {
74
+} else {
75 75
 	header('HTTP/1.0 403 Forbidden');
76 76
 	die('You are not allowed to access this file.'); 
77 77
 }
78 78
\ No newline at end of file
Please login to merge, or discard this patch.
src/scripts/get_review_attached_file.php 1 patch
Braces   +7 added lines, -4 removed lines patch added patch discarded remove patch
@@ -30,8 +30,11 @@  discard block
 block discarded – undo
30 30
 
31 31
 if ($accessCheck && in_array($_SESSION['role'], array(User::INVESTIGATOR, User::REVIEWER))) {
32 32
     
33
-	if ($_SESSION['role'] == User::INVESTIGATOR) $reviewObject=$visitObject->getReviewsObject(true);
34
-	else $reviewObject=$visitObject->queryExistingReviewForReviewer($_SESSION['username']);
33
+	if ($_SESSION['role'] == User::INVESTIGATOR) {
34
+		$reviewObject=$visitObject->getReviewsObject(true);
35
+	} else {
36
+		$reviewObject=$visitObject->queryExistingReviewForReviewer($_SESSION['username']);
37
+	}
35 38
 
36 39
 	$filePath=$reviewObject->getAssociatedFilePath($fileKey);
37 40
     
@@ -48,11 +51,11 @@  discard block
 block discarded – undo
48 51
 			flush();
49 52
 		}
50 53
 		fclose($file);
51
-	}else {
54
+	} else {
52 55
 		throw new Exception("Can't Find Attached File");
53 56
 	}
54 57
 
55
-}else {
58
+} else {
56 59
 	header('HTTP/1.0 403 Forbidden');
57 60
 	die('You are not allowed to access this file.');
58 61
 }
59 62
\ No newline at end of file
Please login to merge, or discard this patch.
src/scripts/get_job_progress.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
     
33 33
 	echo(json_encode($jobInfos));
34 34
     
35
-}else {
35
+} else {
36 36
 	header('HTTP/1.0 403 Forbidden');
37 37
 	die('You are not allowed to access this file.');
38 38
 }
Please login to merge, or discard this patch.
src/scripts/get_patient_status.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,6 +40,6 @@
 block discarded – undo
40 40
     
41 41
 	echo(json_encode($patientStatus));
42 42
     
43
-}else {
43
+} else {
44 44
 	echo(json_encode("No Access"));
45 45
 }
46 46
\ No newline at end of file
Please login to merge, or discard this patch.
src/scripts/get_series_json.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -74,6 +74,6 @@
 block discarded – undo
74 74
     
75 75
 	echo(json_encode($json));
76 76
     
77
-}else {
77
+} else {
78 78
 	echo(json_encode("No Access"));
79 79
 }
80 80
\ No newline at end of file
Please login to merge, or discard this patch.
src/scripts/visit.php 1 patch
Braces   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
 
31 31
 if ($_SERVER['REQUEST_METHOD'] === 'GET') {
32 32
 
33
-}else if ($_SERVER['REQUEST_METHOD'] === 'POST') {
33
+} else if ($_SERVER['REQUEST_METHOD'] === 'POST') {
34 34
 
35 35
 	$patientCode=$_POST['patient_num'];
36 36
 	$userObject=new User($username, $linkpdo);
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
 				$actionDetails['modality_visit']=$visitObject->visitGroupObject->groupModality;
59 59
 				Tracker::logActivity($username, $_SESSION['role'], $study, $visitObject->id_visit, "Create Visit", $actionDetails);
60 60
 				$answer="Success";
61
-			}else {
61
+			} else {
62 62
 				$answer="Missing Data";
63 63
 			}
64 64
             
@@ -73,6 +73,6 @@  discard block
 block discarded – undo
73 73
 			echo(json_encode($answer));
74 74
 	}   
75 75
 
76
-}else if ($_SERVER['REQUEST_METHOD'] === 'PUT') {
76
+} else if ($_SERVER['REQUEST_METHOD'] === 'PUT') {
77 77
 
78 78
 }
79 79
\ No newline at end of file
Please login to merge, or discard this patch.