for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/* @description Transformation Style Sheets - Revolutionising PHP templating *
* @author Tom Butler [email protected] *
* @copyright 2017 Tom Butler <[email protected]> | https://r.je/ *
* @license http://www.opensource.org/licenses/bsd-license.php BSD License *
* @version 1.2 */
namespace Transphporm\Property\ContentPseudo;
class BeforeAfter implements \Transphporm\Property\ContentPseudo {
private $insertLocation;
private $content;
public function __construct($insertLocation, \Transphporm\Property\Content $content) {
$this->insertLocation = $insertLocation;
$this->content = $content;
}
public function run($value, $pseudoArgs, $element, \Transphporm\Hook\PseudoMatcher $pseudoMatcher) {
$currentFirst = $element->firstChild;
foreach ($this->content->getNode($value, $element->ownerDocument) as $node) {
$this->{$this->insertLocation}($node, $element, $currentFirst);
private function before($node, $element, $currentFirst) {
$element->insertBefore($node, $currentFirst);
private function after($node, $element, $currentFirst) {
$currentFirst
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.
$element->appendChild($node);
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.