Lines Matching refs:this

44         $this->text        = $text;
45 $this->line = $line;
46 $this->tokenStream = $tokenStream;
47 $this->id = $id;
55 return $this->text;
63 return $this->line;
71 return $this->id;
93 $tokens = $this->tokenStream->tokens();
94 $currentLineNumber = $tokens[$this->id]->getLine();
97 for ($i = $this->id - 1; $i; $i--) {
133 $i = $this->id;
134 $tokens = $this->tokenStream->tokens();
136 while ($this->endTokenId === null && isset($tokens[$i])) {
144 $this->endTokenId = $i;
146 } elseif (($this instanceof PHP_Token_FUNCTION ||
147 $this instanceof PHP_Token_NAMESPACE) &&
150 $this->endTokenId = $i;
157 if ($this->endTokenId === null) {
158 $this->endTokenId = $this->id;
161 return $this->endTokenId;
169 return $this->tokenStream[$this->getEndTokenId()]->getLine();
180 $tokens = $this->tokenStream->tokens();
182 for ($i = $this->id - 2; $i > $this->id - 7; $i -= 2) {
207 $tokens = $this->tokenStream->tokens();
209 for ($i = $this->id - 2; $i > $this->id - 7; $i -= 2) {
248 if ($this->name === null) {
249 $this->process();
252 return $this->name;
260 if ($this->type === null) {
261 $this->process();
264 return $this->type;
269 $tokens = $this->tokenStream->tokens();
271 if ($tokens[$this->id + 2] instanceof PHP_Token_CONSTANT_ENCAPSED_STRING) {
272 $this->name = trim($tokens[$this->id + 2], "'\"");
273 $this->type = strtolower(
274 str_replace('PHP_Token_', '', get_class($tokens[$this->id]))
312 if ($this->arguments !== null) {
313 return $this->arguments;
316 $this->arguments = [];
317 $tokens = $this->tokenStream->tokens();
321 $i = $this->id + 2;
331 $this->arguments[(string) $tokens[$i]] = $typeDeclaration;
338 return $this->arguments;
346 if ($this->name !== null) {
347 return $this->name;
350 $tokens = $this->tokenStream->tokens();
352 $i = $this->id + 1;
363 $this->name = (string) $tokens[$i];
365 $this->name = (string) $tokens[$i];
367 $this->anonymous = true;
369 $this->name = sprintf(
371 $this->getLine(),
372 $this->getId()
376 if (!$this->isAnonymous()) {
377 for ($i = $this->id; $i; --$i) {
379 $this->name = $tokens[$i]->getName() . '\\' . $this->name;
390 return $this->name;
398 if ($this->ccn !== null) {
399 return $this->ccn;
402 $this->ccn = 1;
403 $end = $this->getEndTokenId();
404 $tokens = $this->tokenStream->tokens();
406 for ($i = $this->id; $i <= $end; $i++) {
420 $this->ccn++;
425 return $this->ccn;
433 if ($this->signature !== null) {
434 return $this->signature;
437 if ($this->isAnonymous()) {
438 $this->signature = 'anonymousFunction';
439 $i = $this->id + 1;
441 $this->signature = '';
442 $i = $this->id + 2;
445 $tokens = $this->tokenStream->tokens();
450 $this->signature .= $tokens[$i++];
453 $this->signature = trim($this->signature);
455 return $this->signature;
463 return $this->anonymous;
479 return (string) $this->tokenStream[$this->id + 2];
487 return $this->tokenStream[$this->id + 4] instanceof PHP_Token_EXTENDS;
495 $className = $this->getName();
496 $docComment = $this->getDocblock();
506 for ($i = $this->id; $i; --$i) {
507 if ($this->tokenStream[$i] instanceof PHP_Token_NAMESPACE) {
508 $result['namespace'] = $this->tokenStream[$i]->getName();
528 $result['fullPackage'] = $this->arrayToName(
561 if (!$this->hasParent()) {
565 $i = $this->id + 6;
566 $tokens = $this->tokenStream->tokens();
582 return (isset($this->tokenStream[$this->id + 4]) &&
583 $this->tokenStream[$this->id + 4] instanceof PHP_Token_IMPLEMENTS) ||
584 (isset($this->tokenStream[$this->id + 8]) &&
585 $this->tokenStream[$this->id + 8] instanceof PHP_Token_IMPLEMENTS);
593 if ($this->interfaces !== null) {
594 return $this->interfaces;
597 if (!$this->hasInterfaces()) {
598 return ($this->interfaces = false);
601 if ($this->tokenStream[$this->id + 4] instanceof PHP_Token_IMPLEMENTS) {
602 $i = $this->id + 3;
604 $i = $this->id + 7;
607 $tokens = $this->tokenStream->tokens();
613 $this->interfaces[] = (string) $tokens[$i];
617 return $this->interfaces;
706 if ($this->name !== null) {
707 return $this->name;
710 $next = $this->tokenStream[$this->id + 1];
713 $next = $this->tokenStream[$this->id + 2];
717 $this->name =(string) $next;
719 return $this->name;
726 $this->name = sprintf(
728 $this->getLine(),
729 $this->getId()
732 $this->anonymous = true;
734 return $this->name;
740 return $this->anonymous;
1277 $tokens = $this->tokenStream->tokens();
1278 $namespace = (string) $tokens[$this->id + 2];
1280 for ($i = $this->id + 3;; $i += 2) {