| Conditions | 4 |
| Paths | 2 |
| Total Lines | 16 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 20 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 24 | public function run($id) |
||
| 25 | { |
||
| 26 | $controller = $this->controller; |
||
| 27 | $client = $this->findByIdOrIdentifier($id); |
||
| 28 | |||
| 29 | $this->editClient($client); |
||
| 30 | $clientScopes = $client->getClientScopes()->with('scope')->all(); |
||
| 31 | $scopes = implode(' ', ArrayHelper::getColumn($clientScopes, 'scope.identifier')); |
||
| 32 | |||
| 33 | if ($controller->interactive || $controller->verbose) { |
||
| 34 | $controller->stdout('Successfully updated client with id "' . $client->getPrimaryKey() |
||
| 35 | . '", identifier "' . $client->getIdentifier() |
||
| 36 | . '"' . ($scopes ? (' and scopes "' . $scopes . '"') : '') . '.' . PHP_EOL, Console::FG_GREEN); |
||
| 37 | } |
||
| 38 | |||
| 39 | return ExitCode::OK; |
||
| 40 | } |
||
| 42 |