moneyphp / money

PHP implementation of Fowler's Money pattern.
http://moneyphp.org
MIT License
4.62k stars 440 forks source link

PHPDoc issue #719

Closed riccardobosini closed 1 year ago

riccardobosini commented 1 year ago

Good morning, I'm writing cause I've the following issue. I've a project with installed this package laravel-money that abstracts this project. Let's suppose this code:

use Money\Currency;

$revenueA = new \Cknow\Money\Money(123, new Currency('EUR'));
$revenueB = new \Cknow\Money\Money(123, new Currency('EUR'));

$revenueTotal = $revenueA->add($revenueB);

In my case PHPStorm highlight the last row showing this message: Expected parameter of type '\Money\Money', '\Cknow\Money\Money|null' provided. It expects that the parameter passed to the add method to be of type \Money\Money.

It's annoying cause working with amounts the screen is full of warnings.

Can you please help me about this? Thanks in advance.

agustingomes commented 1 year ago

Hi @riccardobosini

I stumbled upon this report, and briefly looking at it, it feels you would get more adequate help if you open the issue in the laravel-money package, as this particular issue may be originating there.

riccardobosini commented 1 year ago

Hi @riccardobosini

I stumbled upon this report, and briefly looking at it, it feels you would get more adequate help if you open the issue in the laravel-money package, as this particular issue may be originating there.

The following is the warning that shows up. The laravel-money version is v6.4.0. I already opened an issue also in the laravel-money package, but I think finally some checks and fixes on both sides will be required. image

frederikbosch commented 1 year ago

Sorry, cannot provide support for facades, IDEs and frameworks. No time. Good luck!