From d2357dcb6a15b0a4b0692f850350033580aa304f Mon Sep 17 00:00:00 2001 From: Guy Sartorelli Date: Wed, 31 Jan 2024 15:22:45 +1300 Subject: [PATCH] MNT Run module-standardiser --- composer.json | 4 +++- phpstan.neon.dist | 3 +++ src/Extensions/GroupSubsites.php | 3 ++- src/Extensions/SiteTreeSubsites.php | 3 ++- src/Model/Subsite.php | 6 ++++-- 5 files changed, 14 insertions(+), 5 deletions(-) create mode 100644 phpstan.neon.dist diff --git a/composer.json b/composer.json index 8466d212..b381a08a 100644 --- a/composer.json +++ b/composer.json @@ -25,7 +25,9 @@ }, "require-dev": { "phpunit/phpunit": "^9.6", - "squizlabs/php_codesniffer": "^3" + "squizlabs/php_codesniffer": "^3", + "silverstripe/standards": "^1", + "phpstan/extension-installer": "^1.3" }, "autoload": { "psr-4": { diff --git a/phpstan.neon.dist b/phpstan.neon.dist new file mode 100644 index 00000000..beb9de3c --- /dev/null +++ b/phpstan.neon.dist @@ -0,0 +1,3 @@ +parameters: + paths: + - src diff --git a/src/Extensions/GroupSubsites.php b/src/Extensions/GroupSubsites.php index f0ecf8fe..9ebedb09 100644 --- a/src/Extensions/GroupSubsites.php +++ b/src/Extensions/GroupSubsites.php @@ -12,6 +12,7 @@ use SilverStripe\ORM\DataObject; use SilverStripe\ORM\DataQuery; use SilverStripe\ORM\DB; +use SilverStripe\ORM\ManyManyList; use SilverStripe\ORM\Queries\SQLSelect; use SilverStripe\Security\Group; use SilverStripe\Security\PermissionProvider; @@ -21,7 +22,7 @@ /** * Extension for the Group object to add subsites support * - * @method SilverStripe\ORM\ManyManyList Subsites() + * @method ManyManyList Subsites() * * @extends DataExtension */ diff --git a/src/Extensions/SiteTreeSubsites.php b/src/Extensions/SiteTreeSubsites.php index ee19ad96..8db1a580 100644 --- a/src/Extensions/SiteTreeSubsites.php +++ b/src/Extensions/SiteTreeSubsites.php @@ -19,6 +19,7 @@ use SilverStripe\ORM\DataExtension; use SilverStripe\ORM\DataObject; use SilverStripe\ORM\DataQuery; +use SilverStripe\ORM\ManyManyList; use SilverStripe\ORM\Map; use SilverStripe\ORM\Queries\SQLSelect; use SilverStripe\Security\Member; @@ -33,7 +34,7 @@ /** * Extension for the SiteTree object to add subsites support * - * @method SilverStripe\ORM\ManyManyList CrossSubsiteLinkTracking() + * @method ManyManyList CrossSubsiteLinkTracking() * @method Subsite Subsite() * * @extends DataExtension diff --git a/src/Model/Subsite.php b/src/Model/Subsite.php index 536b6197..9fd5f2f5 100644 --- a/src/Model/Subsite.php +++ b/src/Model/Subsite.php @@ -24,6 +24,8 @@ use SilverStripe\ORM\DataObject; use SilverStripe\ORM\DB; use SilverStripe\ORM\SS_List; +use SilverStripe\ORM\HasManyList; +use SilverStripe\ORM\ManyManyList; use SilverStripe\Security\Group; use SilverStripe\Security\Member; use SilverStripe\Security\Permission; @@ -38,8 +40,8 @@ * You can simulate subsite access without setting up virtual hosts by appending ?SubsiteID= to the request. * * @package subsites - * @method SilverStripe\ORM\HasManyList Domains() - * @method SilverStripe\ORM\ManyManyList Groups() + * @method HasManyList Domains() + * @method ManyManyList Groups() */ class Subsite extends DataObject {