Completed
Push — master ( 4a47c7...5ddc50 )
by John
02:05
created
src/AccessControl/PublicAccessControl.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -8,14 +8,12 @@  discard block
 block discarded – undo
8 8
  * Class PublicAccessControl
9 9
  * @package LunixREST\AccessControl
10 10
  */
11
-class PublicAccessControl implements AccessControl
12
-{
11
+class PublicAccessControl implements AccessControl {
13 12
     /**
14 13
      * @param \LunixREST\APIRequest\APIRequest $request
15 14
      * @return bool
16 15
      */
17
-    public function validateAccess(APIRequest $request)
18
-    {
16
+    public function validateAccess(APIRequest $request) {
19 17
         return true;
20 18
     }
21 19
 
@@ -23,8 +21,7 @@  discard block
 block discarded – undo
23 21
      * @param $apiKey
24 22
      * @return bool
25 23
      */
26
-    public function validateKey($apiKey)
27
-    {
24
+    public function validateKey($apiKey) {
28 25
         return true;
29 26
     }
30 27
 }
Please login to merge, or discard this patch.
src/AccessControl/OneKeyAccessControl.php 1 patch
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -8,8 +8,7 @@  discard block
 block discarded – undo
8 8
  * Class OneKeyAccessControl
9 9
  * @package LunixREST\AccessControl
10 10
  */
11
-class OneKeyAccessControl implements AccessControl
12
-{
11
+class OneKeyAccessControl implements AccessControl {
13 12
     /**
14 13
      * @var string
15 14
      */
@@ -18,8 +17,7 @@  discard block
 block discarded – undo
18 17
     /**
19 18
      * @param string $key
20 19
      */
21
-    public function __construct($key)
22
-    {
20
+    public function __construct($key) {
23 21
         $this->key = $key;
24 22
     }
25 23
 
@@ -27,8 +25,7 @@  discard block
 block discarded – undo
27 25
      * @param \LunixREST\APIRequest\APIRequest $request
28 26
      * @return bool true if key is valid
29 27
      */
30
-    public function validateAccess(APIRequest $request)
31
-    {
28
+    public function validateAccess(APIRequest $request) {
32 29
         return $this->validateKey($request->getApiKey());
33 30
     }
34 31
 
@@ -36,8 +33,7 @@  discard block
 block discarded – undo
36 33
      * @param $apiKey
37 34
      * @return bool true if key is the key specified in the constructor
38 35
      */
39
-    public function validateKey($apiKey)
40
-    {
36
+    public function validateKey($apiKey) {
41 37
         return $apiKey === $this->key;
42 38
     }
43 39
 }
Please login to merge, or discard this patch.
src/Throttle/NoThrottle.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -3,8 +3,7 @@  discard block
 block discarded – undo
3 3
 
4 4
 use LunixREST\APIRequest\APIRequest;
5 5
 
6
-class NoThrottle implements Throttle
7
-{
6
+class NoThrottle implements Throttle {
8 7
     /**
9 8
      * Never throttle
10 9
      * @param \LunixREST\APIRequest\APIRequest $request
@@ -19,8 +18,7 @@  discard block
 block discarded – undo
19 18
      * Log that a request took place
20 19
      * @param \LunixREST\APIRequest\APIRequest $request
21 20
      */
22
-    public function logRequest(APIRequest $request)
23
-    {
21
+    public function logRequest(APIRequest $request) {
24 22
         //Do nothing
25 23
     }
26 24
 }
Please login to merge, or discard this patch.
src/Configuration/INIConfiguration.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
         $this->config = parse_ini_file($filename, true);
25 25
 
26 26
         if ($this->config === false) {
27
-            throw new INIParseException('Could not parse: ' . $filename, true);
27
+            throw new INIParseException('Could not parse: '.$filename, true);
28 28
         }
29 29
     }
30 30
 
Please login to merge, or discard this patch.
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -8,8 +8,7 @@  discard block
 block discarded – undo
8 8
  * Class INIConfiguration
9 9
  * @package LunixREST\Configuration
10 10
  */
11
-class INIConfiguration implements Configuration
12
-{
11
+class INIConfiguration implements Configuration {
13 12
     /**
14 13
      * @var
15 14
      */
@@ -19,8 +18,7 @@  discard block
 block discarded – undo
19 18
      * @param string $filename
20 19
      * @throws INIParseException
21 20
      */
22
-    public function __construct($filename)
23
-    {
21
+    public function __construct($filename) {
24 22
         $this->config = parse_ini_file($filename, true);
25 23
 
26 24
         if ($this->config === false) {
@@ -33,8 +31,7 @@  discard block
 block discarded – undo
33 31
      * @param $namespace
34 32
      * @return mixed
35 33
      */
36
-    public function get($key, $namespace)
37
-    {
34
+    public function get($key, $namespace) {
38 35
         return $this->config[$namespace][$key] ?? null;
39 36
     }
40 37
 
Please login to merge, or discard this patch.
src/Configuration/Exceptions/INIParseException.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,7 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 namespace LunixREST\Exceptions;
3 3
 
4
-class INIParseException extends \Exception
5
-{
4
+class INIParseException extends \Exception {
6 5
 
7 6
 }
Please login to merge, or discard this patch.