Passed
Pull Request — develop (#37)
by Pieter van der
03:19
created
library/tiqr/Tiqr/DeviceStorage/Abstract.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@
 block discarded – undo
58 58
      * the Tiqr_DeviceStorage factory will call this for you.
59 59
      * @param array $options The options for the s
60 60
      */
61
-    public function __construct($options=array(), LoggerInterface $logger)
61
+    public function __construct($options = array(), LoggerInterface $logger)
62 62
     {
63 63
         $this->_options = $options;
64 64
         $this->logger = $logger;
Please login to merge, or discard this patch.
library/tiqr/Tiqr/StateStorage/Memcache.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
      * The default configuration
52 52
      */
53 53
     const DEFAULT_HOST = '127.0.0.1';
54
-    const DEFAULT_PORT =  11211;
54
+    const DEFAULT_PORT = 11211;
55 55
     
56 56
     /**
57 57
      * Get the prefix to use for all keys in memcache.
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
      * (non-PHPdoc)
103 103
      * @see library/tiqr/Tiqr/StateStorage/Tiqr_StateStorage_Abstract::setValue()
104 104
      */
105
-    public function setValue($key, $value, $expire=0)
105
+    public function setValue($key, $value, $expire = 0)
106 106
     {  
107 107
         $key = $this->_getKeyPrefix().$key;
108 108
 
Please login to merge, or discard this patch.
library/tiqr/Tiqr/UserStorage/Encryption.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
      *
41 41
      * @return Tiqr_UserStorage_Encryption_Interface
42 42
      */
43
-    public static function getEncryption(LoggerInterface $logger, $type="dummy", $options=array())
43
+    public static function getEncryption(LoggerInterface $logger, $type = "dummy", $options = array())
44 44
     {
45 45
         $logger->info(sprintf('Using %s as UserStorage encryption type', $type));
46 46
         switch ($type) {
Please login to merge, or discard this patch.
library/tiqr/Tiqr/UserStorage/FileTrait.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
 
32 32
         if ($data === NULL) {
33 33
             if ($failIfNotFound) {
34
-                throw new Exception('Error loading data for user: ' . var_export($userId, TRUE));
34
+                throw new Exception('Error loading data for user: '.var_export($userId, TRUE));
35 35
             } else {
36 36
                 $this->logger->error('Error loading data for user from user storage (file storage)');
37 37
                 return false;
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
      */
48 48
     public function getPath()
49 49
     {
50
-        if (substr($this->path, -1)!="/") return $this->path."/";
50
+        if (substr($this->path, -1) != "/") return $this->path."/";
51 51
         return $this->path;
52 52
     }
53 53
 }
Please login to merge, or discard this patch.
library/tiqr/Tiqr/DeviceStorage.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@
 block discarded – undo
45 45
      * @param LoggerInterface $logger
46 46
      * @throws Exception An exception if an unknown storage is requested.
47 47
      */
48
-    public static function getStorage($type="dummy", $options=array(), LoggerInterface $logger)
48
+    public static function getStorage($type = "dummy", $options = array(), LoggerInterface $logger)
49 49
     {
50 50
         switch ($type) {
51 51
             case "dummy":
Please login to merge, or discard this patch.
library/tiqr/Tiqr/UserStorage.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
      *
42 42
      * @throws Exception An exception if an unknown user storage is requested.
43 43
      */
44
-    public static function getStorage($type="file", $options=array(), LoggerInterface $logger)
44
+    public static function getStorage($type = "file", $options = array(), LoggerInterface $logger)
45 45
     {
46 46
         switch ($type) {
47 47
             case "file":
Please login to merge, or discard this patch.
library/tiqr/Tiqr/OcraService.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@
 block discarded – undo
39 39
      * @return Tiqr_OcraService_Interface
40 40
      * @throws Exception An exception if an unknown orca service type is requested.
41 41
      */
42
-    public static function getOcraService($type="tiqr", $options=array(), LoggerInterface $logger)
42
+    public static function getOcraService($type = "tiqr", $options = array(), LoggerInterface $logger)
43 43
     {
44 44
         switch ($type) {
45 45
             case "tiqr":
Please login to merge, or discard this patch.
library/tiqr/Tiqr/StateStorage.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
      * @throws RuntimeException When the options configuration array misses a required parameter
48 48
      *
49 49
      */
50
-    public static function getStorage($type="file", $options=array(), LoggerInterface $logger)
50
+    public static function getStorage($type = "file", $options = array(), LoggerInterface $logger)
51 51
     {
52 52
         switch ($type) {
53 53
             case "file":
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
                     }
76 76
                 }
77 77
 
78
-                $pdoInstance = new PDO($options['dsn'],$options['username'],$options['password']);
78
+                $pdoInstance = new PDO($options['dsn'], $options['username'], $options['password']);
79 79
                 // Set a hard-coded default for the probability the expired state is removed
80 80
                 // 0.1 translates to a 10% chance the garbage collection is executed
81 81
                 $cleanupProbability = 0.1;
Please login to merge, or discard this patch.
library/tiqr/Tiqr/Message/FCM.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
      *
58 58
      * @throws Tiqr_Message_Exception_SendFailure
59 59
      */
60
-    private function _sendFirebase($deviceToken, $alert, $challenge, $apiKey, $retry=false)
60
+    private function _sendFirebase($deviceToken, $alert, $challenge, $apiKey, $retry = false)
61 61
     {
62 62
         $msg = array(
63 63
             'challenge' => $challenge,
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
         );
72 72
 
73 73
         $headers = array(
74
-            'Authorization: key=' . $apiKey,
74
+            'Authorization: key='.$apiKey,
75 75
             'Content-Type: application/json',
76 76
         );
77 77
 
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
         $result = curl_exec($ch);
85 85
         $errors = curl_error($ch);
86 86
         $statusCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
87
-        $remoteip = curl_getinfo($ch,CURLINFO_PRIMARY_IP);
87
+        $remoteip = curl_getinfo($ch, CURLINFO_PRIMARY_IP);
88 88
         curl_close($ch);
89 89
 
90 90
         if ($result === false) {
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
         }
93 93
 
94 94
         if (!empty($errors)) {
95
-            throw new Tiqr_Message_Exception_SendFailure("Http error occurred: ". $errors, true);
95
+            throw new Tiqr_Message_Exception_SendFailure("Http error occurred: ".$errors, true);
96 96
         }
97 97
 
98 98
         // Wait and retry once in case of a 502 Bad Gateway error
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
         $response = json_decode($result, true);
111 111
         foreach ($response['results'] as $k => $v) {
112 112
             if (isset($v['error'])) {
113
-                throw new Tiqr_Message_Exception_SendFailure("Error in FCM response: " . $v['error'], true);
113
+                throw new Tiqr_Message_Exception_SendFailure("Error in FCM response: ".$v['error'], true);
114 114
             }
115 115
         }
116 116
     }
Please login to merge, or discard this patch.