HEX
Server: Apache
System: Linux webd011.cluster130.gra.hosting.ovh.net 5.15.167-ovh-vps-grsec-zfs-classid #1 SMP Tue Sep 17 08:14:20 UTC 2024 x86_64
User: ezpgggd (105871)
PHP: 7.4.33
Disabled: _dyuweyrj4,_dyuweyrj4r,dl
Upload Files
File: /home/ezpgggd/www/wp-content/plugins/sg-security/vendor/pragmarx/random/src/Faker.php
<?php

namespace PragmaRX\Random;

trait Faker
{
    protected $fakerClass = 'Faker\Factory';

    protected $faker;

    protected $fakerString;

    /**
     * Call faker.
     *
     * @param $name
     * @param $arguments
     * @return mixed
     * @throws \Exception
     */
    public function __call($name, $arguments)
    {
        try {
            $this->fakerString = $this->getFaker()->{$name}(...$arguments);
        } catch (\Error $e) {
            throw new \Exception('Faker is not installed. Call to undefined method PragmaRX\Random\Random::'.$name);
        }

        return $this;
    }

    /**
     * Instantiate and get Faker.
     *
     * @return \Faker\Generator|null
     */
    public function getFaker()
    {
        if (is_null($this->faker) && class_exists($this->fakerClass)) {
            $this->faker = call_user_func("$this->fakerClass::create");
        }

        return $this->faker;
    }

    /**
     * Set the faker class.
     *
     * @param $class
     * @return $this
     */
    public function fakerClass($class)
    {
        $this->fakerClass = $class;

        return $this;
    }
}