Calculator
2 years ago
Container
2 years ago
Core
2 years ago
Extension
2 years ago
Guesser
2 years ago
ORM
2 years ago
Provider
2 years ago
ChanceGenerator.php
2 years ago
DefaultGenerator.php
2 years ago
Documentor.php
2 years ago
Factory.php
2 years ago
Generator.php
2 years ago
UniqueGenerator.php
2 years ago
ValidGenerator.php
2 years ago
DefaultGenerator.php
56 lines
| 1 | <?php |
| 2 | /** |
| 3 | * @license MIT |
| 4 | * |
| 5 | * Modified by impress-org on 30-October-2023 using Strauss. |
| 6 | * @see https://github.com/BrianHenryIE/strauss |
| 7 | */ |
| 8 | |
| 9 | namespace Give\Vendors\Faker; |
| 10 | |
| 11 | /** |
| 12 | * This generator returns a default value for all called properties |
| 13 | * and methods. |
| 14 | * |
| 15 | * @mixin Generator |
| 16 | * |
| 17 | * @deprecated Use ChanceGenerator instead |
| 18 | */ |
| 19 | class DefaultGenerator |
| 20 | { |
| 21 | protected $default; |
| 22 | |
| 23 | public function __construct($default = null) |
| 24 | { |
| 25 | trigger_deprecation('fakerphp/faker', '1.16', 'Class "%s" is deprecated, use "%s" instead.', __CLASS__, ChanceGenerator::class); |
| 26 | |
| 27 | $this->default = $default; |
| 28 | } |
| 29 | |
| 30 | public function ext() |
| 31 | { |
| 32 | return $this; |
| 33 | } |
| 34 | |
| 35 | /** |
| 36 | * @param string $attribute |
| 37 | * |
| 38 | * @deprecated Use a method instead. |
| 39 | */ |
| 40 | public function __get($attribute) |
| 41 | { |
| 42 | trigger_deprecation('fakerphp/faker', '1.14', 'Accessing property "%s" is deprecated, use "%s()" instead.', $attribute, $attribute); |
| 43 | |
| 44 | return $this->default; |
| 45 | } |
| 46 | |
| 47 | /** |
| 48 | * @param string $method |
| 49 | * @param array $attributes |
| 50 | */ |
| 51 | public function __call($method, $attributes) |
| 52 | { |
| 53 | return $this->default; |
| 54 | } |
| 55 | } |
| 56 |