Passed
Push — dev ( 32cf61...3b2d64 )
by Salim
03:46
created
src/models/Export_Study_Data.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
 			foreach ($reviewsObjects as $reviewObject) {
84 84
 
85 85
 				foreach ($reviewObject->associatedFiles as $associatedFileKey => $associatedFilePath) {
86
-					$associatedFileLocation = $reviewObject->getAssociatedFilePath($associatedFileKey);
86
+					$associatedFileLocation=$reviewObject->getAssociatedFilePath($associatedFileKey);
87 87
 					$zip->addFile($associatedFileLocation);
88 88
 
89 89
 				};
@@ -256,9 +256,9 @@  discard block
 block discarded – undo
256 256
 		$reviewDatas=$this->getGenericData($review);
257 257
 		$specificData=$review->getSpecificData();
258 258
 		unset($specificData["id_review"]);
259
-		$specificDataArray = [];
260
-		if( !empty($specificData) ){
261
-			$specificDataArray = array_values($specificData);
259
+		$specificDataArray=[];
260
+		if (!empty($specificData)) {
261
+			$specificDataArray=array_values($specificData);
262 262
 		}
263 263
 		$reviewLine=[...$reviewDatas, ...$specificDataArray];
264 264
 
Please login to merge, or discard this patch.
src/models/Import_Patient.php 1 patch
Braces   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
 				if (GAELO_DATE_FORMAT == 'm.d.Y') {
62 62
 					$birthDay=intval($birthDateArray[1]);
63 63
 					$birthMonth=intval($birthDateArray[0]);
64
-				}else if (GAELO_DATE_FORMAT == 'd.m.Y') {
64
+				} else if (GAELO_DATE_FORMAT == 'd.m.Y') {
65 65
 					$birthDay=intval($birthDateArray[0]);
66 66
 					$birthMonth=intval($birthDateArray[1]);
67 67
 				}
@@ -73,31 +73,31 @@  discard block
 block discarded – undo
73 73
 				//Store the patient result import process in this object
74 74
 				if ($insertddb) {
75 75
 						$this->sucessList[]=$patientNumber;
76
-				}else {
76
+				} else {
77 77
 					$patientFailed['PatientNumber']=$patientNumber;
78 78
 					$patientFailed['Reason']="Can't write to DB, wrong date or other wrong input";
79 79
 					$this->failList[]=$patientFailed;
80 80
 				}
81 81
 
82 82
 			//If conditions not met, add to the fail list with the respective error reason
83
-			}else {
83
+			} else {
84 84
 			    
85 85
 				if (!$isExistingCenter) {
86 86
 					if (empty($patientInvestigatorNumCenter)) {
87 87
 						$this->failList['Missing Num Center'][]=$patientNumber;
88
-					}else {
88
+					} else {
89 89
 						$this->failList['Unknown Center'][]=$patientNumber;
90 90
 					}
91 91
 
92
-				}else if (!$isCorrectPatientNumberLenght) {
92
+				} else if (!$isCorrectPatientNumberLenght) {
93 93
 					$this->failList['Wrong PatientNumber length'][]=$patientNumber;
94 94
 				    
95
-				}else if (!$isNewPatient) {
95
+				} else if (!$isNewPatient) {
96 96
 					$this->failList['Patient already in Database'][]=$patientNumber;
97 97
 				    
98
-				}else if (empty($patientRegistrationDate)) {
98
+				} else if (empty($patientRegistrationDate)) {
99 99
 					$this->failList['Empty Registration Date'][]=$patientNumber;
100
-				}else if (!$isPrefixCorrect) {
100
+				} else if (!$isPrefixCorrect) {
101 101
 					$this->failList['Wrong Patient Code Prefix'][]=$patientNumber;
102 102
 				}
103 103
 				
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
 		if (GAELO_DATE_FORMAT == 'm.d.Y') {
120 120
 			$registrationDay=intval($dateNbArray[1]);
121 121
 			$registrationMonth=intval($dateNbArray[0]);
122
-		}else if (GAELO_DATE_FORMAT == 'd.m.Y') {
122
+		} else if (GAELO_DATE_FORMAT == 'd.m.Y') {
123 123
 			$registrationDay=intval($dateNbArray[0]);
124 124
 			$registrationMonth=intval($dateNbArray[1]);
125 125
 		}
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
 	    
133 133
 		try {
134 134
 			$dateResult=new DateTime($registrationYear.'-'.$registrationMonth.'-'.$registrationDay);
135
-		}catch (Exception $e) {
135
+		} catch (Exception $e) {
136 136
 			return null;
137 137
 		}
138 138
 		return $dateResult;
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
 	private function isNewPatient($patientCode) {
149 149
 		try {
150 150
 			new Patient($patientCode, $this->linkpdo);
151
-		}catch (Exception $e1) {
151
+		} catch (Exception $e1) {
152 152
 			return true;
153 153
 		}
154 154
 	    
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
 		
166 166
 		if ($lenghtImport == GAELO_PATIENT_CODE_LENGHT) {
167 167
 			return true;
168
-		}else {
168
+		} else {
169 169
 			return false;
170 170
 		}
171 171
 	}
@@ -199,7 +199,7 @@  discard block
 block discarded – undo
199 199
 	    
200 200
 		try {
201 201
 			new Center($this->linkpdo, $patientNumCenter);
202
-		}catch (Exception $e1) {
202
+		} catch (Exception $e1) {
203 203
 			return false;
204 204
 		}
205 205
 	    
@@ -238,7 +238,7 @@  discard block
 block discarded – undo
238 238
 													'center' => $patientInvestigatorNumCenter,
239 239
 													'study' => $this->study));
240 240
 			$success=true;
241
-		}catch (Exception $e) {
241
+		} catch (Exception $e) {
242 242
 			$success=false;
243 243
 		}
244 244
 
@@ -270,12 +270,12 @@  discard block
 block discarded – undo
270 270
 					$failReport=$failReport.$key.':<br>';
271 271
 					if (is_array($value)) {
272 272
 						$failReport=$failReport.implode('<br>', $value).'<br>';
273
-					}else {
273
+					} else {
274 274
 						$failReport=$failReport.$value.'<br>';
275 275
 					}
276 276
 				}
277 277
 			}
278
-		}else {
278
+		} else {
279 279
 			$failReport=$failReport.' None <br>';
280 280
 		}
281 281
 	    
@@ -294,7 +294,7 @@  discard block
 block discarded – undo
294 294
 				$success=$value;
295 295
 				$successReport=$successReport.$success.'<br>';
296 296
 			}
297
-		}else {
297
+		} else {
298 298
 			$successReport=$successReport.' None <br>';
299 299
 		}
300 300
 	    
Please login to merge, or discard this patch.