Skip to content
This repository has been archived by the owner on Apr 9, 2021. It is now read-only.

Unify variable annotations through codebase #29

Open
grossmannmartin opened this issue Dec 12, 2018 · 1 comment
Open

Unify variable annotations through codebase #29

grossmannmartin opened this issue Dec 12, 2018 · 1 comment

Comments

@grossmannmartin
Copy link
Member

What is happening

Currently, there is not exactly clear, what type of variable annotation is preferred and should be used to maintain uniformity.

Several types of annotating variables can be found (placed after/before variable, type/name first)
For example

/** @var \Shopsys\FrameworkBundle\Model\Cart\Watcher\CartWatcherService $cartWatcherService */
$cartWatcherService = $this->getContainer()->get(CartWatcherService::class); 

and

$cartWatcherService = $this->getContainer()->get(CartWatcherService::class);
/* @var $cartWatcherService \Shopsys\FrameworkBundle\Model\Cart\Watcher\CartWatcherService */

Expected result

We should agree on one style and force it. Even better, to have code style check for it.

@PetrHeinz
Copy link
Contributor

see related issue in Shopsys Framework shopsys/shopsys#555

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

2 participants