Skip to content

Commit

Permalink
Fix sample ruleset in README
Browse files Browse the repository at this point in the history
  • Loading branch information
paulbalandan committed Dec 29, 2023
1 parent b44fc33 commit b642bdc
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ then you should add it as a development-time dependency:
<?php

use Nexus\CsConfig\Factory;
use Nexus\CsConfig\Ruleset\Nexus73;
use Nexus\CsConfig\Ruleset\Nexus82;

return Factory::create(new Nexus73())->forProjects();
return Factory::create(new Nexus82())->forProjects();

```

Expand Down Expand Up @@ -61,10 +61,10 @@ two optional arguments (the email address and starting year of license).
<?php

use Nexus\CsConfig\Factory;
use Nexus\CsConfig\Ruleset\Nexus73;
use Nexus\CsConfig\Ruleset\Nexus82;

-return Factory::create(new Nexus73())->forProjects();
+return Factory::create(new Nexus73())->forLibrary('My Library', 'John Doe', '[email protected]', 2020);
-return Factory::create(new Nexus82())->forProjects();
+return Factory::create(new Nexus82())->forLibrary('My Library', 'John Doe', '[email protected]', 2020);
```

This setting will configure a license header similar to below:
Expand Down Expand Up @@ -93,10 +93,10 @@ these will not be shown on the license header allowing flexibility on the copyri
<?php

use Nexus\CsConfig\Factory;
use Nexus\CsConfig\Ruleset\Nexus73;
use Nexus\CsConfig\Ruleset\Nexus82;

-return Factory::create(new Nexus73())->forProjects();
+return Factory::create(new Nexus73())->forLibrary('My Library', 'John Doe');
-return Factory::create(new Nexus82())->forProjects();
+return Factory::create(new Nexus82())->forLibrary('My Library', 'John Doe');
```

This will give the following license header:
Expand Down Expand Up @@ -124,10 +124,10 @@ If you feel that a specific rule in the ruleset is not appropriate for you, you
<?php

use Nexus\CsConfig\Factory;
use Nexus\CsConfig\Ruleset\Nexus73;
use Nexus\CsConfig\Ruleset\Nexus82;

-return Factory::create(new Nexus73())->forProjects();
+return Factory::create(new Nexus73(), [
-return Factory::create(new Nexus82())->forProjects();
+return Factory::create(new Nexus82(), [
+ 'binary_operator_spaces' => false,
+])->forProjects();

Expand Down Expand Up @@ -159,10 +159,10 @@ containing your desired options.
<?php

use Nexus\CsConfig\Factory;
use Nexus\CsConfig\Ruleset\Nexus73;
use Nexus\CsConfig\Ruleset\Nexus82;

-return Factory::create(new Nexus73())->forProjects();
+return Factory::create(new Nexus73(), [], [
-return Factory::create(new Nexus82())->forProjects();
+return Factory::create(new Nexus82(), [], [
+ 'usingCache' => false,
+ 'hideProgress => true,
+])->forProjects();
Expand Down Expand Up @@ -194,7 +194,7 @@ final class MyCompany extends AbstractRuleset
'@PSR2' => true,
...
];
$this->requiredPHPVersion = 70400;
$this->requiredPHPVersion = 80200;
$this->autoActivateIsRiskyAllowed = true;
}
}
Expand Down

0 comments on commit b642bdc

Please sign in to comment.