src/TranslatorSandbox/TranslateSandbox.php
Method sendEmail
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function sendEmail( User $sender, User $target, string $type ): void {
$emergencyContact = $this->options->get( 'EmergencyContact' );
$targetLang = $this->userOptionsManager->getOption( $target, 'language' );
Method deleteUser
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function deleteUser( User $user, string $force = '' ): void {
$uid = $user->getId();
$actorId = $user->getActorId();
if ( $force !== 'force' && !self::isSandboxed( $user ) ) {
Method addUser
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function addUser( string $name, string $email, string $password ): User {
$user = $this->userFactory->newFromName( $name, UserFactory::RIGOR_CREATABLE );
if ( !$user ) {
throw new InvalidArgumentException( 'Invalid user name' );
Method __construct
has 10 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
UserFactory $userFactory,
IConnectionProvider $dbProvider,
PermissionManager $permissionManager,
AuthManager $authManager,
UserGroupManager $userGroupManager,