| Total Complexity | 5 |
| Total Lines | 29 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 13 | final class Version20260102115400 extends AbstractMigrationChamilo |
||
| 14 | { |
||
| 15 | public function getDescription(): string |
||
| 16 | { |
||
| 17 | return 'Save SCIM token in .env file'; |
||
| 18 | } |
||
| 19 | |||
| 20 | public function up(Schema $schema): void |
||
| 21 | { |
||
| 22 | $envFilepath = $this->getEnvFilepath(); |
||
| 23 | |||
| 24 | $envFile = file_get_contents($envFilepath); |
||
| 25 | |||
| 26 | if ($token = ScimHelper::createToken()) { |
||
| 27 | $newEnvFile = str_replace('{{SCIM_TOKEN}}', $token, $envFile); |
||
| 28 | |||
| 29 | file_put_contents($envFilepath, $newEnvFile); |
||
| 30 | } |
||
| 31 | } |
||
| 32 | |||
| 33 | public function down(Schema $schema): void |
||
| 35 | } |
||
| 36 | |||
| 37 | private function getEnvFilepath(): string |
||
| 42 | } |
||
| 43 | } |
||
| 44 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.