@@ -48,30 +48,24 @@ class BTC implements DataTypeInterface
4848
4949 /**
5050 * Generates the DataType Object and sets all of its properties.
51- *
52- * @param $arguments
5351 */
54- public function create (array $ arguments )
52+ public function create (array $ arguments ): void
5553 {
5654 $ this ->setProperties ($ arguments );
5755 }
5856
5957 /**
6058 * Returns the correct QrCode format.
61- *
62- * @return string
6359 */
64- public function __toString ()
60+ public function __toString (): string
6561 {
6662 return $ this ->buildBitCoinString ();
6763 }
6864
6965 /**
7066 * Sets the BitCoin arguments.
71- *
72- * @param array $arguments
7367 */
74- protected function setProperties (array $ arguments )
68+ protected function setProperties (array $ arguments ): self
7569 {
7670 if (isset ($ arguments [0 ])) {
7771 $ this ->address = $ arguments [0 ];
@@ -84,14 +78,14 @@ protected function setProperties(array $arguments)
8478 if (isset ($ arguments [2 ])) {
8579 $ this ->setOptions ($ arguments [2 ]);
8680 }
81+
82+ return $ this ;
8783 }
8884
8985 /**
9086 * Sets the optional BitCoin options.
91- *
92- * @param array $options
9387 */
94- protected function setOptions (array $ options )
88+ protected function setOptions (array $ options ): self
9589 {
9690 if (isset ($ options ['label ' ])) {
9791 $ this ->label = $ options ['label ' ];
@@ -104,23 +98,23 @@ protected function setOptions(array $options)
10498 if (isset ($ options ['returnAddress ' ])) {
10599 $ this ->returnAddress = $ options ['returnAddress ' ];
106100 }
101+
102+ return $ this ;
107103 }
108104
109105 /**
110106 * Builds a BitCoin string.
111- *
112- * @return string
113107 */
114- protected function buildBitCoinString ()
108+ protected function buildBitCoinString (): string
115109 {
116- $ query = http_build_query ([
110+ $ query = \ http_build_query ([
117111 'amount ' => $ this ->amount ,
118112 'label ' => $ this ->label ,
119113 'message ' => $ this ->message ,
120114 'r ' => $ this ->returnAddress ,
121115 ]);
122116
123- $ btc = $ this ->prefix . $ this ->address . '? ' . $ query ;
117+ $ btc = $ this ->prefix . $ this ->address . '? ' . $ query ;
124118
125119 return $ btc ;
126120 }
0 commit comments