1: | <?php declare(strict_types=1); |
2: | |
3: | namespace Salient\Core\Concern; |
4: | |
5: | use Salient\Contract\Core\Entity\Normalisable; |
6: | use Salient\Utility\Str; |
7: | |
8: | /** |
9: | * @api |
10: | * |
11: | * @phpstan-require-implements Normalisable |
12: | */ |
13: | trait NormalisableTrait |
14: | { |
15: | /** |
16: | * @inheritDoc |
17: | */ |
18: | public static function normaliseProperty( |
19: | string $name, |
20: | bool $fromData = true, |
21: | string ...$declaredName |
22: | ): string { |
23: | return Str::snake($name); |
24: | } |
25: | } |
26: |