PluginProbe
Charitable – Donation & Fundraising Platform (Donation Forms, Recurring Donations & Fundraising Campaigns) / 1.8.13
Charitable – Donation & Fundraising Platform (Donation Forms, Recurring Donations & Fundraising Campaigns) v1.8.13
1.8.13.1 1.8.13 1.8.12.3 1.8.12.2 1.8.12.1 1.8.12 1.8.11.3 1.8.11.2 1.8.11.1 1.8.11 1.6.6 1.6.60 1.6.7 1.6.8 1.6.9 1.7.0 1.7.0.1 1.7.0.11 1.7.0.12 1.7.0.14 1.7.0.2 1.7.0.3 1.7.0.5 1.7.0.6 1.7.0.7 All 212 releases
charitable / vendor / square / square / src / Legacy / Models / Builders / RangeBuilder.php

RangeBuilder.php in Charitable – Donation & Fundraising Platform (Donation Forms, Recurring Donations & Fundraising Campaigns) 1.8.13, at vendor/square/square/src/Legacy/Models/Builders/RangeBuilder.php

83 lines 1.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 declare(strict_types=1);
4
5 namespace Square\Legacy\Models\Builders;
6
7 use Core\Utils\CoreHelper;
8 use Square\Legacy\Models\Range;
9
10 /**
11 * Builder for model Range
12 *
13 * @see Range
14 */
15 class RangeBuilder
16 {
17 /**
18 * @var Range
19 */
20 private $instance;
21
22 private function __construct(Range $instance)
23 {
24 $this->instance = $instance;
25 }
26
27 /**
28 * Initializes a new Range Builder object.
29 */
30 public static function init(): self
31 {
32 return new self(new Range());
33 }
34
35 /**
36 * Sets min field.
37 *
38 * @param string|null $value
39 */
40 public function min(?string $value): self
41 {
42 $this->instance->setMin($value);
43 return $this;
44 }
45
46 /**
47 * Unsets min field.
48 */
49 public function unsetMin(): self
50 {
51 $this->instance->unsetMin();
52 return $this;
53 }
54
55 /**
56 * Sets max field.
57 *
58 * @param string|null $value
59 */
60 public function max(?string $value): self
61 {
62 $this->instance->setMax($value);
63 return $this;
64 }
65
66 /**
67 * Unsets max field.
68 */
69 public function unsetMax(): self
70 {
71 $this->instance->unsetMax();
72 return $this;
73 }
74
75 /**
76 * Initializes a new Range object.
77 */
78 public function build(): Range
79 {
80 return CoreHelper::clone($this->instance);
81 }
82 }
83