forked from nelmio/alice
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAliceProvider.php
42 lines (36 loc) · 889 Bytes
/
AliceProvider.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<?php
/*
* This file is part of the Alice package.
*
* (c) Nelmio <hello@nelm.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
declare(strict_types=1);
namespace Nelmio\Alice\Faker\Provider;
use Nelmio\Alice\FixtureInterface;
final class AliceProvider
{
/**
* Returns whatever is passed to it. This allows you among other things to use a PHP expression while still
* benefiting from variable replacement.
*
* @param mixed $expression
*
* @return mixed
*/
public static function identity($expression)
{
return $expression;
}
/**
* @param FixtureInterface $fixture
*
* @return string
*/
public static function current(FixtureInterface $fixture)
{
return $fixture->getValueForCurrent();
}
}