cleanComment() public static method

Clean comment
public static cleanComment ( string $comment, string $glueSeparator = ',', boolean $uniqueValues = true ) : string
$comment string the comment to clean
$glueSeparator string ths string to use when gathering values
$uniqueValues boolean indicates if comment values must be unique or not
return string
Beispiel #1
0
 /**
  * @param string $metaName
  * @param mixed $metaValue
  * @return string|null
  */
 public static function getMetaValueAnnotation($metaName, $metaValue)
 {
     $meta = null;
     if (is_array($metaValue)) {
         $metaValue = implode(' | ', $metaValue);
     }
     $metaValue = GeneratorUtils::cleanComment($metaValue, ', ', stripos($metaName, 'SOAPHeader') === false);
     if (is_scalar($metaValue)) {
         $meta = sprintf("\t- %s: %s", $metaName, $metaValue);
     }
     return $meta;
 }
Beispiel #2
0
 /**
  *
  */
 public function testCleanComment()
 {
     $this->assertEmpty(Utils::cleanComment(null));
     $this->assertEmpty(Utils::cleanComment(new \stdClass()));
 }