Subversion-Projekte lars-tiefland.laravel_shop

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
148 lars 1
<?php
2
 
3
namespace Faker\Provider;
4
 
5
class Medical extends Base
6
{
7
    protected static $bloodTypes = ['A', 'AB', 'B', 'O'];
8
 
9
    protected static $bloodRhFactors = ['+', '-'];
10
 
11
    /**
12
     * @example 'AB'
13
     */
14
    public static function bloodType(): string
15
    {
16
        return static::randomElement(static::$bloodTypes);
17
    }
18
 
19
    /**
20
     * @example '+'
21
     */
22
    public static function bloodRh(): string
23
    {
24
        return static::randomElement(static::$bloodRhFactors);
25
    }
26
 
27
    /**
28
     * @example 'AB+'
29
     */
30
    public function bloodGroup(): string
31
    {
32
        return $this->generator->parse('{{bloodType}}{{bloodRh}}');
33
    }
34
}