1: <?php
2:
3: namespace Deimos\CLI;
4:
5: class Tokenizer
6: {
7:
8: /**
9: * @var string
10: */
11: protected $data;
12:
13: /**
14: * Tokenizer constructor.
15: *
16: * @param string $data
17: */
18: public function __construct($data)
19: {
20: $this->data = $data;
21: }
22:
23: /**
24: * @return array
25: */
26: public function run()
27: {
28: $rows = token_get_all('<?php ' . $this->data);
29: array_shift($rows);
30:
31: return $rows;
32: }
33:
34: }