We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 52a2e79 commit c7b4711Copy full SHA for c7b4711
src/Hal/Component/Token/TokenCollection.php
@@ -131,4 +131,16 @@ public function count() {
131
public function asArray() {
132
return $this->tokens;
133
}
134
+
135
+ /**
136
+ * Replace token with another
137
+ *
138
+ * @param $index
139
+ * @param Token $token
140
+ * @return $this
141
+ */
142
+ public function replace($index, Token $token) {
143
+ $this->tokens[$index] = $token;
144
+ return $this;
145
+ }
146
0 commit comments