mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2025-08-06 06:07:26 +02:00
PSR-2 reformatting PHPDoc corrections
With minor corrections. Signed-off-by: Marcus Bointon <marcus@synchromedia.co.uk> Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
This commit is contained in:
committed by
Edward Z. Yang
parent
19eee14899
commit
fac747bdbd
@@ -5,17 +5,29 @@
|
||||
*/
|
||||
class HTMLPurifier_Token_Comment extends HTMLPurifier_Token
|
||||
{
|
||||
public $data; /**< Character data within comment. */
|
||||
/**
|
||||
* Character data within comment.
|
||||
* @type string
|
||||
*/
|
||||
public $data;
|
||||
|
||||
/**
|
||||
* @type bool
|
||||
*/
|
||||
public $is_whitespace = true;
|
||||
|
||||
/**
|
||||
* Transparent constructor.
|
||||
*
|
||||
* @param $data String comment data.
|
||||
* @param string $data String comment data.
|
||||
* @param int $line
|
||||
* @param int $col
|
||||
*/
|
||||
public function __construct($data, $line = null, $col = null) {
|
||||
public function __construct($data, $line = null, $col = null)
|
||||
{
|
||||
$this->data = $data;
|
||||
$this->line = $line;
|
||||
$this->col = $col;
|
||||
$this->col = $col;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -5,7 +5,6 @@
|
||||
*/
|
||||
class HTMLPurifier_Token_Empty extends HTMLPurifier_Token_Tag
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
// vim: et sw=4 sts=4
|
||||
|
@@ -10,8 +10,9 @@
|
||||
class HTMLPurifier_Token_End extends HTMLPurifier_Token_Tag
|
||||
{
|
||||
/**
|
||||
* Token that started this node. Added by MakeWellFormed. Please
|
||||
* do not edit this!
|
||||
* Token that started this node.
|
||||
* Added by MakeWellFormed. Please do not edit this!
|
||||
* @type HTMLPurifier_Token
|
||||
*/
|
||||
public $start;
|
||||
}
|
||||
|
@@ -5,7 +5,6 @@
|
||||
*/
|
||||
class HTMLPurifier_Token_Start extends HTMLPurifier_Token_Tag
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
// vim: et sw=4 sts=4
|
||||
|
@@ -10,6 +10,7 @@ class HTMLPurifier_Token_Tag extends HTMLPurifier_Token
|
||||
*
|
||||
* This allows us to check objects with <tt>!empty($obj->is_tag)</tt>
|
||||
* without having to use a function call <tt>is_a()</tt>.
|
||||
* @type bool
|
||||
*/
|
||||
public $is_tag = true;
|
||||
|
||||
@@ -19,21 +20,27 @@ class HTMLPurifier_Token_Tag extends HTMLPurifier_Token
|
||||
* @note Strictly speaking, XML tags are case sensitive, so we shouldn't
|
||||
* be lower-casing them, but these tokens cater to HTML tags, which are
|
||||
* insensitive.
|
||||
* @type string
|
||||
*/
|
||||
public $name;
|
||||
|
||||
/**
|
||||
* Associative array of the tag's attributes.
|
||||
* @type array
|
||||
*/
|
||||
public $attr = array();
|
||||
|
||||
/**
|
||||
* Non-overloaded constructor, which lower-cases passed tag name.
|
||||
*
|
||||
* @param $name String name.
|
||||
* @param $attr Associative array of attributes.
|
||||
* @param string $name String name.
|
||||
* @param array $attr Associative array of attributes.
|
||||
* @param int $line
|
||||
* @param int $col
|
||||
* @param array $armor
|
||||
*/
|
||||
public function __construct($name, $attr = array(), $line = null, $col = null, $armor = array()) {
|
||||
public function __construct($name, $attr = array(), $line = null, $col = null, $armor = array())
|
||||
{
|
||||
$this->name = ctype_lower($name) ? $name : strtolower($name);
|
||||
foreach ($attr as $key => $value) {
|
||||
// normalization only necessary when key is not lowercase
|
||||
@@ -49,7 +56,7 @@ class HTMLPurifier_Token_Tag extends HTMLPurifier_Token
|
||||
}
|
||||
$this->attr = $attr;
|
||||
$this->line = $line;
|
||||
$this->col = $col;
|
||||
$this->col = $col;
|
||||
$this->armor = $armor;
|
||||
}
|
||||
}
|
||||
|
@@ -12,22 +12,38 @@
|
||||
class HTMLPurifier_Token_Text extends HTMLPurifier_Token
|
||||
{
|
||||
|
||||
public $name = '#PCDATA'; /**< PCDATA tag name compatible with DTD. */
|
||||
public $data; /**< Parsed character data of text. */
|
||||
public $is_whitespace; /**< Bool indicating if node is whitespace. */
|
||||
/**
|
||||
* @type string
|
||||
*/
|
||||
public $name = '#PCDATA';
|
||||
/**< PCDATA tag name compatible with DTD. */
|
||||
|
||||
/**
|
||||
* @type string
|
||||
*/
|
||||
public $data;
|
||||
/**< Parsed character data of text. */
|
||||
|
||||
/**
|
||||
* @type bool
|
||||
*/
|
||||
public $is_whitespace;
|
||||
|
||||
/**< Bool indicating if node is whitespace. */
|
||||
|
||||
/**
|
||||
* Constructor, accepts data and determines if it is whitespace.
|
||||
*
|
||||
* @param $data String parsed character data.
|
||||
* @param string $data String parsed character data.
|
||||
* @param int $line
|
||||
* @param int $col
|
||||
*/
|
||||
public function __construct($data, $line = null, $col = null) {
|
||||
public function __construct($data, $line = null, $col = null)
|
||||
{
|
||||
$this->data = $data;
|
||||
$this->is_whitespace = ctype_space($data);
|
||||
$this->line = $line;
|
||||
$this->col = $col;
|
||||
$this->col = $col;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// vim: et sw=4 sts=4
|
||||
|
Reference in New Issue
Block a user