PhpGitHooks\Module\Configuration\Tests\Stub\RegularExpressionStub::random PHP Method

random() public static method

public static random ( ) : PhpGitHooks\Module\Configuration\Domain\RegularExpression
return PhpGitHooks\Module\Configuration\Domain\RegularExpression
    public static function random()
    {
        $expression = [null, StubCreator::faker()->word];
        return self::create($expression[array_rand($expression)]);
    }

Usage Example

Esempio n. 1
0
 /**
  * @return CommitMsg
  */
 public static function random()
 {
     return self::create(new Undefined(false), EnabledStub::random(), RegularExpressionStub::random());
 }
RegularExpressionStub