Passed
Push — master ( 7b8289...9c209a )
by Christoph
12:20 queued 36s
created
lib/public/AppFramework/Http/ZipResponse.php 1 patch
Indentation   +43 added lines, -43 removed lines patch added patch discarded remove patch
@@ -34,56 +34,56 @@
 block discarded – undo
34 34
  * @since 15.0.0
35 35
  */
36 36
 class ZipResponse extends Response implements ICallbackResponse {
37
-	/** @var resource[] Files to be added to the zip response */
38
-	private $resources;
39
-	/** @var string Filename that the zip file should have */
40
-	private $name;
41
-	private $request;
37
+    /** @var resource[] Files to be added to the zip response */
38
+    private $resources;
39
+    /** @var string Filename that the zip file should have */
40
+    private $name;
41
+    private $request;
42 42
 
43
-	/**
44
-	 * @since 15.0.0
45
-	 */
46
-	public function __construct(IRequest $request, string $name = 'output') {
47
-		parent::__construct();
43
+    /**
44
+     * @since 15.0.0
45
+     */
46
+    public function __construct(IRequest $request, string $name = 'output') {
47
+        parent::__construct();
48 48
 
49
-		$this->name = $name;
50
-		$this->request = $request;
51
-	}
49
+        $this->name = $name;
50
+        $this->request = $request;
51
+    }
52 52
 
53
-	/**
54
-	 * @since 15.0.0
55
-	 */
56
-	public function addResource($r, string $internalName, int $size, int $time = -1) {
57
-		if (!\is_resource($r)) {
58
-			throw new \InvalidArgumentException('No resource provided');
59
-		}
53
+    /**
54
+     * @since 15.0.0
55
+     */
56
+    public function addResource($r, string $internalName, int $size, int $time = -1) {
57
+        if (!\is_resource($r)) {
58
+            throw new \InvalidArgumentException('No resource provided');
59
+        }
60 60
 
61
-		$this->resources[] = [
62
-			'resource' => $r,
63
-			'internalName' => $internalName,
64
-			'size' => $size,
65
-			'time' => $time,
66
-		];
67
-	}
61
+        $this->resources[] = [
62
+            'resource' => $r,
63
+            'internalName' => $internalName,
64
+            'size' => $size,
65
+            'time' => $time,
66
+        ];
67
+    }
68 68
 
69
-	/**
70
-	 * @since 15.0.0
71
-	 */
72
-	public function callback(IOutput $output) {
73
-		$size = 0;
74
-		$files = count($this->resources);
69
+    /**
70
+     * @since 15.0.0
71
+     */
72
+    public function callback(IOutput $output) {
73
+        $size = 0;
74
+        $files = count($this->resources);
75 75
 
76
-		foreach ($this->resources as $resource) {
77
-			$size += $resource['size'];
78
-		}
76
+        foreach ($this->resources as $resource) {
77
+            $size += $resource['size'];
78
+        }
79 79
 
80
-		$zip = new Streamer($this->request, $size, $files);
81
-		$zip->sendHeaders($this->name);
80
+        $zip = new Streamer($this->request, $size, $files);
81
+        $zip->sendHeaders($this->name);
82 82
 
83
-		foreach ($this->resources as $resource) {
84
-			$zip->addFileFromStream($resource['resource'], $resource['internalName'], $resource['size'], $resource['time']);
85
-		}
83
+        foreach ($this->resources as $resource) {
84
+            $zip->addFileFromStream($resource['resource'], $resource['internalName'], $resource['size'], $resource['time']);
85
+        }
86 86
 
87
-		$zip->finalize();
88
-	}
87
+        $zip->finalize();
88
+    }
89 89
 }
Please login to merge, or discard this patch.
lib/public/AppFramework/Http/FileDisplayResponse.php 1 patch
Indentation   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -32,40 +32,40 @@
 block discarded – undo
32 32
  */
33 33
 class FileDisplayResponse extends Response implements ICallbackResponse {
34 34
 
35
-	/** @var \OCP\Files\File|\OCP\Files\SimpleFS\ISimpleFile */
36
-	private $file;
35
+    /** @var \OCP\Files\File|\OCP\Files\SimpleFS\ISimpleFile */
36
+    private $file;
37 37
 
38
-	/**
39
-	 * FileDisplayResponse constructor.
40
-	 *
41
-	 * @param \OCP\Files\File|\OCP\Files\SimpleFS\ISimpleFile $file
42
-	 * @param int $statusCode
43
-	 * @param array $headers
44
-	 * @since 11.0.0
45
-	 */
46
-	public function __construct($file, $statusCode=Http::STATUS_OK,
47
-								$headers=[]) {
48
-		parent::__construct();
38
+    /**
39
+     * FileDisplayResponse constructor.
40
+     *
41
+     * @param \OCP\Files\File|\OCP\Files\SimpleFS\ISimpleFile $file
42
+     * @param int $statusCode
43
+     * @param array $headers
44
+     * @since 11.0.0
45
+     */
46
+    public function __construct($file, $statusCode=Http::STATUS_OK,
47
+                                $headers=[]) {
48
+        parent::__construct();
49 49
 
50
-		$this->file = $file;
51
-		$this->setStatus($statusCode);
52
-		$this->setHeaders(array_merge($this->getHeaders(), $headers));
53
-		$this->addHeader('Content-Disposition', 'inline; filename="' . rawurldecode($file->getName()) . '"');
50
+        $this->file = $file;
51
+        $this->setStatus($statusCode);
52
+        $this->setHeaders(array_merge($this->getHeaders(), $headers));
53
+        $this->addHeader('Content-Disposition', 'inline; filename="' . rawurldecode($file->getName()) . '"');
54 54
 
55
-		$this->setETag($file->getEtag());
56
-		$lastModified = new \DateTime();
57
-		$lastModified->setTimestamp($file->getMTime());
58
-		$this->setLastModified($lastModified);
59
-	}
55
+        $this->setETag($file->getEtag());
56
+        $lastModified = new \DateTime();
57
+        $lastModified->setTimestamp($file->getMTime());
58
+        $this->setLastModified($lastModified);
59
+    }
60 60
 
61
-	/**
62
-	 * @param IOutput $output
63
-	 * @since 11.0.0
64
-	 */
65
-	public function callback(IOutput $output) {
66
-		if ($output->getHttpResponseCode() !== Http::STATUS_NOT_MODIFIED) {
67
-			$output->setHeader('Content-Length: ' . $this->file->getSize());
68
-			$output->setOutput($this->file->getContent());
69
-		}
70
-	}
61
+    /**
62
+     * @param IOutput $output
63
+     * @since 11.0.0
64
+     */
65
+    public function callback(IOutput $output) {
66
+        if ($output->getHttpResponseCode() !== Http::STATUS_NOT_MODIFIED) {
67
+            $output->setHeader('Content-Length: ' . $this->file->getSize());
68
+            $output->setOutput($this->file->getContent());
69
+        }
70
+    }
71 71
 }
Please login to merge, or discard this patch.
apps/oauth2/lib/Db/AccessToken.php 1 patch
Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -34,20 +34,20 @@
 block discarded – undo
34 34
  * @method void setHashedCode(string $token)
35 35
  */
36 36
 class AccessToken extends Entity {
37
-	/** @var int */
38
-	protected $tokenId;
39
-	/** @var int */
40
-	protected $clientId;
41
-	/** @var string */
42
-	protected $hashedCode;
43
-	/** @var string */
44
-	protected $encryptedToken;
37
+    /** @var int */
38
+    protected $tokenId;
39
+    /** @var int */
40
+    protected $clientId;
41
+    /** @var string */
42
+    protected $hashedCode;
43
+    /** @var string */
44
+    protected $encryptedToken;
45 45
 
46
-	public function __construct() {
47
-		$this->addType('id', 'int');
48
-		$this->addType('tokenId', 'int');
49
-		$this->addType('clientId', 'int');
50
-		$this->addType('hashedCode', 'string');
51
-		$this->addType('encryptedToken', 'string');
52
-	}
46
+    public function __construct() {
47
+        $this->addType('id', 'int');
48
+        $this->addType('tokenId', 'int');
49
+        $this->addType('clientId', 'int');
50
+        $this->addType('hashedCode', 'string');
51
+        $this->addType('encryptedToken', 'string');
52
+    }
53 53
 }
Please login to merge, or discard this patch.
lib/private/Authentication/Login/ClearLostPasswordTokensCommand.php 1 patch
Indentation   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -29,24 +29,24 @@
 block discarded – undo
29 29
 
30 30
 class ClearLostPasswordTokensCommand extends ALoginCommand {
31 31
 
32
-	/** @var IConfig */
33
-	private $config;
34
-
35
-	public function __construct(IConfig $config) {
36
-		$this->config = $config;
37
-	}
38
-
39
-	/**
40
-	 * User has successfully logged in, now remove the password reset link, when it is available
41
-	 */
42
-	public function process(LoginData $loginData): LoginResult {
43
-		$this->config->deleteUserValue(
44
-			$loginData->getUser()->getUID(),
45
-			'core',
46
-			'lostpassword'
47
-		);
48
-
49
-		return $this->processNextOrFinishSuccessfully($loginData);
50
-	}
32
+    /** @var IConfig */
33
+    private $config;
34
+
35
+    public function __construct(IConfig $config) {
36
+        $this->config = $config;
37
+    }
38
+
39
+    /**
40
+     * User has successfully logged in, now remove the password reset link, when it is available
41
+     */
42
+    public function process(LoginData $loginData): LoginResult {
43
+        $this->config->deleteUserValue(
44
+            $loginData->getUser()->getUID(),
45
+            'core',
46
+            'lostpassword'
47
+        );
48
+
49
+        return $this->processNextOrFinishSuccessfully($loginData);
50
+    }
51 51
 
52 52
 }
Please login to merge, or discard this patch.
lib/private/Authentication/Login/UidLoginCommand.php 1 patch
Indentation   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -30,28 +30,28 @@
 block discarded – undo
30 30
 
31 31
 class UidLoginCommand extends ALoginCommand {
32 32
 
33
-	/** @var Manager */
34
-	private $userManager;
35
-
36
-	public function __construct(Manager $userManager) {
37
-		$this->userManager = $userManager;
38
-	}
39
-
40
-	/**
41
-	 * @param LoginData $loginData
42
-	 *
43
-	 * @return LoginResult
44
-	 */
45
-	public function process(LoginData $loginData): LoginResult {
46
-		/* @var $loginResult IUser */
47
-		$user = $this->userManager->checkPasswordNoLogging(
48
-			$loginData->getUsername(),
49
-			$loginData->getPassword()
50
-		);
51
-
52
-		$loginData->setUser($user);
53
-
54
-		return $this->processNextOrFinishSuccessfully($loginData);
55
-	}
33
+    /** @var Manager */
34
+    private $userManager;
35
+
36
+    public function __construct(Manager $userManager) {
37
+        $this->userManager = $userManager;
38
+    }
39
+
40
+    /**
41
+     * @param LoginData $loginData
42
+     *
43
+     * @return LoginResult
44
+     */
45
+    public function process(LoginData $loginData): LoginResult {
46
+        /* @var $loginResult IUser */
47
+        $user = $this->userManager->checkPasswordNoLogging(
48
+            $loginData->getUsername(),
49
+            $loginData->getPassword()
50
+        );
51
+
52
+        $loginData->setUser($user);
53
+
54
+        return $this->processNextOrFinishSuccessfully($loginData);
55
+    }
56 56
 
57 57
 }
Please login to merge, or discard this patch.
lib/private/Authentication/Login/UpdateLastPasswordConfirmCommand.php 1 patch
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -29,20 +29,20 @@
 block discarded – undo
29 29
 
30 30
 class UpdateLastPasswordConfirmCommand extends ALoginCommand {
31 31
 
32
-	/** @var ISession */
33
-	private $session;
32
+    /** @var ISession */
33
+    private $session;
34 34
 
35
-	public function __construct(ISession $session) {
36
-		$this->session = $session;
37
-	}
35
+    public function __construct(ISession $session) {
36
+        $this->session = $session;
37
+    }
38 38
 
39
-	public function process(LoginData $loginData): LoginResult {
40
-		$this->session->set(
41
-			'last-password-confirm',
42
-			$loginData->getUser()->getLastLogin()
43
-		);
39
+    public function process(LoginData $loginData): LoginResult {
40
+        $this->session->set(
41
+            'last-password-confirm',
42
+            $loginData->getUser()->getLastLogin()
43
+        );
44 44
 
45
-		return $this->processNextOrFinishSuccessfully($loginData);
46
-	}
45
+        return $this->processNextOrFinishSuccessfully($loginData);
46
+    }
47 47
 
48 48
 }
Please login to merge, or discard this patch.
lib/private/Authentication/Login/CompleteLoginCommand.php 1 patch
Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -28,23 +28,23 @@
 block discarded – undo
28 28
 
29 29
 class CompleteLoginCommand extends ALoginCommand {
30 30
 
31
-	/** @var Session */
32
-	private $userSession;
33
-
34
-	public function __construct(Session $userSession) {
35
-		$this->userSession = $userSession;
36
-	}
37
-
38
-	public function process(LoginData $loginData): LoginResult {
39
-		$this->userSession->completeLogin(
40
-			$loginData->getUser(),
41
-			[
42
-				'loginName' => $loginData->getUsername(),
43
-				'password' => $loginData->getPassword(),
44
-			]
45
-		);
46
-
47
-		return $this->processNextOrFinishSuccessfully($loginData);
48
-	}
31
+    /** @var Session */
32
+    private $userSession;
33
+
34
+    public function __construct(Session $userSession) {
35
+        $this->userSession = $userSession;
36
+    }
37
+
38
+    public function process(LoginData $loginData): LoginResult {
39
+        $this->userSession->completeLogin(
40
+            $loginData->getUser(),
41
+            [
42
+                'loginName' => $loginData->getUsername(),
43
+                'password' => $loginData->getPassword(),
44
+            ]
45
+        );
46
+
47
+        return $this->processNextOrFinishSuccessfully($loginData);
48
+    }
49 49
 
50 50
 }
Please login to merge, or discard this patch.
lib/private/Authentication/Login/EmailLoginCommand.php 1 patch
Indentation   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -29,33 +29,33 @@
 block discarded – undo
29 29
 
30 30
 class EmailLoginCommand extends ALoginCommand {
31 31
 
32
-	/** @var IUserManager */
33
-	private $userManager;
34
-
35
-	public function __construct(IUserManager $userManager) {
36
-		$this->userManager = $userManager;
37
-	}
38
-
39
-	public function process(LoginData $loginData): LoginResult {
40
-		if ($loginData->getUser() === false) {
41
-			$users = $this->userManager->getByEmail($loginData->getUsername());
42
-			// we only allow login by email if unique
43
-			if (count($users) === 1) {
44
-				$username = $users[0]->getUID();
45
-				if ($username !== $loginData->getUsername()) {
46
-					$user = $this->userManager->checkPassword(
47
-						$username,
48
-						$loginData->getPassword()
49
-					);
50
-					if ($user !== false) {
51
-						$loginData->setUser($user);
52
-						$loginData->setUsername($username);
53
-					}
54
-				}
55
-			}
56
-		}
57
-
58
-		return $this->processNextOrFinishSuccessfully($loginData);
59
-	}
32
+    /** @var IUserManager */
33
+    private $userManager;
34
+
35
+    public function __construct(IUserManager $userManager) {
36
+        $this->userManager = $userManager;
37
+    }
38
+
39
+    public function process(LoginData $loginData): LoginResult {
40
+        if ($loginData->getUser() === false) {
41
+            $users = $this->userManager->getByEmail($loginData->getUsername());
42
+            // we only allow login by email if unique
43
+            if (count($users) === 1) {
44
+                $username = $users[0]->getUID();
45
+                if ($username !== $loginData->getUsername()) {
46
+                    $user = $this->userManager->checkPassword(
47
+                        $username,
48
+                        $loginData->getPassword()
49
+                    );
50
+                    if ($user !== false) {
51
+                        $loginData->setUser($user);
52
+                        $loginData->setUsername($username);
53
+                    }
54
+                }
55
+            }
56
+        }
57
+
58
+        return $this->processNextOrFinishSuccessfully($loginData);
59
+    }
60 60
 
61 61
 }
Please login to merge, or discard this patch.
lib/private/Authentication/Login/Chain.php 1 patch
Indentation   +80 added lines, -80 removed lines patch added patch discarded remove patch
@@ -27,85 +27,85 @@
 block discarded – undo
27 27
 
28 28
 class Chain {
29 29
 
30
-	/** @var PreLoginHookCommand */
31
-	private $preLoginHookCommand;
32
-
33
-	/** @var UserDisabledCheckCommand */
34
-	private $userDisabledCheckCommand;
35
-
36
-	/** @var UidLoginCommand */
37
-	private $uidLoginCommand;
38
-
39
-	/** @var EmailLoginCommand */
40
-	private $emailLoginCommand;
41
-
42
-	/** @var LoggedInCheckCommand */
43
-	private $loggedInCheckCommand;
44
-
45
-	/** @var CompleteLoginCommand */
46
-	private $completeLoginCommand;
47
-
48
-	/** @var CreateSessionTokenCommand */
49
-	private $createSessionTokenCommand;
50
-
51
-	/** @var ClearLostPasswordTokensCommand */
52
-	private $clearLostPasswordTokensCommand;
53
-
54
-	/** @var UpdateLastPasswordConfirmCommand */
55
-	private $updateLastPasswordConfirmCommand;
56
-
57
-	/** @var SetUserTimezoneCommand */
58
-	private $setUserTimezoneCommand;
59
-
60
-	/** @var TwoFactorCommand */
61
-	private $twoFactorCommand;
62
-
63
-	/** @var FinishRememberedLoginCommand */
64
-	private $finishRememberedLoginCommand;
65
-
66
-	public function __construct(PreLoginHookCommand $preLoginHookCommand,
67
-								UserDisabledCheckCommand $userDisabledCheckCommand,
68
-								UidLoginCommand $uidLoginCommand,
69
-								EmailLoginCommand $emailLoginCommand,
70
-								LoggedInCheckCommand $loggedInCheckCommand,
71
-								CompleteLoginCommand $completeLoginCommand,
72
-								CreateSessionTokenCommand $createSessionTokenCommand,
73
-								ClearLostPasswordTokensCommand $clearLostPasswordTokensCommand,
74
-								UpdateLastPasswordConfirmCommand $updateLastPasswordConfirmCommand,
75
-								SetUserTimezoneCommand $setUserTimezoneCommand,
76
-								TwoFactorCommand $twoFactorCommand,
77
-								FinishRememberedLoginCommand $finishRememberedLoginCommand
78
-	) {
79
-		$this->preLoginHookCommand = $preLoginHookCommand;
80
-		$this->userDisabledCheckCommand = $userDisabledCheckCommand;
81
-		$this->uidLoginCommand = $uidLoginCommand;
82
-		$this->emailLoginCommand = $emailLoginCommand;
83
-		$this->loggedInCheckCommand = $loggedInCheckCommand;
84
-		$this->completeLoginCommand = $completeLoginCommand;
85
-		$this->createSessionTokenCommand = $createSessionTokenCommand;
86
-		$this->clearLostPasswordTokensCommand = $clearLostPasswordTokensCommand;
87
-		$this->updateLastPasswordConfirmCommand = $updateLastPasswordConfirmCommand;
88
-		$this->setUserTimezoneCommand = $setUserTimezoneCommand;
89
-		$this->twoFactorCommand = $twoFactorCommand;
90
-		$this->finishRememberedLoginCommand = $finishRememberedLoginCommand;
91
-	}
92
-
93
-	public function process(LoginData $loginData): LoginResult {
94
-		$chain = $this->preLoginHookCommand;
95
-		$chain
96
-			->setNext($this->userDisabledCheckCommand)
97
-			->setNext($this->uidLoginCommand)
98
-			->setNext($this->emailLoginCommand)
99
-			->setNext($this->loggedInCheckCommand)
100
-			->setNext($this->completeLoginCommand)
101
-			->setNext($this->createSessionTokenCommand)
102
-			->setNext($this->clearLostPasswordTokensCommand)
103
-			->setNext($this->updateLastPasswordConfirmCommand)
104
-			->setNext($this->setUserTimezoneCommand)
105
-			->setNext($this->twoFactorCommand)
106
-			->setNext($this->finishRememberedLoginCommand);
107
-
108
-		return $chain->process($loginData);
109
-	}
30
+    /** @var PreLoginHookCommand */
31
+    private $preLoginHookCommand;
32
+
33
+    /** @var UserDisabledCheckCommand */
34
+    private $userDisabledCheckCommand;
35
+
36
+    /** @var UidLoginCommand */
37
+    private $uidLoginCommand;
38
+
39
+    /** @var EmailLoginCommand */
40
+    private $emailLoginCommand;
41
+
42
+    /** @var LoggedInCheckCommand */
43
+    private $loggedInCheckCommand;
44
+
45
+    /** @var CompleteLoginCommand */
46
+    private $completeLoginCommand;
47
+
48
+    /** @var CreateSessionTokenCommand */
49
+    private $createSessionTokenCommand;
50
+
51
+    /** @var ClearLostPasswordTokensCommand */
52
+    private $clearLostPasswordTokensCommand;
53
+
54
+    /** @var UpdateLastPasswordConfirmCommand */
55
+    private $updateLastPasswordConfirmCommand;
56
+
57
+    /** @var SetUserTimezoneCommand */
58
+    private $setUserTimezoneCommand;
59
+
60
+    /** @var TwoFactorCommand */
61
+    private $twoFactorCommand;
62
+
63
+    /** @var FinishRememberedLoginCommand */
64
+    private $finishRememberedLoginCommand;
65
+
66
+    public function __construct(PreLoginHookCommand $preLoginHookCommand,
67
+                                UserDisabledCheckCommand $userDisabledCheckCommand,
68
+                                UidLoginCommand $uidLoginCommand,
69
+                                EmailLoginCommand $emailLoginCommand,
70
+                                LoggedInCheckCommand $loggedInCheckCommand,
71
+                                CompleteLoginCommand $completeLoginCommand,
72
+                                CreateSessionTokenCommand $createSessionTokenCommand,
73
+                                ClearLostPasswordTokensCommand $clearLostPasswordTokensCommand,
74
+                                UpdateLastPasswordConfirmCommand $updateLastPasswordConfirmCommand,
75
+                                SetUserTimezoneCommand $setUserTimezoneCommand,
76
+                                TwoFactorCommand $twoFactorCommand,
77
+                                FinishRememberedLoginCommand $finishRememberedLoginCommand
78
+    ) {
79
+        $this->preLoginHookCommand = $preLoginHookCommand;
80
+        $this->userDisabledCheckCommand = $userDisabledCheckCommand;
81
+        $this->uidLoginCommand = $uidLoginCommand;
82
+        $this->emailLoginCommand = $emailLoginCommand;
83
+        $this->loggedInCheckCommand = $loggedInCheckCommand;
84
+        $this->completeLoginCommand = $completeLoginCommand;
85
+        $this->createSessionTokenCommand = $createSessionTokenCommand;
86
+        $this->clearLostPasswordTokensCommand = $clearLostPasswordTokensCommand;
87
+        $this->updateLastPasswordConfirmCommand = $updateLastPasswordConfirmCommand;
88
+        $this->setUserTimezoneCommand = $setUserTimezoneCommand;
89
+        $this->twoFactorCommand = $twoFactorCommand;
90
+        $this->finishRememberedLoginCommand = $finishRememberedLoginCommand;
91
+    }
92
+
93
+    public function process(LoginData $loginData): LoginResult {
94
+        $chain = $this->preLoginHookCommand;
95
+        $chain
96
+            ->setNext($this->userDisabledCheckCommand)
97
+            ->setNext($this->uidLoginCommand)
98
+            ->setNext($this->emailLoginCommand)
99
+            ->setNext($this->loggedInCheckCommand)
100
+            ->setNext($this->completeLoginCommand)
101
+            ->setNext($this->createSessionTokenCommand)
102
+            ->setNext($this->clearLostPasswordTokensCommand)
103
+            ->setNext($this->updateLastPasswordConfirmCommand)
104
+            ->setNext($this->setUserTimezoneCommand)
105
+            ->setNext($this->twoFactorCommand)
106
+            ->setNext($this->finishRememberedLoginCommand);
107
+
108
+        return $chain->process($loginData);
109
+    }
110 110
 
111 111
 }
Please login to merge, or discard this patch.