zend-coding-standard icon indicating copy to clipboard operation
zend-coding-standard copied to clipboard

[v2] Strict types declaration placed before copyright block

Open Xerkus opened this issue 6 years ago • 1 comments

With copyright docblock using older @link tag format, strict types declaration is placed before it.

 <?php
+
+declare(strict_types=1);
+
 /**
  * @link      http://github.com/zendframework/zend-mvc for the canonical source repository
  * @copyright Copyright (c) 2005-2018 Zend Technologies USA Inc. (http://www.zend.com)
  * @license   https://github.com/zendframework/zend-mvc/blob/master/LICENSE.md New BSD License
  */

But with @see it is placed after the docblock as it should be:

 <?php
+
 /**
- * @link      http://github.com/zendframework/zend-mvc for the canonical source repository
+ * @see      http://github.com/zendframework/zend-mvc for the canonical source repository
  * @copyright Copyright (c) 2005-2018 Zend Technologies USA Inc. (http://www.zend.com)
  * @license   https://github.com/zendframework/zend-mvc/blob/master/LICENSE.md New BSD License
  */
 
+declare(strict_types=1);
+

On a side note, should that extra empty line be added before copyright? Looks like unintended side effect of strict types sniff

Xerkus avatar Feb 03 '19 07:02 Xerkus

This repository has been closed and moved to laminas/laminas-coding-standard; a new issue has been opened at https://github.com/laminas/laminas-coding-standard/issues/7.

weierophinney avatar Dec 31 '19 21:12 weierophinney