original_string: protected function replaceInlineExamples(DescriptorAbstract $element)
      {
          $description = $element->getDescription();
          $matches     = array();
  
          if (! $description
              || ! preg_match_all('/\{@example\s(.+?)\}/', $description, $matches)
              || count($matches[0]) < 1
          ) {
              return $description;
          }
  
          $matched = array();
          foreach ($matches[0] as $index => $match) {
              if (isset($matched[$match])) {
                  continue;
              }
  
              $matched[$match] = true;
              $exampleReflector = new ExampleTag('example', $matches[1][$index]);
  
              $example = $this->exampleAssembler->create($exampleReflector);
  
              $replacement = '`'.$example->getExample().'`';
              if ($example->getDescription()) {
                  $replacement = '*' . $example->getDescription() . '*' . $replacement;
              }
  
              $description = str_replace($match, $replacement, $description);
          }
  
          return $description;
      }
code: protected function replaceInlineExamples(DescriptorAbstract $element)
      {
          $description = $element->getDescription();
          $matches     = array();
  
          if (! $description
              || ! preg_match_all('/\{@example\s(.+?)\}/', $description, $matches)
              || count($matches[0]) < 1
          ) {
              return $description;
          }
  
          $matched = array();
          foreach ($matches[0] as $index => $match) {
              if (isset($matched[$match])) {
                  continue;
              }
  
              $matched[$match] = true;
              $exampleReflector = new ExampleTag('example', $matches[1][$index]);
  
              $example = $this->exampleAssembler->create($exampleReflector);
  
              $replacement = '`'.$example->getExample().'`';
              if ($example->getDescription()) {
                  $replacement = '*' . $example->getDescription() . '*' . $replacement;
              }
  
              $description = str_replace($match, $replacement, $description);
          }
  
          return $description;
      }
code_tokens: protected function replaceInlineExamples ( DescriptorAbstract $ element ) { $ description = $ element -> getDescription ( ) ; $ matches = array ( ) ; if ( ! $ description || ! preg_match_all ( '/\{@example\s(.+?)\}/' , $ description , $ matches ) || count ( $ matches [ 0 ] ) < 1 ) { return $ description ; } $ matched = array ( ) ; foreach ( $ matches [ 0 ] as $ index => $ match ) { if ( isset ( $ matched [ $ match ] ) ) { continue ; } $ matched [ $ match ] = true ; $ exampleReflector = new ExampleTag ( 'example' , $ matches [ 1 ] [ $ index ] ) ; $ example = $ this -> exampleAssembler -> create ( $ exampleReflector ) ; $ replacement = '`' . $ example -> getExample ( ) . '`' ; if ( $ example -> getDescription ( ) ) { $ replacement = '*' . $ example -> getDescription ( ) . '*' . $ replacement ; } $ description = str_replace ( $ match , $ replacement , $ description ) ; } return $ description ; }
docstring: Replaces the example tags in the description with the contents of the found example.
  
  @param DescriptorAbstract $element
  
  @return string
docstring_tokens: Replaces the example tags in the description with the contents of the found example .