Completed
Push — develop ( 8bdaa2...ab8c4f )
by Alireza
01:51
created

Faker   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 40
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 40
rs 10
c 0
b 0
f 0
wmc 3
lcom 0
cbo 1

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getGeneratorInstance() 0 4 1
A __get() 0 4 1
A __callStatic() 0 4 1
1
<?php
2
3
namespace Josh\Faker;
4
5
/**
6
 * Faker object
7
 *
8
 * @author Alireza Josheghani <[email protected]>
9
 * @since 12 Dec 2016
10
 * @method static fullname()
11
 * @method static firstname()
12
 * @method static lastname()
13
 * @method static telephone()
14
 * @method static age($min = 16,$max = 70)
15
 * @method static email()
16
 * @method static domain()
17
 * @method static website()
18
 * @method static pageUrl()
19
 * @method static company()
20
 * @method static mobile()
21
 * @method static address()
22
 * @method static city()
23
 * @method static meliCode()
24
 */
25
class Faker
26
{
27
    /**
28
     * Get Generator instance
29
     *
30
     * @author Alireza Josheghani <[email protected]>
31
     * @since 4 Feb 2017
32
     * @return Generator
33
     */
34
    public function getGeneratorInstance()
35
    {
36
        return new Generator();
37
    }
38
39
    /**
40
     * Call method from magic method
41
     *
42
     * @author Alireza Josheghani <[email protected]>
43
     * @since 12 Dec 2016
44
     * @param $method
45
     * @return mixed
46
     */
47
    public function __get($method)
48
    {
49
        return static::getGeneratorInstance()->$method();
50
    }
51
52
    /**
53
     * @author Alireza Josheghani <[email protected]>
54
     * @since 3 Feb 2017
55
     * @param $method
56
     * @param $args
57
     * @return mixed
58
     */
59
    public static function __callStatic($method, $args)
60
    {
61
        return static::getGeneratorInstance()->$method(...$args);
62
    }
63
64
}
65