Passed
Push — dev ( 9e8eaa...80f372 )
by Salim
03:52
created
src/scripts/study.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
 		$studyName=$_POST['studyName'];
43 43
 		$visitsGroupArray=$_POST['visitsData'];
44 44
 		$patientCodePrefix=$_POST['patientCodePrefix'];
45
-		if(empty($patientCodePrefix)) $patientCodePrefix = null;
45
+		if (empty($patientCodePrefix)) $patientCodePrefix=null;
46 46
 		//Add the new study as an active study
47 47
 		Study::createStudy($studyName, $patientCodePrefix, $linkpdo);
48 48
          
Please login to merge, or discard this patch.
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -35,14 +35,16 @@  discard block
 block discarded – undo
35 35
 
36 36
 	}
37 37
 
38
-}else if ($_SERVER['REQUEST_METHOD'] === 'POST') {
38
+} else if ($_SERVER['REQUEST_METHOD'] === 'POST') {
39 39
 
40 40
 	if ($_SESSION['admin']) {
41 41
 
42 42
 		$studyName=$_POST['studyName'];
43 43
 		$visitsGroupArray=$_POST['visitsData'];
44 44
 		$patientCodePrefix=$_POST['patientCodePrefix'];
45
-		if(empty($patientCodePrefix)) $patientCodePrefix = null;
45
+		if(empty($patientCodePrefix)) {
46
+			$patientCodePrefix = null;
47
+		}
46 48
 		//Add the new study as an active study
47 49
 		Study::createStudy($studyName, $patientCodePrefix, $linkpdo);
48 50
          
@@ -100,12 +102,12 @@  discard block
 block discarded – undo
100 102
         
101 103
 		echo(json_encode(true));
102 104
         
103
-	}else {
105
+	} else {
104 106
 		echo(json_encode(false));
105 107
 	}
106 108
     
107 109
 
108 110
 
109
-}else if ($_SERVER['REQUEST_METHOD'] === 'PUT') {
111
+} else if ($_SERVER['REQUEST_METHOD'] === 'PUT') {
110 112
 
111 113
 }
112 114
\ No newline at end of file
Please login to merge, or discard this patch.