public function __construct($options) { $this->browser = new Browser(); $this->engine = new Engine(); $this->os = new Os(); $this->device = new Device(); parent::__construct($options); }
/** * FileAnalyser constructor * * Validates the given file path and calls the parent's constructor. * * * @param string $file The code to analyse * @param bool $registerNameResolver If set to true `PhpParser\NodeVisitor\NameResolver` will be added as the first * visitor. This may negatively affect performance, some Visitors depend on resolved names, however. * @see \Pvra\RequirementAnalyser::__construct() Base constructor */ public function __construct($file, $registerNameResolver = true) { if (!$this->isFileValid($file)) { throw new \RuntimeException(sprintf('The file "%s" could not be found or accessed.', $file)); } $this->filePath = realpath($file); parent::__construct($registerNameResolver); }
/** * StringAnalyser constructor * * @param string $string The code to analyse * @param bool $registerNameResolver Inherited from the base class `Analyser` * @see Analyser::__construct() Base Constructor */ public function __construct($string, $registerNameResolver = true) { $this->string = $string; parent::__construct($registerNameResolver); }