Skip to content

Commit

Permalink
MNT Update PHPCS config so CI runs nicely.
Browse files Browse the repository at this point in the history
Also removed a bunch of unnecessary exclusions.
  • Loading branch information
GuySartorelli committed Feb 13, 2023
1 parent 487831b commit 2a3c93f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 13 deletions.
4 changes: 2 additions & 2 deletions code/Model/DynamoDbSession.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ public function __construct(array $options, string $table)
/**
* Check the AWS constant or refer to the Session class to find the session timeout value (if it exists) in terms
* of DynamoDB, session_lifetime is the time to mark the inactive session to be garbage collected.
* If {@link GarbageCollectSessionCronTask} is running periodically on your server (e.g. via the silverstripe-crontask
* module), then the inactive session will get removed from the DynamoDB session table.
* If {@link GarbageCollectSessionCronTask} is running periodically on your server (e.g. via the
* silverstripe-crontask module), then the inactive session will get removed from the DynamoDB session table.
*/
protected function getSessionLifetime(): int
{
Expand Down
14 changes: 3 additions & 11 deletions phpcs.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,12 @@
<ruleset name="SilverStripe">
<description>CodeSniffer ruleset for SilverStripe coding conventions.</description>

<file>code</file>
<file>tests</file>

<!-- base rules are PSR-2 -->
<rule ref="PSR2" >
<!-- Current exclusions -->
<exclude name="PSR1.Methods.CamelCapsMethodName" />
<exclude name="PSR1.Files.SideEffects.FoundWithSymbols" />
<exclude name="PSR2.Classes.PropertyDeclaration" />
<exclude name="PSR2.ControlStructures.SwitchDeclaration" /> <!-- causes php notice while linting -->
<exclude name="PSR2.ControlStructures.SwitchDeclaration.WrongOpenercase" />
<exclude name="PSR2.ControlStructures.SwitchDeclaration.WrongOpenerdefault" />
<exclude name="PSR2.ControlStructures.SwitchDeclaration.TerminatingComment" />
<exclude name="PSR2.Methods.MethodDeclaration.Underscore" />
<exclude name="Squiz.Scope.MethodScope" />
<exclude name="Squiz.Classes.ValidClassName.NotCamelCaps" />
<exclude name="Generic.Files.LineLength.TooLong" />
<exclude name="PEAR.Functions.ValidDefaultValue.NotAtEnd" />
</rule>
</ruleset>

0 comments on commit 2a3c93f

Please sign in to comment.