Skip to content

Commit

Permalink
Intial release, DEV-45
Browse files Browse the repository at this point in the history
  • Loading branch information
norgeindian committed Jan 3, 2024
0 parents commit 537c429
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/phpstan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: ExtDN M2 PHPStan
on: [push, pull_request]

jobs:
phpstan:
name: M2 PHPStan
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: extdn/github-actions-m2/magento-phpstan/8.1@master
with:
composer_name: customgento/module-phpstan
15 changes: 15 additions & 0 deletions Model/FailingFunction.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php

declare(strict_types=1);

namespace CustomGento\Phpstan\Model;

class FailingFunction
{
public const CUSTOMGENTO_PHPSTAN_TEST = 'test';

public function failingFunction(): array

Check failure on line 11 in Model/FailingFunction.php

View workflow job for this annotation

GitHub Actions / M2 PHPStan

Method CustomGento\Phpstan\Model\FailingFunction::failingFunction() should return array but return statement is missing.
{
return [];
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php

declare(strict_types=1);

namespace CustomGento\Phpstan\Plugin\Controller\Adminhtml\Product\Action\Attribute;

use CustomGento\Phpstan\Model\FailingFunction;

class FailingReference
{
private function failingReference(
) {
$array = [FailingFunction::CUSTOMGENTO_PHPSTAN_TEST => '123'];
}
}
11 changes: 11 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"name": "customgento/module-phpstan",
"type": "magento2-module",
"license": "proprietary",
"version": "1.0.6",
"autoload": {
"psr-4": {
"CustomGento\\Phpstan\\": ""
}
}
}

0 comments on commit 537c429

Please sign in to comment.