/** * @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; }
/** * */ public function testCleanComment() { $this->assertEmpty(Utils::cleanComment(null)); $this->assertEmpty(Utils::cleanComment(new \stdClass())); }