@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | * |
37 | 37 | * @return Tiqr_OcraService_Interface |
38 | 38 | */ |
39 | - public static function getOcraService($type="tiqr", $options=array()) |
|
39 | + public static function getOcraService($type = "tiqr", $options = array()) |
|
40 | 40 | { |
41 | 41 | switch ($type) { |
42 | 42 | case "tiqr": |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | if (!isset($type)) { |
52 | 52 | throw new Exception('Class name not set'); |
53 | 53 | } elseif (!class_exists($type)) { |
54 | - throw new Exception('Class not found: ' . var_export($type, TRUE)); |
|
54 | + throw new Exception('Class not found: '.var_export($type, TRUE)); |
|
55 | 55 | } |
56 | 56 | $instance = new $type($options); |
57 | 57 | } |
@@ -53,7 +53,7 @@ |
||
53 | 53 | * the Tiqr_DeviceStorage factory will call this for you. |
54 | 54 | * @param array $options The options for the s |
55 | 55 | */ |
56 | - public function __construct($options=array()) |
|
56 | + public function __construct($options = array()) |
|
57 | 57 | { |
58 | 58 | $this->_options = $options; |
59 | 59 | } |
@@ -41,11 +41,11 @@ |
||
41 | 41 | { |
42 | 42 | $url = $this->_options["url"]."?appId=".$this->_options["appid"]; |
43 | 43 | |
44 | - $url.= "¬ificationToken=".$notificationToken; |
|
44 | + $url .= "¬ificationToken=".$notificationToken; |
|
45 | 45 | |
46 | 46 | $output = file_get_contents($url); |
47 | - if (stripos($output, "not found")!==false) return false; |
|
48 | - if (stripos($output, "error")!==false) return false; |
|
47 | + if (stripos($output, "not found") !== false) return false; |
|
48 | + if (stripos($output, "error") !== false) return false; |
|
49 | 49 | return trim($output); |
50 | 50 | } |
51 | 51 | } |
52 | 52 | \ No newline at end of file |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | * config options per type. |
43 | 43 | * @throws Exception An exception if an unknown storage is requested. |
44 | 44 | */ |
45 | - public static function getStorage($type="dummy", $options=array()) |
|
45 | + public static function getStorage($type = "dummy", $options = array()) |
|
46 | 46 | { |
47 | 47 | switch ($type) { |
48 | 48 | case "dummy": |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | default: |
58 | 58 | $instance = NULL; |
59 | 59 | } |
60 | - if ($instance!=NULL) { |
|
60 | + if ($instance != NULL) { |
|
61 | 61 | $instance->init(); |
62 | 62 | return $instance; |
63 | 63 | } |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | * |
37 | 37 | * @return Tiqr_UserSecretStorage_Interface |
38 | 38 | */ |
39 | - public static function getSecretStorage($type="file", $options=array()) |
|
39 | + public static function getSecretStorage($type = "file", $options = array()) |
|
40 | 40 | { |
41 | 41 | switch ($type) { |
42 | 42 | case "file": |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | if (!isset($type)) { |
60 | 60 | throw new Exception('Class name not set'); |
61 | 61 | } elseif (!class_exists($type)) { |
62 | - throw new Exception('Class not found: ' . var_export($type, TRUE)); |
|
62 | + throw new Exception('Class not found: '.var_export($type, TRUE)); |
|
63 | 63 | } |
64 | 64 | $instance = new $type($options); |
65 | 65 | } |
@@ -35,7 +35,7 @@ |
||
35 | 35 | * @param boolean $temporary temporary failure? |
36 | 36 | * @param Exception $parent parent exception |
37 | 37 | */ |
38 | - public function __construct($message, $temporary=false, Exception $parent=null) |
|
38 | + public function __construct($message, $temporary = false, Exception $parent = null) |
|
39 | 39 | { |
40 | 40 | parent::__construct($message, $parent); |
41 | 41 | $this->_temporary = $temporary; |
@@ -102,7 +102,7 @@ |
||
102 | 102 | } |
103 | 103 | |
104 | 104 | if ($error != null) { |
105 | - throw new Tiqr_Message_Exception_SendFailure("Error in GCM response: " . $error, true); |
|
105 | + throw new Tiqr_Message_Exception_SendFailure("Error in GCM response: ".$error, true); |
|
106 | 106 | } |
107 | 107 | |
108 | 108 | } |
@@ -29,7 +29,7 @@ |
||
29 | 29 | * @param string $message exception message |
30 | 30 | * @param Exception $parent parent exception |
31 | 31 | */ |
32 | - public function __construct($message, $parent=null) |
|
32 | + public function __construct($message, $parent = null) |
|
33 | 33 | { |
34 | 34 | parent::__construct($message, 0, $parent); |
35 | 35 | } |
@@ -35,7 +35,7 @@ |
||
35 | 35 | * @param boolean $temporary temporary failure? |
36 | 36 | * @param Exception $parent parent exception |
37 | 37 | */ |
38 | - public function __construct($message, $temporary=false, Exception $parent=null) |
|
38 | + public function __construct($message, $temporary = false, Exception $parent = null) |
|
39 | 39 | { |
40 | 40 | parent::__construct($message, $parent); |
41 | 41 | $this->_temporary = $temporary; |