Skip to content

Commit 530b01f

Browse files
author
Bernhard Schmitt
committed
Add ComponentVariant traits
1 parent 3adf1d2 commit 530b01f

2 files changed

Lines changed: 56 additions & 0 deletions

File tree

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<?php
2+
3+
/*
4+
* This file is part of the PackageFactory.AtomicFusion.PresentationObjects package
5+
*/
6+
7+
declare(strict_types=1);
8+
9+
namespace PackageFactory\AtomicFusion\PresentationObjects\Fusion;
10+
11+
/**
12+
* A trait for int component variants for use in EEL
13+
*/
14+
trait IntComponentVariant
15+
{
16+
public function equals(int $other): bool
17+
{
18+
return $this === self::from($other);
19+
}
20+
21+
/**
22+
* @param string $methodName
23+
*/
24+
public function allowsCallOfMethod($methodName): bool
25+
{
26+
return true;
27+
}
28+
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<?php
2+
3+
/*
4+
* This file is part of the PackageFactory.AtomicFusion.PresentationObjects package
5+
*/
6+
7+
declare(strict_types=1);
8+
9+
namespace PackageFactory\AtomicFusion\PresentationObjects\Fusion;
10+
11+
/**
12+
* A trait for string component variants for use in EEL
13+
*/
14+
trait StringComponentVariant
15+
{
16+
public function equals(string $other): bool
17+
{
18+
return $this === self::from($other);
19+
}
20+
21+
/**
22+
* @param string $methodName
23+
*/
24+
public function allowsCallOfMethod($methodName): bool
25+
{
26+
return true;
27+
}
28+
}

0 commit comments

Comments
 (0)