generated from spatie/package-skeleton-laravel
-
Notifications
You must be signed in to change notification settings - Fork 138
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added ability to change after class definition created (#401)
- Loading branch information
1 parent
44014e3
commit 060fd63
Showing
5 changed files
with
50 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
src/Infer/Extensions/AfterClassDefinitionCreatedExtension.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?php | ||
|
||
namespace Dedoc\Scramble\Infer\Extensions; | ||
|
||
use Dedoc\Scramble\Infer\Extensions\Event\ClassDefinitionCreatedEvent; | ||
|
||
interface AfterClassDefinitionCreatedExtension extends InferExtension | ||
{ | ||
public function shouldHandle(string $name): bool; | ||
|
||
public function afterClassDefinitionCreated(ClassDefinitionCreatedEvent $event); | ||
} |
14 changes: 14 additions & 0 deletions
14
src/Infer/Extensions/Event/ClassDefinitionCreatedEvent.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?php | ||
|
||
namespace Dedoc\Scramble\Infer\Extensions\Event; | ||
|
||
use Dedoc\Scramble\Infer\Definition\ClassDefinition; | ||
|
||
class ClassDefinitionCreatedEvent | ||
{ | ||
public function __construct( | ||
public readonly string $name, | ||
public readonly ClassDefinition $classDefinition, | ||
) { | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters