Skip to content
This repository has been archived by the owner on Jan 21, 2020. It is now read-only.

[v2] Strict types declaration placed before copyright block #15

Open
Xerkus opened this issue Feb 3, 2019 · 1 comment
Open

[v2] Strict types declaration placed before copyright block #15

Xerkus opened this issue Feb 3, 2019 · 1 comment
Milestone

Comments

@Xerkus
Copy link
Member

Xerkus commented Feb 3, 2019

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 Xerkus changed the title Strict types declaration placed before copyright block [v2] Strict types declaration placed before copyright block Feb 3, 2019
@geerteltink geerteltink added this to the 2.0.0 milestone Jun 3, 2019
@weierophinney
Copy link
Member

This repository has been closed and moved to laminas/laminas-coding-standard; a new issue has been opened at laminas/laminas-coding-standard#7.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants