Skip to content

Commit 06022cc

Browse files
committed
when is no longer in the trait and interface
1 parent 19e3f99 commit 06022cc

File tree

4 files changed

+20
-33
lines changed

4 files changed

+20
-33
lines changed

config/verify.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@
1414
ValidateSupporter::class => 'ef1a42701af6dc36e052556a0ee1c762394f9428',
1515
ValidatePro::class => '482b48f1a026684b6c1754e45ca180ffc52483ff',
1616
ValidateSignature::class => '5a8a855d4b59c44c298daa66801c79f2aba20492',
17-
Verify::class => '421e83a049b1df58c73b546adb132a082075fd2c',
17+
Verify::class => '4b8d56f2b19fc88546cc2effb23673fa3993b2b9',
1818
VerifySupporterStatus::class => '6358c45ed0414c1e2697e0881238659fa6221bed',
1919
VerifyProStatus::class => '212e6ada794587ee8e2b81cf76e243d134a7e823',
2020
VerifyServiceProvider::class => '923b63b15d25e69b95ed1d5ec1c82ba57f1a7d74',
21-
VerifyTrait::class => '2a2543fb702b95fe0d4cc78319bef6906a41f093',
21+
VerifyTrait::class => 'aa1536689e09b43ed762a99a80fa04502cfe0d68',
2222
],
2323
];

src/Contract/VerifyInterface.php

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -40,17 +40,4 @@ public function is_pro(): bool;
4040
* @return bool
4141
*/
4242
public function is_signature(): bool;
43-
44-
/**
45-
* Fork depending whether the installation is verified or not.
46-
*
47-
* @template T
48-
*
49-
* @param T|\Closure(): T $valIfTrue what happens or Value if we features are enabled
50-
* @param T|\Closure(): T $valIfFalse what happens or Value if we features are disabled
51-
* @param Status $required_status
52-
*
53-
* @return T
54-
*/
55-
public function when(mixed $valIfTrue, mixed $valIfFalse, Status $required_status = Status::SUPPORTER_EDITION): mixed;
5643
}

src/Verify.php

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,4 +127,22 @@ public function authorize(Status $required_status = Status::SUPPORTER_EDITION):
127127
throw new SupporterOnlyOperationException($required_status);
128128
}
129129
}
130+
131+
/**
132+
* Fork depending whether the installation is verified or not.
133+
*
134+
* @template T
135+
*
136+
* @param T|\Closure(): T $valIfTrue what happens or Value if we features are enabled
137+
* @param T|\Closure(): T $valIfFalse what happens or Value if we features are disabled
138+
* @param Status $required_status
139+
*
140+
* @return T
141+
*/
142+
public function when(mixed $valIfTrue, mixed $valIfFalse, Status $required_status = Status::SUPPORTER_EDITION): mixed
143+
{
144+
$retValue = $this->check($required_status) ? $valIfTrue : $valIfFalse;
145+
146+
return is_callable($retValue) ? $retValue() : $retValue;
147+
}
130148
}

src/VerifyTrait.php

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -60,22 +60,4 @@ public function is_signature(): bool
6060
{
6161
return $this->check(Status::SIGNATURE_EDITION);
6262
}
63-
64-
/**
65-
* Fork depending whether the installation is verified or not.
66-
*
67-
* @template T
68-
*
69-
* @param T|\Closure(): T $valIfTrue what happens or Value if we features are enabled
70-
* @param T|\Closure(): T $valIfFalse what happens or Value if we features are disabled
71-
* @param Status $required_status
72-
*
73-
* @return T
74-
*/
75-
public function when(mixed $valIfTrue, mixed $valIfFalse, Status $required_status = Status::SUPPORTER_EDITION): mixed
76-
{
77-
$retValue = $this->check($required_status) ? $valIfTrue : $valIfFalse;
78-
79-
return is_callable($retValue) ? $retValue() : $retValue;
80-
}
8163
}

0 commit comments

Comments
 (0)