File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -22,13 +22,31 @@ public function __construct(
2222 private LoggerInterface $ logger ,
2323 ) {
2424 }
25-
25+
26+ public function runClass (): array {
27+ if (str_starts_with ($ limitClass , '\\' )) {
28+ $ limitClass = substr ($ limitClass , 1 );
29+ }
30+ return $ this ->run ($ limitClass );
31+ }
32+
33+ public function runCategory (): array {
34+ return $ this ->run ($ limitCategory );
35+ }
36+
2637 public function runAll (): array {
38+ return $ this ->run ();
39+ }
40+
41+ private function run (?string $ limit = null ): array {
2742 $ results = [];
2843 $ setupChecks = $ this ->coordinator ->getRegistrationContext ()->getSetupChecks ();
2944 foreach ($ setupChecks as $ setupCheck ) {
3045 /** @var ISetupCheck $setupCheckObject */
3146 $ setupCheckObject = Server::get ($ setupCheck ->getService ());
47+ if (isset ($ limit ) && $ limit !== $ setupCheckObject ->getCategory () && $ limit !== get_class ($ setupCheckObject )) {
48+ continue ;
49+ }
3250 $ this ->logger ->debug ('Running check ' . get_class ($ setupCheckObject ));
3351 try {
3452 $ setupResult = $ setupCheckObject ->run ();
You can’t perform that action at this time.
0 commit comments