File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -201,8 +201,7 @@ private function sendNotification(): void {
201201 }
202202 }
203203
204- private function repair (IOutput $ output ): void {
205- $ total = $ this ->getTotal ();
204+ private function repair (IOutput $ output , int $ total ): void {
206205 $ output ->startProgress ($ total );
207206
208207 $ shareCursor = $ this ->getShares ();
@@ -225,12 +224,13 @@ private function repair(IOutput $output): void {
225224 }
226225
227226 public function run (IOutput $ output ): void {
228- if ($ this ->shouldRun ()) {
229- $ output ->info ('Removing potentially over exposing link shares ' );
230- $ this ->repair ($ output );
231- $ output ->info ('Removed potentially over exposing link shares ' );
232- } else {
227+ if ($ this ->shouldRun () === false || ($ total = $ this ->getTotal ()) === 0 ) {
233228 $ output ->info ('No need to remove link shares. ' );
229+ return ;
234230 }
231+
232+ $ output ->info ('Removing potentially over exposing link shares ' );
233+ $ this ->repair ($ output , $ total );
234+ $ output ->info ('Removed potentially over exposing link shares ' );
235235 }
236236}
You can’t perform that action at this time.
0 commit comments