Skip to content

Commit

Permalink
applied suggestions about phpdoc and style
Browse files Browse the repository at this point in the history
  • Loading branch information
Halleck45 committed Jan 20, 2025
1 parent ef28179 commit 2034498
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/TwigComponent/src/ComponentPropertiesExtractor.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

/**
* @author Jean-François Lépine <[email protected]>
*
*
* @experimental This class is not covered by the BC promise yet
*/
final class ComponentPropertiesExtractor
Expand All @@ -28,17 +28,19 @@ public function __construct(
}

/**
* Returns a list of properties from a Component.
* Returns a list of properties from a Component.
*
* Warning: We do not recommend using this method at runtime, as it is rather slow.
*
* @return array<string, array{display: string, name: string, type: string, default: mixed}>
*/
public function getComponentProperties(ComponentMetadata $metadata): array
{
if ($medata->isAnonymous()) {
return $this->getAnonymousComponentProperties($medata);
if ($metadata->isAnonymous()) {
return $this->getAnonymousComponentProperties($metadata);
}

return $this->getNonAnonymousComponentProperties($medata);
return $this->getNonAnonymousComponentProperties($metadata);
}

/**
Expand Down

0 comments on commit 2034498

Please sign in to comment.