diff --git a/build/OCPSinceChecker.php b/build/OCPSinceChecker.php index c059b68739..0eb1c54f0b 100644 --- a/build/OCPSinceChecker.php +++ b/build/OCPSinceChecker.php @@ -54,12 +54,22 @@ class SinceTagCheckVisitor extends \PhpParser\NodeVisitorAbstract { /** @var \PhpParser\Comment\Doc[] $comments */ $comments = $node->getAttribute('comments'); - if(count($comments) !== 0) { - $comment = $comments[count($comments) - 1]; - $text = $comment->getText(); - if(strpos($text, '@deprecated') !== false) { - $this->deprecatedClass = true; - } + + if(count($comments) === 0) { + $this->errors[] = 'PHPDoc is needed for ' . $this->namespace . '\\' . $this->className . '::' . $node->name; + return; + } + + $comment = $comments[count($comments) - 1]; + $text = $comment->getText(); + if(strpos($text, '@deprecated') !== false) { + $this->deprecatedClass = true; + } + + if($this->deprecatedClass === false && strpos($text, '@since') === false && strpos($text, '@deprecated') === false) { + $type = $node instanceof \PhpParser\Node\Stmt\Interface_ ? 'interface' : 'class'; + $this->errors[] = '@since or @deprecated tag is needed in PHPDoc for ' . $type . ' ' . $this->namespace . '\\' . $this->className; + return; } } diff --git a/lib/public/db/querybuilder/iliteral.php b/lib/public/db/querybuilder/iliteral.php index a09b25bb2b..f5db1ce045 100644 --- a/lib/public/db/querybuilder/iliteral.php +++ b/lib/public/db/querybuilder/iliteral.php @@ -20,6 +20,9 @@ */ namespace OCP\DB\QueryBuilder; +/** + * @since 8.2.0 + */ interface ILiteral { /** * @return string diff --git a/lib/public/db/querybuilder/iparameter.php b/lib/public/db/querybuilder/iparameter.php index 0eb525b352..f597163ba0 100644 --- a/lib/public/db/querybuilder/iparameter.php +++ b/lib/public/db/querybuilder/iparameter.php @@ -20,6 +20,9 @@ */ namespace OCP\DB\QueryBuilder; +/** + * @since 8.2.0 + */ interface IParameter { /** * @return string diff --git a/lib/public/db/querybuilder/iqueryfunction.php b/lib/public/db/querybuilder/iqueryfunction.php index 499b6e1efc..4e8c163f77 100644 --- a/lib/public/db/querybuilder/iqueryfunction.php +++ b/lib/public/db/querybuilder/iqueryfunction.php @@ -20,6 +20,9 @@ */ namespace OCP\DB\QueryBuilder; +/** + * @since 8.2.0 + */ interface IQueryFunction { /** * @return string diff --git a/lib/public/files/mount/imountmanager.php b/lib/public/files/mount/imountmanager.php index 96ec1e11ad..1eb9b66dad 100644 --- a/lib/public/files/mount/imountmanager.php +++ b/lib/public/files/mount/imountmanager.php @@ -25,6 +25,7 @@ namespace OCP\Files\Mount; * Interface IMountManager * * Manages all mounted storages in the system + * @since 8.2.0 */ interface IMountManager { diff --git a/lib/public/template.php b/lib/public/template.php index cc91bff252..b308240306 100644 --- a/lib/public/template.php +++ b/lib/public/template.php @@ -137,6 +137,8 @@ function html_select_options($options, $selected, $params=array()) { /** * This class provides the template system for owncloud. You can use it to load * specific templates, add data and generate the html code + * + * @since 8.0.0 */ class Template extends \OC_Template { /**