Skip to content

Instantly share code, notes, and snippets.

@ircmaxell
Created October 12, 2015 15:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ircmaxell/c128db520476ff45bc94 to your computer and use it in GitHub Desktop.
Save ircmaxell/c128db520476ff45bc94 to your computer and use it in GitHub Desktop.
<?php
function doStuff() {
//blah
//blah
if (!$this->isWhateverCondition(blah, blah, blah)) {
return false;
}
}
function isWhateverConditionName($setMarkerPosition, $setClosingName, $name, $nameClose) {
if(!$this->match(self::TOKEN_OPEN, null, true)) {
return false;
}
if(!$this->match(self::TOKEN_MARKER, $setMarkerPosition, true)) {
return false;
}
if(!$this->match(self::TOKEN_STRING, $setClosingName, true)) {
return false;
}
if(!$this->match(self::TOKEN_CLOSE)) {
return false;
}
if($name !== $nameClose) {
return false;
}
return true;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment