Test Setup Failed
Branch master (85f869)
by Tom
08:39
created
application/src/Kineo/Controller/ResultsController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
 	{		
22 22
 		$resultsModel = new ResultsModel(new Database());
23 23
 		
24
-		if($resultsModel->getResults()) {
24
+		if ($resultsModel->getResults()) {
25 25
 			return json_encode($resultsModel->results);
26 26
 		} else {
27 27
 			return json_encode(array());
Please login to merge, or discard this patch.
application/src/Kineo/Model/BaseModel.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -10,14 +10,14 @@
 block discarded – undo
10 10
 {
11 11
 	public function hydrateObjects($collectionPropertyName, $modelType, $records)
12 12
 	{
13
-		if(empty($records)) {
13
+		if (empty($records)) {
14 14
 			throw new \Exception('No records found');
15 15
 		} else {
16
-			foreach($records as $item) {
16
+			foreach ($records as $item) {
17 17
 				// Requires a fully qualified namespace
18 18
 				$doc = new $modelType($this->app);
19 19
 				
20
-				foreach($item as $key => $val) {
20
+				foreach ($item as $key => $val) {
21 21
 					$doc->{$key} = $val;
22 22
 				}
23 23
 				
Please login to merge, or discard this patch.
application/src/Kineo/Model/ResultsModel.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
 		
30 30
 		$result = $stmt->fetchAll(\PDO::FETCH_ASSOC);
31 31
 		
32
-		if(is_array($result) && !empty($result)) {
32
+		if (is_array($result) && !empty($result)) {
33 33
 			$this->results = $result;
34 34
 			
35 35
 			return $this->results;
Please login to merge, or discard this patch.
application/src/Kineo/Model/CandidatesModel.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
 		
31 31
 		$result = $stmt->fetchAll(\PDO::FETCH_ASSOC);
32 32
 		
33
-		if(is_array($result) && !empty($result)) {
33
+		if (is_array($result) && !empty($result)) {
34 34
 			$this->candidates = $result;
35 35
 			
36 36
 			return $this->candidates;
Please login to merge, or discard this patch.
application/src/Kineo/Model/ConstituenciesModel.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
 		
23 23
 		$result = $stmt->fetchAll(\PDO::FETCH_ASSOC);
24 24
 		
25
-		if(is_array($result) && !empty($result)) {
25
+		if (is_array($result) && !empty($result)) {
26 26
 			$this->constituencies = $result;
27 27
 			
28 28
 			return $this->constituencies;
Please login to merge, or discard this patch.
application/src/Kineo/Model/UserModel.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
 	{
24 24
 		$this->db = $db;
25 25
 		
26
-		if(isset($email)) {
26
+		if (isset($email)) {
27 27
 			$this->loadUserByEmail($email);
28 28
 		}
29 29
 	}
@@ -44,8 +44,8 @@  discard block
 block discarded – undo
44 44
 		$result = $stmt->fetchAll(\PDO::FETCH_ASSOC);
45 45
 		
46 46
 		// Hydrate model
47
-		if(isset($result[0])) {
48
-			foreach($result[0] as $key => $val) {
47
+		if (isset($result[0])) {
48
+			foreach ($result[0] as $key => $val) {
49 49
 				$this->{$key} = $val;
50 50
 			}
51 51
 			
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
 			$stmt->bindValue(':voting', $voting, \PDO::PARAM_BOOL);
74 74
 			$stmt->execute();
75 75
 			
76
-			if(!$voting) {
76
+			if (!$voting) {
77 77
 				$this->db->commit();
78 78
 				return;
79 79
 			}
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
 			$this->db->commit();
94 94
 			
95 95
 			return $userId;
96
-		} catch(\PDOException $e) {
96
+		} catch (\PDOException $e) {
97 97
 			$this->db->rollback();
98 98
 			
99 99
 			throw new \Exception('There was a problem saving this user: ' . $e->getMessage());
Please login to merge, or discard this patch.
application/src/Kineo/Component/Database.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
 	public static function bindParamArray($prefix, $values, &$bindArray)
15 15
 	{
16 16
 		$str = '';
17
-		foreach($values as $index => $value){
17
+		foreach ($values as $index => $value) {
18 18
 			$str .= ':' . $prefix . $index . ',';
19 19
 			$bindArray[$prefix . $index] = $value; 
20 20
 		}
Please login to merge, or discard this patch.
application/src/Kineo/Component/ApiResponse.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@
 block discarded – undo
47 47
 
48 48
 	private static function setResponseStatusCode($response, $code)
49 49
 	{
50
-		switch($code) {
50
+		switch ($code) {
51 51
 			case 'SESSION_CHECK':
52 52
 			case 'DEFAULT_RESPONSE_SUCCESS':
53 53
 				// 200 - Success
Please login to merge, or discard this patch.
application/src/Kineo/Component/System.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
 {
9 9
 	public static function generateAssets()
10 10
 	{
11
-		switch(APP_ENV) {
11
+		switch (APP_ENV) {
12 12
 			case 'DEVELOPMENT':
13 13
 				$env = '.dev';
14 14
 				break;
@@ -22,6 +22,6 @@  discard block
 block discarded – undo
22 22
 				break;
23 23
 		}
24 24
 		
25
-		return file_get_contents(__DIR__ . '/../../../assets/spa/index'.$env.'.html');
25
+		return file_get_contents(__DIR__ . '/../../../assets/spa/index' . $env . '.html');
26 26
 	}
27 27
 }
Please login to merge, or discard this patch.