From ac06ae3993ea27a251036877a0109d12b0fd930d Mon Sep 17 00:00:00 2001 From: Giuseppe Mazzapica Date: Thu, 29 Aug 2024 16:01:58 +0200 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Thorsten Frommen Signed-off-by: Giuseppe Mazzapica --- docs/Application-flow.md | 2 +- src/Package.php | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/Application-flow.md b/docs/Application-flow.md index c90ae7c..9f08671 100644 --- a/docs/Application-flow.md +++ b/docs/Application-flow.md @@ -14,7 +14,7 @@ The `Package` class implements the two phases above, respectively, in the two me ### Single-phase VS two-phases bootstrapping -It must be noted that **`Package::boot()`**, before proceeding with the "boot" phase, will execute the "build" phase if it hasn't been executed yet. In other words, it is not always necessary to explicitly call `Package::build()`, and many times calling `Package::build()` will suffice. +It must be noted that **`Package::boot()`**, before proceeding with the "boot" phase, will execute the "build" phase if it hasn't been executed yet. In other words, it is not always necessary to explicitly call `Package::build()`, and many times calling `Package::boot()` will suffice. The following two code snippets are equivalent: diff --git a/src/Package.php b/src/Package.php index c08395a..f0a6e21 100644 --- a/src/Package.php +++ b/src/Package.php @@ -152,6 +152,7 @@ class Package /** @deprecated */ public const STATUS_BOOTED = self::STATUS_DONE; + // Map of status to package-specific and global hook, both optional (i..e, null). private const STATUSES_ACTIONS_MAP = [ self::STATUS_INIT => [self::ACTION_INIT, self::ACTION_MODULARITY_INIT], self::STATUS_INITIALIZED => [self::ACTION_INITIALIZED, null],