@@ -154,69 +154,6 @@ protected function serializeArguments(array $arguments)
154154 return $ arguments ;
155155 }
156156
157- /**
158- * Unserialize result (containing web elements and/or shadow roots)
159- *
160- * @param mixed $result
161- *
162- * @return mixed
163- */
164- protected function unserializeResult ($ result )
165- {
166- $ element = is_array ($ result ) ? $ this ->makeElement ($ result ) : null ;
167-
168- if ($ element !== null ) {
169- return $ element ;
170- }
171-
172- if (is_array ($ result )) {
173- foreach ($ result as $ key => $ value ) {
174- $ result [$ key ] = $ this ->unserializeResult ($ value );
175- }
176- }
177-
178- return $ result ;
179- }
180-
181- /**
182- * Factory method for elements
183- *
184- * @param array $value
185- *
186- * @return \WebDriver\Element|\WebDriver\Shadow|null
187- */
188- protected function makeElement ($ value )
189- {
190- if (array_key_exists (LegacyElement::LEGACY_ELEMENT_ID , $ value )) {
191- $ identifier = $ value [LegacyElement::LEGACY_ELEMENT_ID ];
192-
193- return new LegacyElement (
194- $ this ->getIdentifierPath ('/element/ ' . $ identifier ),
195- $ identifier
196- );
197- }
198-
199- if (array_key_exists (Element::WEB_ELEMENT_ID , $ value )) {
200- $ identifier = $ value [Element::WEB_ELEMENT_ID ];
201-
202- return new Element (
203- $ this ->getIdentifierPath ('/element/ ' . $ identifier ),
204- $ identifier
205- );
206- }
207-
208- if (array_key_exists (Shadow::SHADOW_ROOT_ID , $ value )) {
209- $ identifier = $ value [Shadow::SHADOW_ROOT_ID ];
210-
211- return new Shadow (
212- $ this ->getIdentifierPath ('/shadow/ ' . $ identifier ),
213- $ identifier
214- );
215- }
216-
217- return null ;
218- }
219-
220157 /**
221158 * Curl request to webdriver server.
222159 *
0 commit comments