Skip to content

Commit

Permalink
Internal cleanup.
Browse files Browse the repository at this point in the history
* [@] cleanup.
  • Loading branch information
daniele-orlando committed Jan 23, 2016
1 parent fbf6809 commit 001884f
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 8 deletions.
16 changes: 14 additions & 2 deletions documents/Changelog.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,25 @@
[+]: new [~]: changed [-]: removed [#]: fixed [@]: internal


1.12.2: (2016-01-18)
1.12.4: (2016-01-23)
Internal cleanup.

* [@] cleanup.


1.12.3:
Refactoring improving the code design.

* [@] refactoring.


1.12.2:
Internal refactoring and performance regression fix.

* [@] refactoring. Performances are normal.


1.12.1: (2016-01-16)
1.12.1:
'->times()' and '->each()' are bound to the context. $this behaves as expected.

* [@] refactoring. Performances are worst but code is much better.
Expand Down
15 changes: 9 additions & 6 deletions source/FluidXml.php
Original file line number Diff line number Diff line change
Expand Up @@ -554,9 +554,10 @@ public function each(callable $fn);
* ```
*
* @param string|array $child The child/children to add.
* @param string $value The child text content.
* @param bool $switchContext Whether to return the current context
* or the context of the created node.
* @param ...$optionals Accepted values are:
* - a boolean for requesting the context switch
* - a string which is the element text content
* - an array containing the attributes to set on the element.
*
* @return FluidContext The context associated to the DOMNodeList.
*/
Expand Down Expand Up @@ -760,9 +761,9 @@ protected function handleInsertion($parent, $k, $v, $fn, &$optionals)
return $this->insertStringString($parent, $k, $v, $fn, $optionals);
}

if ($k_is_string && $k_isnt_special && $v_is_string && $v_is_xml) {
// if ($k_is_string && $k_isnt_special && $v_is_string && $v_is_xml) {
// TODO
}
// }

//////////////////////////////////////////////
$k_is_special_c = $k_is_special && $k === '@';
Expand Down Expand Up @@ -1196,7 +1197,9 @@ public function query(...$xpath)
// the xpath, relative (../..) or absolute (//), returns identical
// matching results that must be collapsed in an unique result
// otherwise a subsequent operation is performed multiple times.
return $this->newContext($this->filterQueryResults($results));
$results = $this->filterQueryResults($results);

return $this->newContext($results);
}

public function times($times, callable $fn = null)
Expand Down

0 comments on commit 001884f

Please sign in to comment.