Skip to content

Commit ca6127a

Browse files
committed
Use new PHPStan plugin
1 parent 10ed208 commit ca6127a

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

.phpstan.dist.neon

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
includes:
2-
- vendor/macopedia/phpstan-magento1/extension.neon
2+
- vendor/mahocommerce/maho-phpstan-plugin/extension.neon
33
- .phpstan.dist.baseline.neon
44
- phar://phpstan.phar/conf/bleedingEdge.neon
55
parameters:
66
magentoRootPath: %currentWorkingDirectory%
7+
bootstrapFiles:
8+
- app/Mage.php
79
fileExtensions:
810
- php
911
- phtml

app/Mage.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,9 @@
1414
* @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
1515
*/
1616

17-
define('DS', DIRECTORY_SEPARATOR);
18-
define('PS', PATH_SEPARATOR);
17+
defined('DS') || define('DS', DIRECTORY_SEPARATOR);
18+
defined('PS') || define('PS', PATH_SEPARATOR);
19+
1920
define('BP', dirname(__DIR__));
2021

2122
Mage::register('original_include_path', get_include_path());

composer.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
"AFL-3.0"
77
],
88
"type": "magento-source",
9+
"repositories": [
10+
{ "type": "git", "url": "https://github.com/justinbeaty/maho-phpstan-plugin.git" }
11+
],
912
"require": {
1013
"php": ">=7.4 <8.5",
1114
"ext-ctype": "*",
@@ -50,8 +53,8 @@
5053
"composer/composer": "^2.7",
5154
"dealerdirect/phpcodesniffer-composer-installer": "^1.0.0",
5255
"friendsofphp/php-cs-fixer": "^3.4",
53-
"macopedia/phpstan-magento1": "^1.0.5",
5456
"magento-ecg/coding-standard": "^4.5",
57+
"mahocommerce/maho-phpstan-plugin": "dev-topic-v3",
5558
"openmage/dev-meta-package": "^1.0.5",
5659
"perftools/php-profiler": "^1.1",
5760
"phpcompatibility/php-compatibility": "^9.3",

0 commit comments

Comments
 (0)