Skip to content

Commit

Permalink
Use proper class-string, inheritance, and standardize phpdoc inheri…
Browse files Browse the repository at this point in the history
…tance
  • Loading branch information
lcharette committed Jan 21, 2024
1 parent d39955d commit 0fbf825
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 9 deletions.
27 changes: 21 additions & 6 deletions app/src/Core.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ class Core implements
BakeryRecipe
{
/**
* Return the Sprinkle name.
*
* {@inheritdoc}
*/
public function getName(): string
Expand All @@ -105,6 +107,8 @@ public function getName(): string
}

/**
* Return the Sprinkle dir path.
*
* {@inheritdoc}
*/
public function getPath(): string
Expand All @@ -113,6 +117,8 @@ public function getPath(): string
}

/**
* Return an array of all registered Bakery Commands.
*
* {@inheritdoc}
*
* @codeCoverageIgnore
Expand Down Expand Up @@ -153,6 +159,8 @@ public function getBakeryCommands(): array
}

/**
* Return dependent sprinkles.
*
* {@inheritdoc}
*/
public function getSprinkles(): array
Expand All @@ -163,7 +171,7 @@ public function getSprinkles(): array
/**
* Returns a list of routes definition in PHP files.
*
* @return string[]
* {@inheritDoc}
*/
public function getRoutes(): array
{
Expand All @@ -173,9 +181,9 @@ public function getRoutes(): array
}

/**
* Returns a list of all PHP-DI services/container definitions files.
* Returns a list of all PHP-DI services/container definitions class.
*
* @return string[]
* {@inheritDoc}
*/
public function getServices(): array
{
Expand Down Expand Up @@ -203,7 +211,7 @@ public function getServices(): array
/**
* Returns a list of all Middlewares classes.
*
* @return \Psr\Http\Server\MiddlewareInterface[]
* {@inheritDoc}
*/
public function getMiddlewares(): array
{
Expand All @@ -220,7 +228,7 @@ public function getMiddlewares(): array
/**
* Return an array of all registered Twig Extensions.
*
* @return \Twig\Extension\ExtensionInterface[]
* {@inheritDoc}
*/
public function getTwigExtensions(): array
{
Expand All @@ -235,6 +243,11 @@ public function getTwigExtensions(): array
];
}

/**
* Return an array of all registered Migrations.
*
* {@inheritDoc}
*/
public function getMigrations(): array
{
return [
Expand All @@ -244,7 +257,9 @@ public function getMigrations(): array
}

/**
* {@inheritDoc}
* Return a map of all registered event listener.
*
* {@inheritdoc}
*/
public function getEventListeners(): array
{
Expand Down
2 changes: 1 addition & 1 deletion app/src/Sprinkle/Recipe/MigrationRecipe.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ interface MigrationRecipe
/**
* Return an array of all registered Migrations.
*
* @return string[]
* @return class-string<\UserFrosting\Sprinkle\Core\Database\MigrationInterface>[]
*/
public function getMigrations(): array;
}
2 changes: 1 addition & 1 deletion app/src/Sprinkle/Recipe/SeedRecipe.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ interface SeedRecipe
/**
* Return an array of all registered seeds.
*
* @return string[]
* @return class-string<\UserFrosting\Sprinkle\Core\Seeder\SeedInterface>[]
*/
public function getSeeds(): array;
}
2 changes: 1 addition & 1 deletion app/src/Sprinkle/Recipe/TwigExtensionRecipe.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ interface TwigExtensionRecipe
/**
* Return an array of all registered Twig Extensions.
*
* @return string[]
* @return class-string<\Twig\Extension\ExtensionInterface>[]
*/
public function getTwigExtensions(): array;
}

0 comments on commit 0fbf825

Please sign in to comment.