Skip to content

Commit

Permalink
PhpStan level 5
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonkelly committed Oct 28, 2022
1 parent f3c8e49 commit 3e58e87
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ includes:
- vendor/craftcms/phpstan/phpstan.neon

parameters:
level: 4
level: 5
paths:
- src
1 change: 1 addition & 0 deletions src/controllers/ProductsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ public function actionSync(): Response
public function actionRenderCardHtml(): string
{
$id = (int)Craft::$app->request->getParam('id');
/** @var Product $product */
$product = Product::find()->id($id)->status(null)->one();
return ProductHelper::renderCardHtml($product);
}
Expand Down
8 changes: 8 additions & 0 deletions src/elements/db/ProductQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@
use craft\helpers\Db;
use craft\shopify\elements\Product;

/**
* ProductQuery represents a SELECT SQL statement for entries in a way that is independent of DBMS.
*
* @method Product[]|array all($db = null)
* @method Product|array|null one($db = null)
* @method Product|array|null nth(int $n, ?Connection $db = null)
* @author Pixel & Tonic, Inc. <support@pixelandtonic.com>
*/
class ProductQuery extends ElementQuery
{
/**
Expand Down

0 comments on commit 3e58e87

Please sign in to comment.