@@ -100,10 +100,10 @@ discard block |
||
100 | 100 | */ |
101 | 101 | private static function payToScriptHashSequence(array $cmds): bool |
102 | 102 | { |
103 | - return 3 === \count($cmds) |
|
103 | + return 3 === \count($cmds) |
|
104 | 104 | && $cmds[0] === OpCodes::OP_HASH160->value |
105 | 105 | && \is_string($cmds[1]) |
106 | - && 20 === \strlen($cmds[1]) |
|
106 | + && 20 === \strlen($cmds[1]) |
|
107 | 107 | && $cmds[2] === OpCodes::OP_EQUAL->value; |
108 | 108 | } |
109 | 109 | |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | |
140 | 140 | private static function payToWitnessPubKeyHashSequence(array $stack): bool |
141 | 141 | { |
142 | - return 2 === \count($stack) |
|
142 | + return 2 === \count($stack) |
|
143 | 143 | && $stack[0] === Encoding::encodeStackNum(0) |
144 | 144 | && \is_string($stack[1]) |
145 | 145 | && 20 === \strlen($stack[1]); |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | |
148 | 148 | private static function payToWitnessScriptHashSequence(array $stack): bool |
149 | 149 | { |
150 | - return 2 === \count($stack) |
|
150 | + return 2 === \count($stack) |
|
151 | 151 | && $stack[0] === Encoding::encodeStackNum(0) |
152 | 152 | && \is_string($stack[1]) |
153 | 153 | && 32 === \strlen($stack[1]); |
@@ -136,16 +136,16 @@ discard block |
||
136 | 136 | |
137 | 137 | public function isP2SH(): bool |
138 | 138 | { |
139 | - return 3 === \count($this->cmds) |
|
139 | + return 3 === \count($this->cmds) |
|
140 | 140 | && $this->cmds[0] === OpCodes::OP_HASH160->value |
141 | 141 | && \is_string($this->cmds[1]) |
142 | - && 20 === \strlen($this->cmds[1]) |
|
142 | + && 20 === \strlen($this->cmds[1]) |
|
143 | 143 | && $this->cmds[2] === OpCodes::OP_EQUAL->value; |
144 | 144 | } |
145 | 145 | |
146 | 146 | public function isP2WPKH(): bool |
147 | 147 | { |
148 | - return 2 === \count($this->cmds) |
|
148 | + return 2 === \count($this->cmds) |
|
149 | 149 | && $this->cmds[0] === OpCodes::OP_0->value |
150 | 150 | && \is_string($this->cmds[1]) |
151 | 151 | && 20 === \strlen($this->cmds[1]); |
@@ -153,7 +153,7 @@ discard block |
||
153 | 153 | |
154 | 154 | public function isP2WSH(): bool |
155 | 155 | { |
156 | - return 2 === \count($this->cmds) |
|
156 | + return 2 === \count($this->cmds) |
|
157 | 157 | && $this->cmds[0] === OpCodes::OP_0->value |
158 | 158 | && \is_string($this->cmds[1]) |
159 | 159 | && 32 === \strlen($this->cmds[1]); |