diff --git a/docs/api/classes/Cecil-Builder.html b/docs/api/classes/Cecil-Builder.html index 70503fd23..9a584f88f 100644 --- a/docs/api/classes/Cecil-Builder.html +++ b/docs/api/classes/Cecil-Builder.html @@ -340,7 +340,7 @@

$options -  : array<string|int, mixed> +  : BuildOptions
Build options.
@@ -638,7 +638,7 @@

@@ -647,7 +647,7 @@

public - array<string, bool|string> + mixed OPTIONS = ['drafts' => false, 'dry-run' => false, 'page' => '', 'render-subset' => ''] @@ -677,6 +677,20 @@

Builder::build() + +
+ phpstan-type +
+
+ +

BuildOptions array{ +drafts?: bool, +dry-run?: bool, +page?: string, +render-subset?: string +}

+
+
@@ -693,7 +707,7 @@

@@ -727,6 +741,14 @@

StepInterface + +
+ see +
+
+ Builder::build() + +
@@ -914,7 +936,7 @@

@@ -957,7 +979,7 @@

@@ -1015,7 +1037,7 @@

@@ -1072,7 +1094,7 @@

@@ -1113,7 +1135,7 @@

@@ -1154,7 +1176,7 @@

@@ -1195,7 +1217,7 @@

@@ -1238,7 +1260,7 @@

@@ -1295,7 +1317,7 @@

@@ -1354,7 +1376,7 @@

@@ -1396,7 +1418,7 @@

@@ -1405,7 +1427,7 @@

protected - array<string|int, mixed> + BuildOptions $options = [] @@ -1460,7 +1482,7 @@

@@ -1502,7 +1524,7 @@

@@ -1544,7 +1566,7 @@

@@ -1585,7 +1607,7 @@

@@ -1644,7 +1666,7 @@

@@ -1688,7 +1710,7 @@

@@ -1739,7 +1761,7 @@

@@ -1784,7 +1806,7 @@

@@ -1792,7 +1814,7 @@

public - build(array<string|int, self::OPTIONS> $options) : self + build(BuildOptions $options) : self
@@ -1806,7 +1828,7 @@

Parameters
$options - : array<string|int, self::OPTIONS> + : BuildOptions
@@ -1852,7 +1874,7 @@

@@ -1891,7 +1913,7 @@

@@ -1930,7 +1952,7 @@

@@ -1969,7 +1991,7 @@

@@ -2008,7 +2030,7 @@

@@ -2047,7 +2069,7 @@

@@ -2096,7 +2118,7 @@

@@ -2135,7 +2157,7 @@

@@ -2184,7 +2206,7 @@

@@ -2223,7 +2245,7 @@

@@ -2262,7 +2284,7 @@

@@ -2301,7 +2323,7 @@

@@ -2340,7 +2362,7 @@

@@ -2379,7 +2401,7 @@

@@ -2428,7 +2450,7 @@

@@ -2482,7 +2504,7 @@

@@ -2517,7 +2539,7 @@

@@ -2556,7 +2578,7 @@

@@ -2601,7 +2623,7 @@

@@ -2650,7 +2672,7 @@

@@ -2695,7 +2717,7 @@

@@ -2744,7 +2766,7 @@

@@ -2789,7 +2811,7 @@

@@ -2834,7 +2856,7 @@

@@ -2879,7 +2901,7 @@

@@ -2924,7 +2946,7 @@

@@ -2969,7 +2991,7 @@

@@ -3018,7 +3040,7 @@

@@ -3063,7 +3085,7 @@

@@ -3108,7 +3130,7 @@

diff --git a/docs/api/classes/Cecil-Step-AbstractStep.html b/docs/api/classes/Cecil-Step-AbstractStep.html index c4cfd5260..e638930c9 100644 --- a/docs/api/classes/Cecil-Step-AbstractStep.html +++ b/docs/api/classes/Cecil-Step-AbstractStep.html @@ -167,7 +167,7 @@

@@ -181,6 +181,22 @@

+

+ Tags + + +
+
+
+ phpstan-import-type +
+
+ +

BuildOptions from Builder

+
+ +
+
@@ -234,7 +250,7 @@

$options -  : Builder::OPTIONS +  : BuildOptions
Configuration options for the step.
@@ -305,7 +321,7 @@

@@ -343,7 +359,7 @@

@@ -381,7 +397,7 @@

@@ -419,7 +435,7 @@

@@ -428,13 +444,28 @@

protected - Builder::OPTIONS + BuildOptions $options +

+ Tags + + +
+
+
+ see +
+
+ Builder::OPTIONS + + +
+
@@ -463,7 +494,7 @@

@@ -508,7 +539,7 @@

@@ -549,7 +580,7 @@

@@ -595,7 +626,7 @@

diff --git a/docs/api/classes/Cecil-Step-Assets-Save.html b/docs/api/classes/Cecil-Step-Assets-Save.html index dce7c8f34..688274722 100644 --- a/docs/api/classes/Cecil-Step-Assets-Save.html +++ b/docs/api/classes/Cecil-Step-Assets-Save.html @@ -238,7 +238,7 @@

$options -  : Builder::OPTIONS +  : BuildOptions
Configuration options for the step.
@@ -324,7 +324,7 @@

@@ -438,7 +438,7 @@

@@ -476,7 +476,7 @@

@@ -514,7 +514,7 @@

@@ -523,13 +523,28 @@

protected - Builder::OPTIONS + BuildOptions $options +

+ Tags + + +
+
+
+ see +
+
+ Builder::OPTIONS + + +
+
@@ -558,7 +573,7 @@

@@ -603,7 +618,7 @@

diff --git a/docs/api/classes/Cecil-Step-Data-Load.html b/docs/api/classes/Cecil-Step-Data-Load.html index 642b5517c..10dd577d9 100644 --- a/docs/api/classes/Cecil-Step-Data-Load.html +++ b/docs/api/classes/Cecil-Step-Data-Load.html @@ -227,7 +227,7 @@

$options -  : Builder::OPTIONS +  : BuildOptions
Configuration options for the step.
@@ -312,7 +312,7 @@

@@ -350,7 +350,7 @@

@@ -388,7 +388,7 @@

@@ -426,7 +426,7 @@

@@ -435,13 +435,28 @@

protected - Builder::OPTIONS + BuildOptions $options +

+ Tags + + +
+
+
+ see +
+
+ Builder::OPTIONS + + +
+
@@ -470,7 +485,7 @@

@@ -515,7 +530,7 @@

diff --git a/docs/api/classes/Cecil-Step-Menus-Create.html b/docs/api/classes/Cecil-Step-Menus-Create.html index 0205573a3..46ee819c8 100644 --- a/docs/api/classes/Cecil-Step-Menus-Create.html +++ b/docs/api/classes/Cecil-Step-Menus-Create.html @@ -234,7 +234,7 @@

$options -  : Builder::OPTIONS +  : BuildOptions
Configuration options for the step.
@@ -319,7 +319,7 @@

@@ -357,7 +357,7 @@

@@ -395,7 +395,7 @@

@@ -471,7 +471,7 @@

@@ -480,13 +480,28 @@

protected - Builder::OPTIONS + BuildOptions $options +

+ Tags + + +
+
+
+ see +
+
+ Builder::OPTIONS + + +
+
@@ -515,7 +530,7 @@

@@ -560,7 +575,7 @@

@@ -640,7 +655,7 @@

diff --git a/docs/api/classes/Cecil-Step-Optimize-AbstractOptimize.html b/docs/api/classes/Cecil-Step-Optimize-AbstractOptimize.html index 2d76b4452..eea0a0045 100644 --- a/docs/api/classes/Cecil-Step-Optimize-AbstractOptimize.html +++ b/docs/api/classes/Cecil-Step-Optimize-AbstractOptimize.html @@ -227,7 +227,7 @@

$options -  : Builder::OPTIONS +  : BuildOptions
Configuration options for the step.
@@ -338,7 +338,7 @@

@@ -376,7 +376,7 @@

@@ -414,7 +414,7 @@

@@ -452,7 +452,7 @@

@@ -461,13 +461,28 @@

protected - Builder::OPTIONS + BuildOptions $options +

+ Tags + + +
+
+
+ see +
+
+ Builder::OPTIONS + + +
+
@@ -576,7 +591,7 @@

@@ -621,7 +636,7 @@

diff --git a/docs/api/classes/Cecil-Step-Optimize-Css.html b/docs/api/classes/Cecil-Step-Optimize-Css.html index ceff87932..8a528ba06 100644 --- a/docs/api/classes/Cecil-Step-Optimize-Css.html +++ b/docs/api/classes/Cecil-Step-Optimize-Css.html @@ -226,7 +226,7 @@

$options -  : Builder::OPTIONS +  : BuildOptions
Configuration options for the step.
@@ -344,7 +344,7 @@

@@ -382,7 +382,7 @@

@@ -420,7 +420,7 @@

@@ -458,7 +458,7 @@

@@ -467,13 +467,28 @@

protected - Builder::OPTIONS + BuildOptions $options +

+ Tags + + +
+
+
+ see +
+
+ Builder::OPTIONS + + +
+
@@ -582,7 +597,7 @@

@@ -627,7 +642,7 @@

diff --git a/docs/api/classes/Cecil-Step-Optimize-Html.html b/docs/api/classes/Cecil-Step-Optimize-Html.html index c205c2de3..8f8f6d8d4 100644 --- a/docs/api/classes/Cecil-Step-Optimize-Html.html +++ b/docs/api/classes/Cecil-Step-Optimize-Html.html @@ -227,7 +227,7 @@

$options -  : Builder::OPTIONS +  : BuildOptions
Configuration options for the step.
@@ -345,7 +345,7 @@

@@ -383,7 +383,7 @@

@@ -421,7 +421,7 @@

@@ -459,7 +459,7 @@

@@ -468,13 +468,28 @@

protected - Builder::OPTIONS + BuildOptions $options +

+ Tags + + +
+
+
+ see +
+
+ Builder::OPTIONS + + +
+
@@ -583,7 +598,7 @@

@@ -628,7 +643,7 @@

diff --git a/docs/api/classes/Cecil-Step-Optimize-Images.html b/docs/api/classes/Cecil-Step-Optimize-Images.html index 6bb0f90d0..4364a5781 100644 --- a/docs/api/classes/Cecil-Step-Optimize-Images.html +++ b/docs/api/classes/Cecil-Step-Optimize-Images.html @@ -226,7 +226,7 @@

$options -  : Builder::OPTIONS +  : BuildOptions
Configuration options for the step.
@@ -344,7 +344,7 @@

@@ -382,7 +382,7 @@

@@ -420,7 +420,7 @@

@@ -458,7 +458,7 @@

@@ -467,13 +467,28 @@

protected - Builder::OPTIONS + BuildOptions $options +

+ Tags + + +
+
+
+ see +
+
+ Builder::OPTIONS + + +
+
@@ -582,7 +597,7 @@

@@ -627,7 +642,7 @@

diff --git a/docs/api/classes/Cecil-Step-Optimize-Js.html b/docs/api/classes/Cecil-Step-Optimize-Js.html index 666ef846d..b2ee46851 100644 --- a/docs/api/classes/Cecil-Step-Optimize-Js.html +++ b/docs/api/classes/Cecil-Step-Optimize-Js.html @@ -226,7 +226,7 @@

$options -  : Builder::OPTIONS +  : BuildOptions
Configuration options for the step.
@@ -344,7 +344,7 @@

@@ -382,7 +382,7 @@

@@ -420,7 +420,7 @@

@@ -458,7 +458,7 @@

@@ -467,13 +467,28 @@

protected - Builder::OPTIONS + BuildOptions $options +

+ Tags + + +
+
+
+ see +
+
+ Builder::OPTIONS + + +
+
@@ -582,7 +597,7 @@

@@ -627,7 +642,7 @@

diff --git a/docs/api/classes/Cecil-Step-Pages-Convert.html b/docs/api/classes/Cecil-Step-Pages-Convert.html index ed163d31d..81c50c563 100644 --- a/docs/api/classes/Cecil-Step-Pages-Convert.html +++ b/docs/api/classes/Cecil-Step-Pages-Convert.html @@ -226,7 +226,7 @@

$options -  : Builder::OPTIONS +  : BuildOptions
Configuration options for the step.
@@ -313,7 +313,7 @@

@@ -351,7 +351,7 @@

@@ -389,7 +389,7 @@

@@ -427,7 +427,7 @@

@@ -436,13 +436,28 @@

protected - Builder::OPTIONS + BuildOptions $options +

+ Tags + + +
+
+
+ see +
+
+ Builder::OPTIONS + + +
+
@@ -471,7 +486,7 @@

@@ -516,7 +531,7 @@

diff --git a/docs/api/classes/Cecil-Step-Pages-Create.html b/docs/api/classes/Cecil-Step-Pages-Create.html index 1539a135a..b3a301174 100644 --- a/docs/api/classes/Cecil-Step-Pages-Create.html +++ b/docs/api/classes/Cecil-Step-Pages-Create.html @@ -228,7 +228,7 @@

$options -  : Builder::OPTIONS +  : BuildOptions
Configuration options for the step.
@@ -306,7 +306,7 @@

@@ -344,7 +344,7 @@

@@ -382,7 +382,7 @@

@@ -420,7 +420,7 @@

@@ -429,13 +429,28 @@

protected - Builder::OPTIONS + BuildOptions $options +

+ Tags + + +
+
+
+ see +
+
+ Builder::OPTIONS + + +
+
@@ -464,7 +479,7 @@

@@ -509,7 +524,7 @@

diff --git a/docs/api/classes/Cecil-Step-Pages-Generate.html b/docs/api/classes/Cecil-Step-Pages-Generate.html index e1669807c..e5b45bbe4 100644 --- a/docs/api/classes/Cecil-Step-Pages-Generate.html +++ b/docs/api/classes/Cecil-Step-Pages-Generate.html @@ -225,7 +225,7 @@

$options -  : Builder::OPTIONS +  : BuildOptions
Configuration options for the step.
@@ -303,7 +303,7 @@

@@ -341,7 +341,7 @@

@@ -379,7 +379,7 @@

@@ -417,7 +417,7 @@

@@ -426,13 +426,28 @@

protected - Builder::OPTIONS + BuildOptions $options +

+ Tags + + +
+
+
+ see +
+
+ Builder::OPTIONS + + +
+
@@ -461,7 +476,7 @@

@@ -506,7 +521,7 @@

diff --git a/docs/api/classes/Cecil-Step-Pages-Load.html b/docs/api/classes/Cecil-Step-Pages-Load.html index d89eacf95..a4a829263 100644 --- a/docs/api/classes/Cecil-Step-Pages-Load.html +++ b/docs/api/classes/Cecil-Step-Pages-Load.html @@ -227,7 +227,7 @@

$options -  : Builder::OPTIONS +  : BuildOptions
Configuration options for the step.
@@ -311,7 +311,7 @@

@@ -349,7 +349,7 @@

@@ -387,7 +387,7 @@

@@ -425,7 +425,7 @@

@@ -434,13 +434,28 @@

protected - Builder::OPTIONS + BuildOptions $options +

+ Tags + + +
+
+
+ see +
+
+ Builder::OPTIONS + + +
+
@@ -507,7 +522,7 @@

@@ -552,7 +567,7 @@

diff --git a/docs/api/classes/Cecil-Step-Pages-Render.html b/docs/api/classes/Cecil-Step-Pages-Render.html index 7985aa5d4..6fc0c560b 100644 --- a/docs/api/classes/Cecil-Step-Pages-Render.html +++ b/docs/api/classes/Cecil-Step-Pages-Render.html @@ -240,7 +240,7 @@

$options -  : Builder::OPTIONS +  : BuildOptions
Configuration options for the step.
@@ -397,7 +397,7 @@

@@ -435,7 +435,7 @@

@@ -473,7 +473,7 @@

@@ -511,7 +511,7 @@

@@ -520,13 +520,28 @@

protected - Builder::OPTIONS + BuildOptions $options +

+ Tags + + +
+
+
+ see +
+
+ Builder::OPTIONS + + +
+
@@ -593,7 +608,7 @@

@@ -638,7 +653,7 @@

diff --git a/docs/api/classes/Cecil-Step-Pages-Save.html b/docs/api/classes/Cecil-Step-Pages-Save.html index cfeb77921..18d11de16 100644 --- a/docs/api/classes/Cecil-Step-Pages-Save.html +++ b/docs/api/classes/Cecil-Step-Pages-Save.html @@ -228,7 +228,7 @@

$options -  : Builder::OPTIONS +  : BuildOptions
Configuration options for the step.
@@ -313,7 +313,7 @@

@@ -351,7 +351,7 @@

@@ -389,7 +389,7 @@

@@ -427,7 +427,7 @@

@@ -436,13 +436,28 @@

protected - Builder::OPTIONS + BuildOptions $options +

+ Tags + + +
+
+
+ see +
+
+ Builder::OPTIONS + + +
+
@@ -471,7 +486,7 @@

@@ -516,7 +531,7 @@

diff --git a/docs/api/classes/Cecil-Step-StaticFiles-Copy.html b/docs/api/classes/Cecil-Step-StaticFiles-Copy.html index 62a0f8f0b..f122008f3 100644 --- a/docs/api/classes/Cecil-Step-StaticFiles-Copy.html +++ b/docs/api/classes/Cecil-Step-StaticFiles-Copy.html @@ -234,7 +234,7 @@

$options -  : Builder::OPTIONS +  : BuildOptions
Configuration options for the step.
@@ -319,7 +319,7 @@

@@ -357,7 +357,7 @@

@@ -395,7 +395,7 @@

@@ -471,7 +471,7 @@

@@ -480,13 +480,28 @@

protected - Builder::OPTIONS + BuildOptions $options +

+ Tags + + +
+
+
+ see +
+
+ Builder::OPTIONS + + +
+
@@ -515,7 +530,7 @@

@@ -560,7 +575,7 @@

diff --git a/docs/api/classes/Cecil-Step-StaticFiles-Load.html b/docs/api/classes/Cecil-Step-StaticFiles-Load.html index 757b7eb39..325c5e3ab 100644 --- a/docs/api/classes/Cecil-Step-StaticFiles-Load.html +++ b/docs/api/classes/Cecil-Step-StaticFiles-Load.html @@ -227,7 +227,7 @@

$options -  : Builder::OPTIONS +  : BuildOptions
Configuration options for the step.
@@ -305,7 +305,7 @@

@@ -343,7 +343,7 @@

@@ -381,7 +381,7 @@

@@ -419,7 +419,7 @@

@@ -428,13 +428,28 @@

protected - Builder::OPTIONS + BuildOptions $options +

+ Tags + + +
+
+
+ see +
+
+ Builder::OPTIONS + + +
+
@@ -463,7 +478,7 @@

@@ -508,7 +523,7 @@

diff --git a/docs/api/classes/Cecil-Step-StepInterface.html b/docs/api/classes/Cecil-Step-StepInterface.html index 529879375..ae46aef77 100644 --- a/docs/api/classes/Cecil-Step-StepInterface.html +++ b/docs/api/classes/Cecil-Step-StepInterface.html @@ -153,7 +153,7 @@

@@ -166,6 +166,22 @@

+

+ Tags + + +
+
+
+ phpstan-import-type +
+
+ +

BuildOptions from Builder

+
+ +
+
@@ -255,7 +271,7 @@

@@ -300,7 +316,7 @@

@@ -339,7 +355,7 @@

@@ -378,7 +394,7 @@

@@ -387,7 +403,7 @@

public - init(Builder::OPTIONS $options) : void + init(BuildOptions $options) : void
@@ -397,7 +413,7 @@

Parameters
$options - : Builder::OPTIONS + : BuildOptions
@@ -405,6 +421,21 @@
Parameters
+
+ Tags + + +
+
+
+ see +
+
+ Builder::OPTIONS + + +
+
@@ -424,7 +455,7 @@

diff --git a/docs/api/classes/Cecil-Step-Taxonomies-Create.html b/docs/api/classes/Cecil-Step-Taxonomies-Create.html index 6c7263815..9efa76540 100644 --- a/docs/api/classes/Cecil-Step-Taxonomies-Create.html +++ b/docs/api/classes/Cecil-Step-Taxonomies-Create.html @@ -226,7 +226,7 @@

$options -  : Builder::OPTIONS +  : BuildOptions
Configuration options for the step.
@@ -331,7 +331,7 @@

@@ -369,7 +369,7 @@

@@ -407,7 +407,7 @@

@@ -445,7 +445,7 @@

@@ -454,13 +454,28 @@

protected - Builder::OPTIONS + BuildOptions $options +

+ Tags + + +
+
+
+ see +
+
+ Builder::OPTIONS + + +
+
@@ -527,7 +542,7 @@

@@ -572,7 +587,7 @@

diff --git a/src/Builder.php b/src/Builder.php index 2a1aab03e..7571905cb 100644 --- a/src/Builder.php +++ b/src/Builder.php @@ -51,8 +51,13 @@ class Builder implements LoggerAwareInterface * - 'dry-run': if true, generated files are not saved (default: false) * - 'page': if specified, only this page is processed (default: '') * - 'render-subset': limits the render step to a specific subset (default: '') - * @var array * @see \Cecil\Builder::build() + * @phpstan-type BuildOptions array{ + * drafts?: bool, + * dry-run?: bool, + * page?: string, + * render-subset?: string + * } */ public const OPTIONS = [ 'drafts' => false, @@ -66,6 +71,7 @@ class Builder implements LoggerAwareInterface * Each step is a class that implements the StepInterface. * @var array * @see \Cecil\Step\StepInterface + * @see \Cecil\Builder::build() */ public const STEPS = [ 'Cecil\Step\Pages\Load', @@ -111,9 +117,9 @@ class Builder implements LoggerAwareInterface /** * Build options. * These options can be passed to the build() method to customize the build process. - * @var array * @see \Cecil\Builder::OPTIONS * @see \Cecil\Builder::build() + * @var BuildOptions */ protected $options = []; /** @@ -243,8 +249,8 @@ public static function create(): self * This method processes the build steps in order, collects content, data, static files, * generates pages, renders them, and saves the output to the destination directory. * It also collects metrics about the build process, such as duration and memory usage. - * @param array $options * @see \Cecil\Builder::OPTIONS + * @param BuildOptions $options */ public function build(array $options): self { diff --git a/src/Step/AbstractStep.php b/src/Step/AbstractStep.php index 07555c624..7c0d22f97 100644 --- a/src/Step/AbstractStep.php +++ b/src/Step/AbstractStep.php @@ -23,6 +23,8 @@ * It implements the StepInterface and provides common functionality such as * initialization, checking if the step can be processed, and a constructor * that accepts a Builder instance. + * + * @phpstan-import-type BuildOptions from Builder */ abstract class AbstractStep implements StepInterface { @@ -34,7 +36,8 @@ abstract class AbstractStep implements StepInterface /** * Configuration options for the step. - * @var Builder::OPTIONS + * @see Builder::OPTIONS + * @var BuildOptions */ protected $options; diff --git a/src/Step/StepInterface.php b/src/Step/StepInterface.php index d42913142..ab06e6c28 100644 --- a/src/Step/StepInterface.php +++ b/src/Step/StepInterface.php @@ -21,6 +21,8 @@ * This interface defines the methods that any step in the build process must implement. * Steps are used to perform specific actions during the build process, such as generating * pages, processing data, or applying transformations. + * + * @phpstan-import-type BuildOptions from Builder */ interface StepInterface { @@ -37,7 +39,8 @@ public function getName(): string; /** * This method is called before the step is processed to initialize * the step with necessary options and to determine if it can be executed. - * @param Builder::OPTIONS $options + * @param BuildOptions $options + * @see Builder::OPTIONS */ public function init(array $options): void;