Skip to content

Commit

Permalink
Add Nexus83 and Nexus84 rulesets
Browse files Browse the repository at this point in the history
  • Loading branch information
paulbalandan committed Jan 10, 2025
1 parent 5cc0b40 commit 44d3971
Show file tree
Hide file tree
Showing 4 changed files with 114 additions and 0 deletions.
30 changes: 30 additions & 0 deletions src/Ruleset/Nexus83.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?php

declare(strict_types=1);

/**
* This file is part of Nexus CS Config.
*
* (c) 2020 John Paul E. Balandan, CPA <paulbalandan@gmail.com>
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/

namespace Nexus\CsConfig\Ruleset;

/**
* Ruleset for `Nexus` group.
*
* @internal
*/
final class Nexus83 extends AbstractRuleset
{
public function __construct()
{
$this->name = 'Nexus for PHP 8.3';
$this->rules = (new Nexus82())->getRules();
$this->requiredPHPVersion = 8_03_00;
$this->autoActivateIsRiskyAllowed = true;
}
}
30 changes: 30 additions & 0 deletions src/Ruleset/Nexus84.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?php

declare(strict_types=1);

/**
* This file is part of Nexus CS Config.
*
* (c) 2020 John Paul E. Balandan, CPA <paulbalandan@gmail.com>
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/

namespace Nexus\CsConfig\Ruleset;

/**
* Ruleset for `Nexus` group.
*
* @internal
*/
final class Nexus84 extends AbstractRuleset
{
public function __construct()
{
$this->name = 'Nexus for PHP 8.4';
$this->rules = (new Nexus83())->getRules();
$this->requiredPHPVersion = 8_04_01;
$this->autoActivateIsRiskyAllowed = true;
}
}
27 changes: 27 additions & 0 deletions tests/Ruleset/Nexus83Test.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?php

declare(strict_types=1);

/**
* This file is part of Nexus CS Config.
*
* (c) 2020 John Paul E. Balandan, CPA <paulbalandan@gmail.com>
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/

namespace Nexus\CsConfig\Tests\Ruleset;

use Nexus\CsConfig\Ruleset\AbstractRuleset;
use Nexus\CsConfig\Ruleset\Nexus83;
use Nexus\CsConfig\Test\AbstractRulesetTestCase;
use PHPUnit\Framework\Attributes\CoversClass;

/**
* @internal
*/
#[CoversClass(AbstractRuleset::class)]
#[CoversClass(Nexus83::class)]
#[CoversClass(AbstractRulesetTestCase::class)]
final class Nexus83Test extends AbstractRulesetTestCase {}
27 changes: 27 additions & 0 deletions tests/Ruleset/Nexus84Test.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?php

declare(strict_types=1);

/**
* This file is part of Nexus CS Config.
*
* (c) 2020 John Paul E. Balandan, CPA <paulbalandan@gmail.com>
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/

namespace Nexus\CsConfig\Tests\Ruleset;

use Nexus\CsConfig\Ruleset\AbstractRuleset;
use Nexus\CsConfig\Ruleset\Nexus84;
use Nexus\CsConfig\Test\AbstractRulesetTestCase;
use PHPUnit\Framework\Attributes\CoversClass;

/**
* @internal
*/
#[CoversClass(AbstractRuleset::class)]
#[CoversClass(Nexus84::class)]
#[CoversClass(AbstractRulesetTestCase::class)]
final class Nexus84Test extends AbstractRulesetTestCase {}

0 comments on commit 44d3971

Please sign in to comment.