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: | * Implements Normalisable |
10: | * |
11: | * @see Normalisable |
12: | * |
13: | * @phpstan-require-implements Normalisable |
14: | */ |
15: | trait HasNormaliser |
16: | { |
17: | /** |
18: | * @inheritDoc |
19: | */ |
20: | public static function normaliseProperty( |
21: | string $name, |
22: | bool $greedy = true, |
23: | string ...$hints |
24: | ): string { |
25: | return Str::snake($name); |
26: | } |
27: | } |
28: |