Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Declaration of backend\models\Product::getPrice()... #34

Open
mavelar opened this issue Apr 24, 2020 · 1 comment
Open

Declaration of backend\models\Product::getPrice()... #34

mavelar opened this issue Apr 24, 2020 · 1 comment

Comments

@mavelar
Copy link

mavelar commented Apr 24, 2020

I already have this error:

Declaration of backend\models\Product::getPrice() must be compatible with yii2mod\cart\models\CartItemInterface::getPrice(): int

I already implement the CartInterface and functions and got this error

@avinasx
Copy link

avinasx commented Mar 9, 2021

I already have this error:

Declaration of backend\models\Product::getPrice() must be compatible with yii2mod\cart\models\CartItemInterface::getPrice(): int

I already implement the CartInterface and functions and got this error

I added php version to be 7.3 in composer.json
and declared function like this:

public function getPrice() : int { return $this->price; }

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

No branches or pull requests

2 participants