diff --git a/README.md b/README.md index 2bd887b..4c440ec 100644 --- a/README.md +++ b/README.md @@ -521,6 +521,8 @@ First, start off by creating a `generation.php` config file in the `config` dire ```php true, - // Call an optional callback to manipulate the icon - // with the pathname of the icon and the settings from above... - 'after' => static function (string $icon, array $config) { + // Call an optional callback to manipulate the icon with the pathname of the icon, + // the settings from above and the original icon file instance... + 'after' => static function (string $icon, array $config, SplFileInfo $file) { // ... }, ], diff --git a/src/Generation/IconGenerator.php b/src/Generation/IconGenerator.php index 97d6ed4..7c6eb71 100644 --- a/src/Generation/IconGenerator.php +++ b/src/Generation/IconGenerator.php @@ -40,7 +40,7 @@ public function generate(): void $this->filesystem->copy($file->getRealPath(), $pathname); if (is_callable($set['after'] ?? null)) { - $set['after']($pathname, $set); + $set['after']($pathname, $set, $file); } } }