Skip to content

Commit

Permalink
CS: Use "self" keyword instead of class name if possible
Browse files Browse the repository at this point in the history
  • Loading branch information
gharlan committed Apr 1, 2015
1 parent 73fb85d commit f626bdf
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Parser.php
Expand Up @@ -91,7 +91,7 @@ public function parse($value, $exceptionOnInvalidType = false, $objectSupport =
// array
if (!isset($values['value']) || '' == trim($values['value'], ' ') || 0 === strpos(ltrim($values['value'], ' '), '#')) {
$c = $this->getRealCurrentLineNb() + 1;
$parser = new Parser($c);
$parser = new self($c);
$parser->refs = &$this->refs;
$data[] = $parser->parse($this->getNextEmbedBlock(null, true), $exceptionOnInvalidType, $objectSupport);
} else {
Expand All @@ -100,7 +100,7 @@ public function parse($value, $exceptionOnInvalidType = false, $objectSupport =
) {
// this is a compact notation element, add to next block and parse
$c = $this->getRealCurrentLineNb();
$parser = new Parser($c);
$parser = new self($c);
$parser->refs = &$this->refs;

$block = $values['value'];
Expand Down Expand Up @@ -143,7 +143,7 @@ public function parse($value, $exceptionOnInvalidType = false, $objectSupport =
$value = $this->getNextEmbedBlock();
}
$c = $this->getRealCurrentLineNb() + 1;
$parser = new Parser($c);
$parser = new self($c);
$parser->refs = &$this->refs;
$parsed = $parser->parse($value, $exceptionOnInvalidType, $objectSupport);

Expand Down Expand Up @@ -180,7 +180,7 @@ public function parse($value, $exceptionOnInvalidType = false, $objectSupport =
$data[$key] = null;
} else {
$c = $this->getRealCurrentLineNb() + 1;
$parser = new Parser($c);
$parser = new self($c);
$parser->refs = &$this->refs;
$data[$key] = $parser->parse($this->getNextEmbedBlock(), $exceptionOnInvalidType, $objectSupport);
}
Expand Down

0 comments on commit f626bdf

Please sign in to comment.