Skip to content

Commit 15b0610

Browse files
authored
chore: standardize automatic skill sources and PHPDoc bootstrap (#16)
* chore: standardize skill sources and PHPDoc bootstrap * fix: satisfy full quality checks without bypasses
1 parent e19ded7 commit 15b0610

10 files changed

Lines changed: 64 additions & 22 deletions

File tree

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
category: changed
3+
type: patch
4+
---
5+
6+
Synchronize the bundled local skill automatically and trust Fast Forward Composer
7+
skill donors through `fast-forward/*`.
8+
Resolve Changelog contributor skills from stable `0.4.x` releases without a
9+
redundant skill allowlist.
10+
Load the project autoloader for PHPDoc checks when DevTools is installed as a
11+
dependency.

‎.gitattributes‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,4 @@
1313
/phpunit.xml.dist export-ignore
1414
/README*.md export-ignore
1515
/skills.json export-ignore
16+
/.php-cs-fixer.dist.php export-ignore

‎.php-cs-fixer.dist.php‎

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
/**
6+
* Ergonomic utilities for PHP enums, including names, values, lookups, and option maps.
7+
*
8+
* This file is part of fast-forward/enum project.
9+
*
10+
* @author Felipe Sayão Lobato Abreu <github@mentordosnerds.com>
11+
* @license https://opensource.org/licenses/MIT MIT License
12+
*
13+
* @see https://github.com/php-fast-forward/enum
14+
* @see https://github.com/php-fast-forward/enum/issues
15+
* @see https://php-fast-forward.github.io/enum/
16+
* @see https://datatracker.ietf.org/doc/html/rfc2119
17+
*/
18+
19+
use FastForward\DevTools\Path\WorkingProjectPathResolver;
20+
use PhpCsFixer\Config;
21+
use PhpCsFixer\Finder;
22+
23+
require __DIR__ . '/vendor/autoload.php';
24+
25+
return (new Config())
26+
->setRiskyAllowed(false)
27+
->setFinder(Finder::create()->in(__DIR__)->exclude(WorkingProjectPathResolver::TOOLING_EXCLUDED_DIRECTORIES))
28+
->setRules([
29+
'phpdoc_indent' => true,
30+
'phpdoc_order' => ['order' => ['param', 'return', 'throws']],
31+
'phpdoc_separation' => true,
32+
'phpdoc_trim' => true,
33+
'phpdoc_trim_consecutive_blank_line_separation' => true,
34+
'phpdoc_scalar' => true,
35+
'phpdoc_types' => true,
36+
'phpdoc_to_comment' => false,
37+
'phpdoc_add_missing_param_annotation' => true,
38+
]);

‎composer.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,10 @@
6262
"allow-plugins": {
6363
"ergebnis/composer-normalize": true,
6464
"fast-forward/dev-tools": true,
65+
"llm/skills": true,
6566
"phpdocumentor/shim": true,
6667
"phpro/grumphp-shim": true,
67-
"pyrech/composer-changelogs": true,
68-
"llm/skills": true
68+
"pyrech/composer-changelogs": true
6969
},
7070
"platform": {
7171
"php": "8.3.0"

‎skills.json‎

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,27 @@
11
{
2-
"$schema": "https://raw.githubusercontent.com/roxblnfk/skills/master/resources/skills.schema.json",
2+
"$schema": "https://raw.githubusercontent.com/roxblnfk/skills/1.15.0/resources/skills.schema.json",
33
"target": ".agents/skills",
44
"aliases": [],
55
"discovery": false,
66
"auto-sync": true,
77
"vendor-sources": false,
88
"dependencies": {
9-
"composer": false
9+
"composer": {
10+
"trusted": [
11+
"fast-forward/*"
12+
],
13+
"trusted-replace": true
14+
}
1015
},
1116
"sources": [
17+
{
18+
"from": "dir",
19+
"path": "resources/skills"
20+
},
1221
{
1322
"from": "github",
1423
"package": "php-fast-forward/changelog",
15-
"ref": "^0.3.0",
16-
"skills": [
17-
"fast-forward-changelog"
18-
]
24+
"ref": "^0.4.0"
1925
}
2026
]
2127
}

‎src/Calendar/Quarter.php‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,6 @@ public static function ordered(): array
107107

108108
/**
109109
* @param Month $month
110-
*
111-
* @return self
112110
*/
113111
public static function fromMonth(Month $month): self
114112
{

‎src/Calendar/Semester.php‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,6 @@ public function includes(Month $month): bool
111111

112112
/**
113113
* @param Month $month
114-
*
115-
* @return self
116114
*/
117115
public static function fromMonth(Month $month): self
118116
{
@@ -121,8 +119,6 @@ public static function fromMonth(Month $month): self
121119

122120
/**
123121
* @param Quarter $quarter
124-
*
125-
* @return self
126122
*/
127123
public static function fromQuarter(Quarter $quarter): self
128124
{

‎src/Sort/ComparisonResult.php‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,6 @@ enum ComparisonResult implements ReversibleInterface
3838

3939
/**
4040
* @param int $result
41-
*
42-
* @return self
4341
*/
4442
public static function fromComparisonResult(int $result): self
4543
{

‎src/StateMachine/InvalidTransitionException.php‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ final class InvalidTransitionException extends DomainException
2626
/**
2727
* @param UnitEnum $from
2828
* @param UnitEnum $to
29-
*
30-
* @return self
3129
*/
3230
public static function between(UnitEnum $from, UnitEnum $to): self
3331
{

‎src/Trait/HasNameLookup.php‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@ trait HasNameLookup
2424
{
2525
/**
2626
* @param string $name
27-
*
28-
* @return self|null
2927
*/
3028
public static function tryFromName(string $name): ?self
3129
{
@@ -37,8 +35,6 @@ public static function tryFromName(string $name): ?self
3735

3836
/**
3937
* @param string $name
40-
*
41-
* @return self
4238
*/
4339
public static function fromName(string $name): self
4440
{

0 commit comments

Comments
 (0)