*
* @ingroup Parser
*/
-// @codingStandardsIgnoreStart Squiz.Classes.ValidClassName.NotCamelCaps
+// phpcs:ignore Squiz.Classes.ValidClassName.NotCamelCaps
class Preprocessor_Hash extends Preprocessor {
- // @codingStandardsIgnoreEnd
/**
* @var Parser
* Stack class to help Preprocessor::preprocessToObj()
* @ingroup Parser
*/
-// @codingStandardsIgnoreStart Squiz.Classes.ValidClassName.NotCamelCaps
+// phpcs:ignore Squiz.Classes.ValidClassName.NotCamelCaps
class PPDStack_Hash extends PPDStack {
- // @codingStandardsIgnoreEnd
public function __construct() {
- $this->elementClass = 'PPDStackElement_Hash';
+ $this->elementClass = PPDStackElement_Hash::class;
parent::__construct();
$this->rootAccum = [];
}
/**
* @ingroup Parser
*/
-// @codingStandardsIgnoreStart Squiz.Classes.ValidClassName.NotCamelCaps
+// phpcs:ignore Squiz.Classes.ValidClassName.NotCamelCaps
class PPDStackElement_Hash extends PPDStackElement {
- // @codingStandardsIgnoreEnd
public function __construct( $data = [] ) {
- $this->partClass = 'PPDPart_Hash';
+ $this->partClass = PPDPart_Hash::class;
parent::__construct( $data );
}
/**
* @ingroup Parser
*/
-// @codingStandardsIgnoreStart Squiz.Classes.ValidClassName.NotCamelCaps
+// phpcs:ignore Squiz.Classes.ValidClassName.NotCamelCaps
class PPDPart_Hash extends PPDPart {
- // @codingStandardsIgnoreEnd
public function __construct( $out = '' ) {
if ( $out !== '' ) {
* An expansion frame, used as a context to expand the result of preprocessToObj()
* @ingroup Parser
*/
-// @codingStandardsIgnoreStart Squiz.Classes.ValidClassName.NotCamelCaps
+// phpcs:ignore Squiz.Classes.ValidClassName.NotCamelCaps
class PPFrame_Hash implements PPFrame {
- // @codingStandardsIgnoreEnd
/**
* @var Parser
* Expansion frame with template arguments
* @ingroup Parser
*/
-// @codingStandardsIgnoreStart Squiz.Classes.ValidClassName.NotCamelCaps
+// phpcs:ignore Squiz.Classes.ValidClassName.NotCamelCaps
class PPTemplateFrame_Hash extends PPFrame_Hash {
- // @codingStandardsIgnoreEnd
public $numberedArgs, $namedArgs, $parent;
public $numberedExpansionCache, $namedExpansionCache;
* Expansion frame with custom arguments
* @ingroup Parser
*/
-// @codingStandardsIgnoreStart Squiz.Classes.ValidClassName.NotCamelCaps
+// phpcs:ignore Squiz.Classes.ValidClassName.NotCamelCaps
class PPCustomFrame_Hash extends PPFrame_Hash {
- // @codingStandardsIgnoreEnd
public $args;
/**
* @ingroup Parser
*/
-// @codingStandardsIgnoreStart Squiz.Classes.ValidClassName.NotCamelCaps
+// phpcs:ignore Squiz.Classes.ValidClassName.NotCamelCaps
class PPNode_Hash_Tree implements PPNode {
- // @codingStandardsIgnoreEnd
public $name;
$descriptor = $store[$index];
if ( is_string( $descriptor ) ) {
- $class = 'PPNode_Hash_Text';
+ $class = PPNode_Hash_Text::class;
} elseif ( is_array( $descriptor ) ) {
if ( $descriptor[self::NAME][0] === '@' ) {
- $class = 'PPNode_Hash_Attr';
+ $class = PPNode_Hash_Attr::class;
} else {
- $class = 'PPNode_Hash_Tree';
+ $class = self::class;
}
} else {
throw new MWException( __METHOD__.': invalid node descriptor' );
continue;
}
switch ( $child[self::NAME] ) {
- case 'name':
- $bits['name'] = new self( $children, $i );
- break;
- case 'attr':
- $bits['attr'] = new self( $children, $i );
- break;
- case 'inner':
- $bits['inner'] = new self( $children, $i );
- break;
- case 'close':
- $bits['close'] = new self( $children, $i );
- break;
+ case 'name':
+ $bits['name'] = new self( $children, $i );
+ break;
+ case 'attr':
+ $bits['attr'] = new self( $children, $i );
+ break;
+ case 'inner':
+ $bits['inner'] = new self( $children, $i );
+ break;
+ case 'close':
+ $bits['close'] = new self( $children, $i );
+ break;
}
}
if ( !isset( $bits['name'] ) ) {
continue;
}
switch ( $child[self::NAME] ) {
- case 'title':
- $bits['title'] = new self( $children, $i );
- break;
- case 'part':
- $parts[] = new self( $children, $i );
- break;
- case '@lineStart':
- $bits['lineStart'] = '1';
- break;
+ case 'title':
+ $bits['title'] = new self( $children, $i );
+ break;
+ case 'part':
+ $parts[] = new self( $children, $i );
+ break;
+ case '@lineStart':
+ $bits['lineStart'] = '1';
+ break;
}
}
if ( !isset( $bits['title'] ) ) {
/**
* @ingroup Parser
*/
-// @codingStandardsIgnoreStart Squiz.Classes.ValidClassName.NotCamelCaps
+// phpcs:ignore Squiz.Classes.ValidClassName.NotCamelCaps
class PPNode_Hash_Text implements PPNode {
- // @codingStandardsIgnoreEnd
public $value;
private $store, $index;
/**
* @ingroup Parser
*/
-// @codingStandardsIgnoreStart Squiz.Classes.ValidClassName.NotCamelCaps
+// phpcs:ignore Squiz.Classes.ValidClassName.NotCamelCaps
class PPNode_Hash_Array implements PPNode {
- // @codingStandardsIgnoreEnd
public $value;
/**
* @ingroup Parser
*/
-// @codingStandardsIgnoreStart Squiz.Classes.ValidClassName.NotCamelCaps
+// phpcs:ignore Squiz.Classes.ValidClassName.NotCamelCaps
class PPNode_Hash_Attr implements PPNode {
- // @codingStandardsIgnoreEnd
public $name, $value;
private $store, $index;