File tree Expand file tree Collapse file tree 4 files changed +20
-33
lines changed
Expand file tree Collapse file tree 4 files changed +20
-33
lines changed Original file line number Diff line number Diff line change 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];
Original file line number Diff line number Diff 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}
Original file line number Diff line number Diff 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}
Original file line number Diff line number Diff 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}
You can’t perform that action at this time.
0 commit comments