Failed Conditions
Pull Request — master (#682)
by
unknown
07:29
created
lib/Db/SharingACL.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -35,8 +35,7 @@  discard block
 block discarded – undo
35 35
  * @method string getSharedKey()
36 36
  */
37 37
 
38
-class SharingACL extends PermissionEntity implements \JsonSerializable
39
-{
38
+class SharingACL extends PermissionEntity implements \JsonSerializable {
40 39
 
41 40
     protected
42 41
         $itemId,
@@ -67,8 +66,7 @@  discard block
 block discarded – undo
67 66
      * which is a value of any type other than a resource.
68 67
      * @since 5.4.0
69 68
      */
70
-    function jsonSerialize()
71
-    {
69
+    function jsonSerialize() {
72 70
         return [
73 71
             'acl_id' => $this->getId(),
74 72
             'item_id' => $this->getItemId(),
Please login to merge, or discard this patch.
lib/Db/File.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
  */
33 33
 
34 34
 
35
-class File extends Entity implements  \JsonSerializable{
35
+class File extends Entity implements  \JsonSerializable {
36 36
 
37 37
 	use EntityJSONSerializer;
38 38
 
Please login to merge, or discard this patch.
lib/Db/Credential.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@
 block discarded – undo
63 63
  */
64 64
 
65 65
 
66
-class Credential extends Entity implements  \JsonSerializable{
66
+class Credential extends Entity implements  \JsonSerializable {
67 67
 
68 68
 	use EntityJSONSerializer;
69 69
 
Please login to merge, or discard this patch.
lib/Db/Vault.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
  */
37 37
 
38 38
 
39
-class Vault extends Entity implements  \JsonSerializable{
39
+class Vault extends Entity implements  \JsonSerializable {
40 40
 
41 41
 	use EntityJSONSerializer;
42 42
 
Please login to merge, or discard this patch.
lib/Db/ShareRequest.php 1 patch
Braces   +2 added lines, -3 removed lines patch added patch discarded remove patch
@@ -62,8 +62,7 @@  discard block
 block discarded – undo
62 62
      * which is a value of any type other than a resource.
63 63
      * @since 5.4.0
64 64
      */
65
-    function jsonSerialize()
66
-    {
65
+    function jsonSerialize() {
67 66
         return [
68 67
             'req_id' => $this->getId(),
69 68
             'item_id' => $this->getItemId(),
@@ -78,7 +77,7 @@  discard block
 block discarded – undo
78 77
         ];
79 78
     }
80 79
 
81
-    function asACLJson(){
80
+    function asACLJson() {
82 81
         return [
83 82
             'item_id' => $this->getItemId(),
84 83
             'item_guid' => $this->getItemGuid(),
Please login to merge, or discard this patch.
controller/pagecontroller.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
 
22 22
 	private $userId;
23 23
 
24
-	public function __construct($AppName, IRequest $request, $UserId){
24
+	public function __construct($AppName, IRequest $request, $UserId) {
25 25
 		parent::__construct($AppName, $request);
26 26
 		$this->userId = $UserId;
27 27
 	}
Please login to merge, or discard this patch.
lib/Service/EncryptService.php 2 patches
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -272,7 +272,9 @@
 block discarded – undo
272 272
 	protected function unpad($data) {
273 273
 		$length = $this->getKeySize();
274 274
 		$last = ord($data[strlen($data) - 1]);
275
-		if ($last > $length) return false;
275
+		if ($last > $length) {
276
+			return false;
277
+		}
276 278
 		if (substr($data, -1 * $last) !== str_repeat(chr($last), $last)) {
277 279
 			return false;
278 280
 		}
Please login to merge, or discard this patch.
Doc Comments   +7 added lines, -3 removed lines patch added patch discarded remove patch
@@ -206,6 +206,10 @@  discard block
 block discarded – undo
206 206
 		return array($cipherKey, $macKey, $iv);
207 207
 	}
208 208
 
209
+	/**
210
+	 * @param string $a
211
+	 * @param string $b
212
+	 */
209 213
 	protected function hash_equals($a, $b) {
210 214
 		if (function_exists('random_bytes')) {
211 215
 			$key = random_bytes(128);
@@ -247,7 +251,7 @@  discard block
 block discarded – undo
247 251
 	/**
248 252
 	 * Pad the data with a random char chosen by the pad amount.
249 253
 	 *
250
-	 * @param $data
254
+	 * @param string $data
251 255
 	 * @return string
252 256
 	 */
253 257
 	protected function pad($data) {
@@ -263,8 +267,8 @@  discard block
 block discarded – undo
263 267
 	/**
264 268
 	 * Unpad the the data
265 269
 	 *
266
-	 * @param $data
267
-	 * @return bool|string
270
+	 * @param string $data
271
+	 * @return false|string
268 272
 	 */
269 273
 	protected function unpad($data) {
270 274
 		$length = $this->getKeySize();
Please login to merge, or discard this patch.
middleware/sharemiddleware.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
 			$setting = (in_array($methodName, $publicMethods)) ? 'link_sharing_enabled' : 'user_sharing_enabled';
27 27
 			$sharing_enabled = ($this->settings->isEnabled($setting));
28 28
 
29
-			if(in_array($methodName, $user_pub_methods)){
29
+			if(in_array($methodName, $user_pub_methods)) {
30 30
 				$sharing_enabled = ($this->settings->isEnabled('link_sharing_enabled') || $this->settings->isEnabled('user_sharing_enabled'));
31 31
 			}
32 32
 
Please login to merge, or discard this patch.
lib/Service/SettingsService.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -110,7 +110,7 @@
 block discarded – undo
110 110
 	/**
111 111
 	 * Check if an setting is enabled (value of 1)
112 112
 	 *
113
-	 * @param $setting
113
+	 * @param string $setting
114 114
 	 * @return bool
115 115
 	 */
116 116
 	public function isEnabled($setting) {
Please login to merge, or discard this patch.