/**
  * Used to "straighten out" an expression as some expressions allow for shell regex which makes them hard to
  * generate code from.
  * So with this method a matching pointcut can be altered into having a directly readable expression
  *
  * @param FunctionDefinition|AttributeDefinition $definition Definition to straighten the expression against
  *
  * @return null
  */
 public function straightenExpression($definition)
 {
     // structure name has to be absolute
     $structureName = '\\' . ltrim($definition->getStructureName(), '\\');
     // fix the expression
     $this->expression = str_replace(array($this->callType . $this->function, $this->structure), array($this->callType . $definition->getName(), $structureName), $this->getExpression());
     // set the obvious properties
     $this->function = $definition->getName();
     $this->structure = $structureName;
 }