GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — master ( 7c3fcd...347e14 )
by Dmitry
02:06
created
src/HSAL/Driver.php 1 patch
Braces   +5 added lines, -4 removed lines patch added patch discarded remove patch
@@ -27,10 +27,11 @@
 block discarded – undo
27 27
 	{
28 28
 		$result = $this->fetchArray($table, $fields, $index, $condition, $operator);
29 29
 
30
-		if (!empty($result))
31
-			return array_combine($fields, $result);
32
-		else
33
-			return FALSE;
30
+		if (!empty($result)) {
31
+					return array_combine($fields, $result);
32
+		} else {
33
+					return FALSE;
34
+		}
34 35
 	}
35 36
 
36 37
 	public function getTableDatabase($table)
Please login to merge, or discard this patch.
src/HSAL/Driver/HSPHP.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 
48 48
 		list($database, $table) = $this->getTableDatabase($table);
49 49
 
50
-		$idx = $hs->getIndexId($database, $table, $index, implode(',',$fields));
50
+		$idx = $hs->getIndexId($database, $table, $index, implode(',', $fields));
51 51
 		$hs->select($idx, $operator, $condition);
52 52
 		$result = $hs->readResponse();
53 53
 
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
 
106 106
 		$fields = array_keys($values);
107 107
 
108
-		$idx = $hs->getIndexId($database, $table, '', implode(',',$fields));
108
+		$idx = $hs->getIndexId($database, $table, '', implode(',', $fields));
109 109
 		$hs->insert($idx, array_values($values));
110 110
 
111 111
 		$result = $hs->readResponse();
Please login to merge, or discard this patch.
Braces   +27 added lines, -22 removed lines patch added patch discarded remove patch
@@ -53,10 +53,11 @@  discard block
 block discarded – undo
53 53
 		$hs->select($idx, $operator, $condition);
54 54
 		$result = $hs->readResponse();
55 55
 
56
-		if (!empty($result))
57
-			return $result[0];
58
-		else
59
-			return FALSE;
56
+		if (!empty($result)) {
57
+					return $result[0];
58
+		} else {
59
+					return FALSE;
60
+		}
60 61
 	}
61 62
 
62 63
 	public function fetchAll($table, Array $fields, $index, Array $condition, $operator, $limit, $offset)
@@ -78,9 +79,9 @@  discard block
 block discarded – undo
78 79
 			}
79 80
 
80 81
 			return $result;
82
+		} else {
83
+					return FALSE;
81 84
 		}
82
-		else
83
-			return FALSE;
84 85
 	}
85 86
 
86 87
 	public function delete($table, $index, Array $condition, $operator)
@@ -93,10 +94,11 @@  discard block
 block discarded – undo
93 94
 		$hs->delete($idx, $operator, $condition);
94 95
 		$result = $hs->readResponse();
95 96
 
96
-		if (!empty($result))
97
-			return (bool)$result[0][0];
98
-		else
99
-			return FALSE;
97
+		if (!empty($result)) {
98
+					return (bool)$result[0][0];
99
+		} else {
100
+					return FALSE;
101
+		}
100 102
 	}
101 103
 
102 104
 	public function insert($table, Array $values)
@@ -128,10 +130,11 @@  discard block
 block discarded – undo
128 130
 
129 131
 		$result = $hs->readResponse();
130 132
 
131
-		if (!empty($result))
132
-			return (bool)$result[0][0];
133
-		else
134
-			return FALSE;
133
+		if (!empty($result)) {
134
+					return (bool)$result[0][0];
135
+		} else {
136
+					return FALSE;
137
+		}
135 138
 	}
136 139
 
137 140
 	public function increment($table, $field, $index, Array $condition, $operator, $increment)
@@ -144,10 +147,11 @@  discard block
 block discarded – undo
144 147
 		$hs->increment($idx, $operator, $condition, [$increment]);
145 148
 		$result = $hs->readResponse();
146 149
 
147
-		if (!empty($result))
148
-			return (bool)$result[0][0];
149
-		else
150
-			return FALSE;
150
+		if (!empty($result)) {
151
+					return (bool)$result[0][0];
152
+		} else {
153
+					return FALSE;
154
+		}
151 155
 	}
152 156
 
153 157
 	public function decrement($table, $field, $index, Array $condition, $operator, $decrement)
@@ -160,9 +164,10 @@  discard block
 block discarded – undo
160 164
 		$hs->decrement($idx, $operator, $condition, [$decrement]);
161 165
 		$result = $hs->readResponse();
162 166
 
163
-		if (!empty($result))
164
-			return (bool)$result[0][0];
165
-		else
166
-			return FALSE;
167
+		if (!empty($result)) {
168
+					return (bool)$result[0][0];
169
+		} else {
170
+					return FALSE;
171
+		}
167 172
 	}
168 173
 }
169 174
\ No newline at end of file
Please login to merge, or discard this patch.
src/HSAL/HSAL.php 1 patch
Braces   +5 added lines, -6 removed lines patch added patch discarded remove patch
@@ -32,16 +32,16 @@  discard block
 block discarded – undo
32 32
 
33 33
 		$driver = self::DRIVER_AUTO;
34 34
 
35
-		if (isset($options['driver']))
36
-			$driver = $options['driver'];
35
+		if (isset($options['driver'])) {
36
+					$driver = $options['driver'];
37
+		}
37 38
 
38 39
 		if ($driver == self::DRIVER_AUTO)
39 40
 		{
40 41
 			if (extension_loaded('handlersocketi'))
41 42
 			{
42 43
 				$driver = self::DRIVER_HANDLERSOCKETI;
43
-			}
44
-			else if (class_exists('\\HSPHP\\ReadSocket'))
44
+			} else if (class_exists('\\HSPHP\\ReadSocket'))
45 45
 			{
46 46
 				$driver = self::DRIVER_HSPHP;
47 47
 			}
@@ -50,8 +50,7 @@  discard block
 block discarded – undo
50 50
 		if ($driver == self::DRIVER_HANDLERSOCKETI)
51 51
 		{
52 52
 			$this->hs = new \HSAL\Driver\Handlersocketi($host, $database, $options);
53
-		}
54
-		else if ($driver == self::DRIVER_HSPHP)
53
+		} else if ($driver == self::DRIVER_HSPHP)
55 54
 		{
56 55
 			$this->hs = new \HSAL\Driver\HSPHP($host, $database, $options);
57 56
 		}
Please login to merge, or discard this patch.
src/HSAL/Driver/Handlersocketi.php 1 patch
Braces   +25 added lines, -12 removed lines patch added patch discarded remove patch
@@ -51,16 +51,19 @@  discard block
 block discarded – undo
51 51
 
52 52
 		list($database, $table) = $this->getTableDatabase($table);
53 53
 
54
-		if ($index == HSAL::INDEX_PRIMARY) $index = 'PRIMARY';
54
+		if ($index == HSAL::INDEX_PRIMARY) {
55
+			$index = 'PRIMARY';
56
+		}
55 57
 
56 58
 		$idx = $hs->openIndex($database, $table, $fields, ['index' => $index]);
57 59
 
58 60
 		$result = $idx->find([$operator => $condition]);
59 61
 
60
-		if (!empty($result) && is_array($result))
61
-			return $result[0];
62
-		else
63
-			return FALSE;
62
+		if (!empty($result) && is_array($result)) {
63
+					return $result[0];
64
+		} else {
65
+					return FALSE;
66
+		}
64 67
 	}
65 68
 
66 69
 	public function fetchAll($table, Array $fields, $index, Array $condition, $operator, $limit, $offset)
@@ -69,7 +72,9 @@  discard block
 block discarded – undo
69 72
 
70 73
 		list($database, $table) = $this->getTableDatabase($table);
71 74
 
72
-		if ($index == HSAL::INDEX_PRIMARY) $index = 'PRIMARY';
75
+		if ($index == HSAL::INDEX_PRIMARY) {
76
+			$index = 'PRIMARY';
77
+		}
73 78
 
74 79
 		$idx = $hs->openIndex($database, $table, $fields, ['index' => $index]);
75 80
 
@@ -83,9 +88,9 @@  discard block
 block discarded – undo
83 88
 			}
84 89
 
85 90
 			return $result;
91
+		} else {
92
+					return FALSE;
86 93
 		}
87
-		else
88
-			return FALSE;
89 94
 	}
90 95
 
91 96
 	public function delete($table, $index, Array $condition, $operator)
@@ -94,7 +99,9 @@  discard block
 block discarded – undo
94 99
 
95 100
 		list($database, $table) = $this->getTableDatabase($table);
96 101
 
97
-		if ($index == HSAL::INDEX_PRIMARY) $index = 'PRIMARY';
102
+		if ($index == HSAL::INDEX_PRIMARY) {
103
+			$index = 'PRIMARY';
104
+		}
98 105
 
99 106
 		$idx = $hs->openIndex($database, $table, [], ['index' => $index]);
100 107
 
@@ -122,7 +129,9 @@  discard block
 block discarded – undo
122 129
 
123 130
 		list($database, $table) = $this->getTableDatabase($table);
124 131
 
125
-		if ($index == HSAL::INDEX_PRIMARY) $index = 'PRIMARY';
132
+		if ($index == HSAL::INDEX_PRIMARY) {
133
+			$index = 'PRIMARY';
134
+		}
126 135
 
127 136
 		$idx = $hs->openIndex($database, $table, array_keys($values), ['index' => $index]);
128 137
 
@@ -137,7 +146,9 @@  discard block
 block discarded – undo
137 146
 
138 147
 		list($database, $table) = $this->getTableDatabase($table);
139 148
 
140
-		if ($index == HSAL::INDEX_PRIMARY) $index = 'PRIMARY';
149
+		if ($index == HSAL::INDEX_PRIMARY) {
150
+			$index = 'PRIMARY';
151
+		}
141 152
 
142 153
 		$idx = $hs->openIndex($database, $table, [$field], ['index' => $index]);
143 154
 
@@ -153,7 +164,9 @@  discard block
 block discarded – undo
153 164
 
154 165
 		list($database, $table) = $this->getTableDatabase($table);
155 166
 
156
-		if ($index == HSAL::INDEX_PRIMARY) $index = 'PRIMARY';
167
+		if ($index == HSAL::INDEX_PRIMARY) {
168
+			$index = 'PRIMARY';
169
+		}
157 170
 
158 171
 		$idx = $hs->openIndex($database, $table, [$field], ['index' => $index]);
159 172
 
Please login to merge, or discard this patch.
tests/HSAL/HSPHPTest.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
 		$hs = new HSAL('localhost', 'hstest', ['driver' => HSAL::DRIVER_HSPHP]);
10 10
 
11
-		$result = $hs->fetchArray('test', ['id','name','cnt'], [HSAL::INDEX_PRIMARY => 3]);
11
+		$result = $hs->fetchArray('test', ['id', 'name', 'cnt'], [HSAL::INDEX_PRIMARY => 3]);
12 12
 
13 13
 		$this->assertTrue(is_array($result));
14 14
 		$this->assertEquals(3, count($result));
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
 	{
22 22
 		$hs = new HSAL('localhost', 'hstest', ['driver' => HSAL::DRIVER_HSPHP]);
23 23
 
24
-		$result = $hs->fetchAssoc('test', ['id','name','cnt'], [HSAL::INDEX_PRIMARY => 3]);
24
+		$result = $hs->fetchAssoc('test', ['id', 'name', 'cnt'], [HSAL::INDEX_PRIMARY => 3]);
25 25
 
26 26
 		$this->assertTrue(is_array($result));
27 27
 		$this->assertEquals(3, count($result));
Please login to merge, or discard this patch.
tests/HSAL/HandlersocketiTest.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
 		$hs = new HSAL('localhost', 'hstest', ['driver' => HSAL::DRIVER_HANDLERSOCKETI]);
10 10
 
11
-		$result = $hs->fetchArray('test2', ['id','name','cnt'], [HSAL::INDEX_PRIMARY => 3]);
11
+		$result = $hs->fetchArray('test2', ['id', 'name', 'cnt'], [HSAL::INDEX_PRIMARY => 3]);
12 12
 
13 13
 		$this->assertTrue(is_array($result));
14 14
 		$this->assertEquals(3, count($result));
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
 	{
22 22
 		$hs = new HSAL('localhost', 'hstest', ['driver' => HSAL::DRIVER_HANDLERSOCKETI]);
23 23
 
24
-		$result = $hs->fetchAssoc('test2', ['id','name','cnt'], [HSAL::INDEX_PRIMARY => 3]);
24
+		$result = $hs->fetchAssoc('test2', ['id', 'name', 'cnt'], [HSAL::INDEX_PRIMARY => 3]);
25 25
 
26 26
 		$this->assertTrue(is_array($result));
27 27
 		$this->assertEquals(3, count($result));
Please login to merge, or discard this patch.