fix: DockerSecretsResolver - don't normalize absolute paths like /var/www/html/...
Some checks failed
Deploy Application / deploy (push) Has been cancelled
Some checks failed
Deploy Application / deploy (push) Has been cancelled
This commit is contained in:
31
src/Framework/View/ValueObjects/DataAttributeHelper.php
Normal file
31
src/Framework/View/ValueObjects/DataAttributeHelper.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Framework\View\ValueObjects;
|
||||
|
||||
/**
|
||||
* Helper functions for working with data attributes
|
||||
*
|
||||
* Provides convenience methods for converting data attribute enums to strings
|
||||
* and working with both string and enum attribute names.
|
||||
*/
|
||||
final readonly class DataAttributeHelper
|
||||
{
|
||||
/**
|
||||
* Convert attribute name to string
|
||||
*
|
||||
* Accepts both string and DataAttributeInterface for convenience.
|
||||
* This allows methods to accept either format without requiring ->value() calls.
|
||||
*
|
||||
* @param string|DataAttributeInterface $attribute
|
||||
* @return string
|
||||
*/
|
||||
public static function toString(string|DataAttributeInterface $attribute): string
|
||||
{
|
||||
return $attribute instanceof DataAttributeInterface
|
||||
? $attribute->value()
|
||||
: $attribute;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user