1<?php 2 3namespace PhpCss\Ast\Selector\Simple { 4 5 use PhpCss\Ast; 6 7 class PseudoClass extends Ast\Selector\Simple { 8 9 public $name = ''; 10 public $parameter; 11 12 public function __construct(string $name, Ast\Node $parameter = NULL) { 13 $this->name = $name; 14 $this->parameter = $parameter; 15 } 16 17 public function accept(Ast\Visitor $visitor): void { 18 if ($this->parameter instanceOf Ast\Node) { 19 if ($visitor->visitEnter($this)) { 20 $this->parameter->accept($visitor); 21 $visitor->visitLeave($this); 22 } 23 } else { 24 $visitor->visit($this); 25 } 26 } 27 } 28} 29