Completed
Pull Request — master (#29)
by
unknown
04:07 queued 02:15
created
src/FioRead.php 1 patch
Unused Use Statements   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -2,8 +2,8 @@
 block discarded – undo
2 2
 
3 3
 namespace h4kuna\Fio;
4 4
 
5
-use h4kuna\Fio\Response\Read\TransactionList,
6
-	h4kuna\Fio\Utils;
5
+use h4kuna\Fio\Response\Read\TransactionList;
6
+use h4kuna\Fio\Utils;
7 7
 
8 8
 /**
9 9
  * Read from informtion Fio account
Please login to merge, or discard this patch.
src/Request/Pay/Payment/Euro.php 2 patches
Unused Use Statements   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -2,9 +2,9 @@
 block discarded – undo
2 2
 
3 3
 namespace h4kuna\Fio\Request\Pay\Payment;
4 4
 
5
-use h4kuna\Fio,
6
-	h4kuna\Fio\Account,
7
-	h4kuna\Fio\Utils;
5
+use h4kuna\Fio;
6
+use h4kuna\Fio\Account;
7
+use h4kuna\Fio\Utils;
8 8
 
9 9
 /**
10 10
  * @author Milan Matějček
Please login to merge, or discard this patch.
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -49,11 +49,11 @@  discard block
 block discarded – undo
49 49
 		$this->setCurrency('EUR');
50 50
 	}
51 51
 
52
-    /**
53
-     * @param string $accountTo ISO 13616
54
-     * @return Euro
55
-     * @throws Fio\InvalidArgumentException
56
-     */
52
+	/**
53
+	 * @param string $accountTo ISO 13616
54
+	 * @return Euro
55
+	 * @throws Fio\InvalidArgumentException
56
+	 */
57 57
 	public function setAccountTo($accountTo)
58 58
 	{
59 59
 		if (strlen($accountTo) > 34) {
@@ -97,11 +97,11 @@  discard block
 block discarded – undo
97 97
 		return $this;
98 98
 	}
99 99
 
100
-    /**
101
-     * @param string $benefCountry
102
-     * @return self
103
-     * @throws Fio\InvalidArgumentException
104
-     */
100
+	/**
101
+	 * @param string $benefCountry
102
+	 * @return self
103
+	 * @throws Fio\InvalidArgumentException
104
+	 */
105 105
 	public function setCountry($benefCountry)
106 106
 	{
107 107
 		$country = strtoupper($benefCountry);
Please login to merge, or discard this patch.
src/Request/Pay/Payment/National.php 1 patch
Unused Use Statements   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -2,8 +2,8 @@
 block discarded – undo
2 2
 
3 3
 namespace h4kuna\Fio\Request\Pay\Payment;
4 4
 
5
-use h4kuna\Fio,
6
-	h4kuna\Fio\Utils;
5
+use h4kuna\Fio;
6
+use h4kuna\Fio\Utils;
7 7
 
8 8
 /**
9 9
  * @author Milan Matějček
Please login to merge, or discard this patch.
src/Request/Pay/Payment/Property.php 2 patches
Unused Use Statements   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -2,11 +2,11 @@
 block discarded – undo
2 2
 
3 3
 namespace h4kuna\Fio\Request\Pay\Payment;
4 4
 
5
-use h4kuna\Fio,
6
-	h4kuna\Fio\Account,
7
-	h4kuna\Fio\Utils,
8
-	Iterator,
9
-	Nette\Utils\DateTime;
5
+use h4kuna\Fio;
6
+use h4kuna\Fio\Account;
7
+use h4kuna\Fio\Utils;
8
+use Iterator;
9
+use Nette\Utils\DateTime;
10 10
 
11 11
 /**
12 12
  * @author Milan Matějček
Please login to merge, or discard this patch.
Indentation   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -61,10 +61,10 @@  discard block
 block discarded – undo
61 61
 		$this->setDate('now');
62 62
 	}
63 63
 
64
-    /**
65
-     * @return self
66
-     * @throws Fio\InvalidArgumentException
67
-     */
64
+	/**
65
+	 * @return self
66
+	 * @throws Fio\InvalidArgumentException
67
+	 */
68 68
 	public function setAmount($val)
69 69
 	{
70 70
 		$this->amount = floatval($val);
@@ -80,12 +80,12 @@  discard block
 block discarded – undo
80 80
 	 */
81 81
 	abstract public function setAccountTo($accountTo);
82 82
 
83
-    /**
84
-     * Currency code ISO 4217.
85
-     * @param string $code case insensitive
86
-     * @return self
87
-     * @throws Fio\InvalidArgumentException
88
-     */
83
+	/**
84
+	 * Currency code ISO 4217.
85
+	 * @param string $code case insensitive
86
+	 * @return self
87
+	 * @throws Fio\InvalidArgumentException
88
+	 */
89 89
 	public function setCurrency($code)
90 90
 	{
91 91
 		if (!preg_match('~[a-z]{3}~i', $code)) {
@@ -95,11 +95,11 @@  discard block
 block discarded – undo
95 95
 		return $this;
96 96
 	}
97 97
 
98
-    /**
99
-     * @param string $ks
100
-     * @return self
101
-     * @throws Fio\InvalidArgumentException
102
-     */
98
+	/**
99
+	 * @param string $ks
100
+	 * @return self
101
+	 * @throws Fio\InvalidArgumentException
102
+	 */
103 103
 	public function setConstantSymbol($ks)
104 104
 	{
105 105
 		if (!$ks) {
@@ -131,10 +131,10 @@  discard block
 block discarded – undo
131 131
 		return $this;
132 132
 	}
133 133
 
134
-    /**
135
-     * @return self
136
-     * @throws Fio\InvalidArgumentException
137
-     */
134
+	/**
135
+	 * @return self
136
+	 * @throws Fio\InvalidArgumentException
137
+	 */
138 138
 	public function setPaymentReason($code)
139 139
 	{
140 140
 		if (!$code) {
@@ -146,11 +146,11 @@  discard block
 block discarded – undo
146 146
 		return $this;
147 147
 	}
148 148
 
149
-    /**
150
-     * @param string $ss
151
-     * @return self
152
-     * @throws Fio\InvalidArgumentException
153
-     */
149
+	/**
150
+	 * @param string $ss
151
+	 * @return self
152
+	 * @throws Fio\InvalidArgumentException
153
+	 */
154 154
 	public function setSpecificSymbol($ss)
155 155
 	{
156 156
 		if (!$ss) {
@@ -162,11 +162,11 @@  discard block
 block discarded – undo
162 162
 		return $this;
163 163
 	}
164 164
 
165
-    /**
166
-     * @param string|int $vs
167
-     * @return self
168
-     * @throws Fio\InvalidArgumentException
169
-     */
165
+	/**
166
+	 * @param string|int $vs
167
+	 * @return self
168
+	 * @throws Fio\InvalidArgumentException
169
+	 */
170 170
 	public function setVariableSymbol($vs)
171 171
 	{
172 172
 		if (!$vs) {
Please login to merge, or discard this patch.
src/Request/Pay/XMLFile.php 1 patch
Unused Use Statements   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -2,8 +2,8 @@
 block discarded – undo
2 2
 
3 3
 namespace h4kuna\Fio\Request\Pay;
4 4
 
5
-use h4kuna\Fio\Request\Pay\Payment,
6
-	XMLWriter;
5
+use h4kuna\Fio\Request\Pay\Payment;
6
+use XMLWriter;
7 7
 
8 8
 /**
9 9
  * @author Milan Matějček
Please login to merge, or discard this patch.
src/Response/Read/JsonTransactionFactory.php 2 patches
Unused Use Statements   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -2,8 +2,8 @@
 block discarded – undo
2 2
 
3 3
 namespace h4kuna\Fio\Response\Read;
4 4
 
5
-use h4kuna\Fio,
6
-	h4kuna\Fio\Utils;
5
+use h4kuna\Fio;
6
+use h4kuna\Fio\Utils;
7 7
 
8 8
 /**
9 9
  * @author Milan Matějček
Please login to merge, or discard this patch.
Indentation   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -38,15 +38,15 @@  discard block
 block discarded – undo
38 38
 		return $data;
39 39
 	}
40 40
 
41
-    /**
42
-     * @param $data
43
-     * @param $dateFormat
44
-     * @return TransactionAbstract|null|string
45
-     * @throws Fio\InvalidArgumentException
46
-     * @throws Fio\TransactionExtendException
47
-     * @throws Fio\TransactionPropertyException
48
-     */
49
-    public function createTransaction($data, $dateFormat)
41
+	/**
42
+	 * @param $data
43
+	 * @param $dateFormat
44
+	 * @return TransactionAbstract|null|string
45
+	 * @throws Fio\InvalidArgumentException
46
+	 * @throws Fio\TransactionExtendException
47
+	 * @throws Fio\TransactionPropertyException
48
+	 */
49
+	public function createTransaction($data, $dateFormat)
50 50
 	{
51 51
 		$transaction = $this->createTransactionObject($dateFormat);
52 52
 		foreach (self::metaProperty($transaction) as $id => $meta) {
@@ -62,13 +62,13 @@  discard block
 block discarded – undo
62 62
 		return new TransactionList($info);
63 63
 	}
64 64
 
65
-    /**
66
-     * @param $dateFormat
67
-     * @return TransactionAbstract|null|string
68
-     * @throws Fio\InvalidArgumentException
69
-     * @throws Fio\TransactionExtendException
70
-     */
71
-    protected function createTransactionObject($dateFormat)
65
+	/**
66
+	 * @param $dateFormat
67
+	 * @return TransactionAbstract|null|string
68
+	 * @throws Fio\InvalidArgumentException
69
+	 * @throws Fio\TransactionExtendException
70
+	 */
71
+	protected function createTransactionObject($dateFormat)
72 72
 	{
73 73
 		if ($this->transactionClassCheck === false) {
74 74
 			if (is_string($this->transactionClass)) {
@@ -87,12 +87,12 @@  discard block
 block discarded – undo
87 87
 		return clone $this->transactionClass;
88 88
 	}
89 89
 
90
-    /**
91
-     * @param $class
92
-     * @return array|string[]
93
-     * @throws Fio\TransactionPropertyException
94
-     */
95
-    private static function metaProperty($class)
90
+	/**
91
+	 * @param $class
92
+	 * @return array|string[]
93
+	 * @throws Fio\TransactionPropertyException
94
+	 */
95
+	private static function metaProperty($class)
96 96
 	{
97 97
 		if (self::$property !== null) {
98 98
 			return self::$property;
Please login to merge, or discard this patch.
src/Utils/Strings.php 2 patches
Unused Use Statements   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -2,8 +2,8 @@
 block discarded – undo
2 2
 
3 3
 namespace h4kuna\Fio\Utils;
4 4
 
5
-use h4kuna\Fio\Account,
6
-	Nette\Utils\DateTime;
5
+use h4kuna\Fio\Account;
6
+use Nette\Utils\DateTime;
7 7
 
8 8
 /**
9 9
  * @author Milan Matějček
Please login to merge, or discard this patch.
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -23,12 +23,12 @@
 block discarded – undo
23 23
 		return $str ? mb_substr($str, 0, $limit) : null; // max length from API
24 24
 	}
25 25
 
26
-    /**
27
-     * @param string $account
28
-     * @param string|NULL $bankCode
29
-     * @return Account\Bank
30
-     * @throws \h4kuna\Fio\AccountException
31
-     */
26
+	/**
27
+	 * @param string $account
28
+	 * @param string|NULL $bankCode
29
+	 * @return Account\Bank
30
+	 * @throws \h4kuna\Fio\AccountException
31
+	 */
32 32
 	public static function createAccount($account, $bankCode = null)
33 33
 	{
34 34
 		if ($bankCode) {
Please login to merge, or discard this patch.
src/Request/Queue.php 2 patches
Unused Use Statements   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -2,10 +2,10 @@
 block discarded – undo
2 2
 
3 3
 namespace h4kuna\Fio\Request;
4 4
 
5
-use GuzzleHttp,
6
-	h4kuna\Fio,
7
-	h4kuna\Fio\Response\Pay,
8
-	Nette\Utils;
5
+use GuzzleHttp;
6
+use h4kuna\Fio;
7
+use h4kuna\Fio\Response\Pay;
8
+use Nette\Utils;
9 9
 
10 10
 class Queue implements IQueue
11 11
 {
Please login to merge, or discard this patch.
Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -70,11 +70,11 @@  discard block
 block discarded – undo
70 70
 		}, 'download');
71 71
 	}
72 72
 
73
-    /**
74
-     * @return Pay\IResponse
75
-     * @throws Fio\QueueLimitException
76
-     * @throws Fio\ServiceUnavailableException
77
-     */
73
+	/**
74
+	 * @return Pay\IResponse
75
+	 * @throws Fio\QueueLimitException
76
+	 * @throws Fio\ServiceUnavailableException
77
+	 */
78 78
 	public function upload($url, $token, array $post, $filename)
79 79
 	{
80 80
 		$newPost = [];
@@ -119,11 +119,11 @@  discard block
 block discarded – undo
119 119
 				self::sleep($tempFile);
120 120
 				$next = true;
121 121
 			} catch (GuzzleHttp\Exception\ServerException $e) {
122
-			    if($e->hasResponse()) {
123
-			        self::detectDownloadResponse( $e->getResponse() );
124
-                }
125
-                throw new Fio\ServiceUnavailableException('Service is currently unavailable');
126
-            }
122
+				if($e->hasResponse()) {
123
+					self::detectDownloadResponse( $e->getResponse() );
124
+				}
125
+				throw new Fio\ServiceUnavailableException('Service is currently unavailable');
126
+			}
127 127
 		} while ($next);
128 128
 		fclose($file);
129 129
 		touch($tempFile);
@@ -135,11 +135,11 @@  discard block
 block discarded – undo
135 135
 		return $response->getBody();
136 136
 	}
137 137
 
138
-    /**
139
-     * @param $response
140
-     * @throws Fio\ServiceUnavailableException
141
-     */
142
-    private static function detectDownloadResponse($response)
138
+	/**
139
+	 * @param $response
140
+	 * @throws Fio\ServiceUnavailableException
141
+	 */
142
+	private static function detectDownloadResponse($response)
143 143
 	{
144 144
 		/* @var $contentTypeHeaders array */
145 145
 		$contentTypeHeaders = $response->getHeader('Content-Type');
Please login to merge, or discard this patch.
src/Account/FioAccount.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -14,13 +14,13 @@
 block discarded – undo
14 14
 	/** @var string */
15 15
 	private $token;
16 16
 
17
-    /**
18
-     * FioAccount constructor.
19
-     * @param $account
20
-     * @param $token
21
-     * @throws \h4kuna\Fio\AccountException
22
-     */
23
-    public function __construct($account, $token)
17
+	/**
18
+	 * FioAccount constructor.
19
+	 * @param $account
20
+	 * @param $token
21
+	 * @throws \h4kuna\Fio\AccountException
22
+	 */
23
+	public function __construct($account, $token)
24 24
 	{
25 25
 		$this->account = new Bank($account);
26 26
 		$this->token = $token;
Please login to merge, or discard this patch.