Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
CRAP
100.00% covered (success)
100.00%
1 / 1
ProvideTranslationMethod
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
100.00% covered (success)
100.00%
1 / 1
 __construct
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
1<?php
2namespace Apie\Core\Attributes;
3
4use Apie\Common\Translator\ReadAttributeTranslationProvider;
5use Attribute;
6
7/**
8 * Adding a ProvideTranslationMethod attribute allows you to specify a static method to be used
9 * to create extra translations specifically for this domain object that could not be retrieved automatically.
10 *
11 * @see ApieMakeTranslationFileCommand
12 * @see ReadAttributeTranslationProvider
13 */
14#[Attribute(Attribute::IS_REPEATABLE|Attribute::TARGET_CLASS)]
15final class ProvideTranslationMethod
16{
17    public string $methodName;
18
19    public function __construct(string $methodName)
20    {
21        $this->methodName = $methodName;
22    }
23}