Skip to content

Commit

Permalink
Update copyright and version
Browse files Browse the repository at this point in the history
  • Loading branch information
nicksagona committed Nov 20, 2019
1 parent dd93386 commit 7693529
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 23 deletions.
2 changes: 1 addition & 1 deletion LICENSE.TXT
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
BSD 3 Clause License

Copyright (c) 2009-2019, NOLA Interactive, LLC.
Copyright (c) 2009-2020, NOLA Interactive, LLC.
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
10 changes: 6 additions & 4 deletions src/AbstractNode.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*
* @link https://github.com/popphp/popphp-framework
* @author Nick Sagona, III <[email protected]>
* @copyright Copyright (c) 2009-2019 NOLA Interactive, LLC. (http://www.nolainteractive.com)
* @copyright Copyright (c) 2009-2020 NOLA Interactive, LLC. (http://www.nolainteractive.com)
* @license http://www.popphp.org/license New BSD License
*/

Expand All @@ -19,9 +19,9 @@
* @category Pop
* @package Pop\Dom
* @author Nick Sagona, III <[email protected]>
* @copyright Copyright (c) 2009-2019 NOLA Interactive, LLC. (http://www.nolainteractive.com)
* @copyright Copyright (c) 2009-2020 NOLA Interactive, LLC. (http://www.nolainteractive.com)
* @license http://www.popphp.org/license New BSD License
* @version 3.2.6
* @version 3.2.7
*/
abstract class AbstractNode
{
Expand Down Expand Up @@ -124,7 +124,9 @@ public function addChildren($children)
} else if ($children instanceof Child) {
$this->addChild($children);
} else {
throw new Exception('Error: The parameter passed must be an instance of Pop\Dom\Child or an array of Pop\Dom\Child instances.');
throw new Exception(
'Error: The parameter passed must be an instance of Pop\Dom\Child or an array of Pop\Dom\Child instances.'
);
}

return $this;
Expand Down
23 changes: 15 additions & 8 deletions src/Child.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*
* @link https://github.com/popphp/popphp-framework
* @author Nick Sagona, III <[email protected]>
* @copyright Copyright (c) 2009-2019 NOLA Interactive, LLC. (http://www.nolainteractive.com)
* @copyright Copyright (c) 2009-2020 NOLA Interactive, LLC. (http://www.nolainteractive.com)
* @license http://www.popphp.org/license New BSD License
*/

Expand All @@ -19,9 +19,9 @@
* @category Pop
* @package Pop\Dom
* @author Nick Sagona, III <[email protected]>
* @copyright Copyright (c) 2009-2019 NOLA Interactive, LLC. (http://www.nolainteractive.com)
* @copyright Copyright (c) 2009-2020 NOLA Interactive, LLC. (http://www.nolainteractive.com)
* @license http://www.popphp.org/license New BSD License
* @version 3.2.6
* @version 3.2.7
*/
class Child extends AbstractNode
{
Expand Down Expand Up @@ -479,10 +479,12 @@ public function render($depth = 0, $indent = null, $inner = false)

// Initialize the node.
if ($this->nodeName == '#text') {
$this->output .= ((!$this->preserveWhiteSpace) ? '' : "{$indent}{$this->indent}") . $this->nodeValue . ((!$this->preserveWhiteSpace) ? '' : "\n");
$this->output .= ((!$this->preserveWhiteSpace) ?
'' : "{$indent}{$this->indent}") . $this->nodeValue . ((!$this->preserveWhiteSpace) ? '' : "\n");
} else {
if (!$inner) {
$this->output .= ((!$this->preserveWhiteSpace) ? '' : "{$indent}{$this->indent}") . "<{$this->nodeName}{$attribs}";
$this->output .= ((!$this->preserveWhiteSpace) ?
'' : "{$indent}{$this->indent}") . "<{$this->nodeName}{$attribs}";
}

if ((null === $indent) && (null !== $this->indent)) {
Expand All @@ -505,7 +507,8 @@ public function render($depth = 0, $indent = null, $inner = false)
// Render node value before the child nodes.
if (!$this->childrenFirst) {
if (null !== $this->nodeValue) {
$this->output .= ((!$this->preserveWhiteSpace) ? '' : str_repeat(' ', $newDepth) . "{$indent}") . "{$this->nodeValue}\n";
$this->output .= ((!$this->preserveWhiteSpace) ?
'' : str_repeat(' ', $newDepth) . "{$indent}") . "{$this->nodeValue}\n";
}
foreach ($this->childNodes as $child) {
$this->output .= $child->render($newDepth, $indent);
Expand All @@ -524,9 +527,13 @@ public function render($depth = 0, $indent = null, $inner = false)
}
if (!$inner) {
if (null !== $this->nodeValue) {
$this->output .= ((!$this->preserveWhiteSpace) ? '' : str_repeat(' ', $newDepth) . "{$indent}") . "{$this->nodeValue}" . ((!$this->preserveWhiteSpace) ? '' : "\n{$origIndent}") . "</{$this->nodeName}>" . (($this->preserveWhiteSpace) ? '' : "\n");
$this->output .= ((!$this->preserveWhiteSpace) ?
'' : str_repeat(' ', $newDepth) . "{$indent}") .
"{$this->nodeValue}" . ((!$this->preserveWhiteSpace) ?
'' : "\n{$origIndent}") . "</{$this->nodeName}>" . (($this->preserveWhiteSpace) ? '' : "\n");
} else {
$this->output .= ((!$this->preserveWhiteSpace) ? '' : "{$origIndent}") . "</{$this->nodeName}>" . ((!$this->preserveWhiteSpace) ? '' : "\n");
$this->output .= ((!$this->preserveWhiteSpace) ?
'' : "{$origIndent}") . "</{$this->nodeName}>" . ((!$this->preserveWhiteSpace) ? '' : "\n");
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions src/Document.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*
* @link https://github.com/popphp/popphp-framework
* @author Nick Sagona, III <[email protected]>
* @copyright Copyright (c) 2009-2019 NOLA Interactive, LLC. (http://www.nolainteractive.com)
* @copyright Copyright (c) 2009-2020 NOLA Interactive, LLC. (http://www.nolainteractive.com)
* @license http://www.popphp.org/license New BSD License
*/

Expand All @@ -19,9 +19,9 @@
* @category Pop
* @package Pop\Dom
* @author Nick Sagona, III <[email protected]>
* @copyright Copyright (c) 2009-2019 NOLA Interactive, LLC. (http://www.nolainteractive.com)
* @copyright Copyright (c) 2009-2020 NOLA Interactive, LLC. (http://www.nolainteractive.com)
* @license http://www.popphp.org/license New BSD License
* @version 3.2.6
* @version 3.2.7
*/
class Document extends AbstractNode
{
Expand Down
8 changes: 4 additions & 4 deletions src/DomIterator.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*
* @link https://github.com/popphp/popphp-framework
* @author Nick Sagona, III <[email protected]>
* @copyright Copyright (c) 2009-2019 NOLA Interactive, LLC. (http://www.nolainteractive.com)
* @copyright Copyright (c) 2009-2020 NOLA Interactive, LLC. (http://www.nolainteractive.com)
* @license http://www.popphp.org/license New BSD License
*/

Expand All @@ -19,9 +19,9 @@
* @category Pop
* @package Pop\Dom
* @author Nick Sagona, III <[email protected]>
* @copyright Copyright (c) 2009-2019 NOLA Interactive, LLC. (http://www.nolainteractive.com)
* @copyright Copyright (c) 2009-2020 NOLA Interactive, LLC. (http://www.nolainteractive.com)
* @license http://www.popphp.org/license New BSD License
* @version 3.2.6
* @version 3.2.7
*/
class DomIterator implements \RecursiveIterator
{
Expand Down Expand Up @@ -53,7 +53,7 @@ public function __construct(\DOMNode $domNode)

/**
* Get current method
* @return \DOMElement
* @return \DOMNode
*/
public function current()
{
Expand Down
6 changes: 3 additions & 3 deletions src/Exception.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*
* @link https://github.com/popphp/popphp-framework
* @author Nick Sagona, III <[email protected]>
* @copyright Copyright (c) 2009-2019 NOLA Interactive, LLC. (http://www.nolainteractive.com)
* @copyright Copyright (c) 2009-2020 NOLA Interactive, LLC. (http://www.nolainteractive.com)
* @license http://www.popphp.org/license New BSD License
*/

Expand All @@ -19,8 +19,8 @@
* @category Pop
* @package Pop\Dom
* @author Nick Sagona, III <[email protected]>
* @copyright Copyright (c) 2009-2019 NOLA Interactive, LLC. (http://www.nolainteractive.com)
* @copyright Copyright (c) 2009-2020 NOLA Interactive, LLC. (http://www.nolainteractive.com)
* @license http://www.popphp.org/license New BSD License
* @version 3.2.6
* @version 3.2.7
*/
class Exception extends \Exception {}

0 comments on commit 7693529

Please sign in to comment.