Completed
Push — master ( 80b21c...5129a7 )
by Joas
29:44 queued 15s
created
lib/private/Share/Helper.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@
 block discarded – undo
46 46
 		if ($defaultExpireDate === 'yes') {
47 47
 			$enforceExpireDate = $config->getAppValue('core', 'shareapi_enforce_expire_date', 'no');
48 48
 			$defaultExpireSettings['defaultExpireDateSet'] = true;
49
-			$defaultExpireSettings['expireAfterDays'] = (int)$config->getAppValue('core', 'shareapi_expire_after_n_days', '7');
49
+			$defaultExpireSettings['expireAfterDays'] = (int) $config->getAppValue('core', 'shareapi_expire_after_n_days', '7');
50 50
 			$defaultExpireSettings['enforceExpireDate'] = $enforceExpireDate === 'yes';
51 51
 		}
52 52
 
Please login to merge, or discard this patch.
Indentation   +127 added lines, -127 removed lines patch added patch discarded remove patch
@@ -8,131 +8,131 @@
 block discarded – undo
8 8
 namespace OC\Share;
9 9
 
10 10
 class Helper extends \OC\Share\Constants {
11
-	/**
12
-	 * get default expire settings defined by the admin
13
-	 * @return array contains 'defaultExpireDateSet', 'enforceExpireDate', 'expireAfterDays'
14
-	 */
15
-	public static function getDefaultExpireSetting() {
16
-		$config = \OC::$server->getConfig();
17
-
18
-		$defaultExpireSettings = ['defaultExpireDateSet' => false];
19
-
20
-		// get default expire settings
21
-		$defaultExpireDate = $config->getAppValue('core', 'shareapi_default_expire_date', 'no');
22
-		if ($defaultExpireDate === 'yes') {
23
-			$enforceExpireDate = $config->getAppValue('core', 'shareapi_enforce_expire_date', 'no');
24
-			$defaultExpireSettings['defaultExpireDateSet'] = true;
25
-			$defaultExpireSettings['expireAfterDays'] = (int)$config->getAppValue('core', 'shareapi_expire_after_n_days', '7');
26
-			$defaultExpireSettings['enforceExpireDate'] = $enforceExpireDate === 'yes';
27
-		}
28
-
29
-		return $defaultExpireSettings;
30
-	}
31
-
32
-	public static function calcExpireDate() {
33
-		$expireAfter = \OC\Share\Share::getExpireInterval() * 24 * 60 * 60;
34
-		$expireAt = time() + $expireAfter;
35
-		$date = new \DateTime();
36
-		$date->setTimestamp($expireAt);
37
-		$date->setTime(0, 0, 0);
38
-		//$dateString = $date->format('Y-m-d') . ' 00:00:00';
39
-
40
-		return $date;
41
-	}
42
-
43
-	/**
44
-	 * calculate expire date
45
-	 * @param array $defaultExpireSettings contains 'defaultExpireDateSet', 'enforceExpireDate', 'expireAfterDays'
46
-	 * @param int $creationTime timestamp when the share was created
47
-	 * @param int $userExpireDate expire timestamp set by the user
48
-	 * @return mixed integer timestamp or False
49
-	 */
50
-	public static function calculateExpireDate($defaultExpireSettings, $creationTime, $userExpireDate = null) {
51
-		$expires = false;
52
-		$defaultExpires = null;
53
-
54
-		if (!empty($defaultExpireSettings['defaultExpireDateSet'])) {
55
-			$defaultExpires = $creationTime + $defaultExpireSettings['expireAfterDays'] * 86400;
56
-		}
57
-
58
-
59
-		if (isset($userExpireDate)) {
60
-			// if the admin decided to enforce the default expire date then we only take
61
-			// the user defined expire date of it is before the default expire date
62
-			if ($defaultExpires && !empty($defaultExpireSettings['enforceExpireDate'])) {
63
-				$expires = min($userExpireDate, $defaultExpires);
64
-			} else {
65
-				$expires = $userExpireDate;
66
-			}
67
-		} elseif ($defaultExpires && !empty($defaultExpireSettings['enforceExpireDate'])) {
68
-			$expires = $defaultExpires;
69
-		}
70
-
71
-		return $expires;
72
-	}
73
-
74
-	/**
75
-	 * Strips away a potential file names and trailing slashes:
76
-	 * - http://localhost
77
-	 * - http://localhost/
78
-	 * - http://localhost/index.php
79
-	 * - http://localhost/index.php/s/{shareToken}
80
-	 *
81
-	 * all return: http://localhost
82
-	 *
83
-	 * @param string $remote
84
-	 * @return string
85
-	 */
86
-	protected static function fixRemoteURL($remote) {
87
-		$remote = str_replace('\\', '/', $remote);
88
-		if ($fileNamePosition = strpos($remote, '/index.php')) {
89
-			$remote = substr($remote, 0, $fileNamePosition);
90
-		}
91
-		$remote = rtrim($remote, '/');
92
-
93
-		return $remote;
94
-	}
95
-
96
-	/**
97
-	 * check if two federated cloud IDs refer to the same user
98
-	 *
99
-	 * @param string $user1
100
-	 * @param string $server1
101
-	 * @param string $user2
102
-	 * @param string $server2
103
-	 * @return bool true if both users and servers are the same
104
-	 */
105
-	public static function isSameUserOnSameServer($user1, $server1, $user2, $server2) {
106
-		$normalizedServer1 = strtolower(\OC\Share\Share::removeProtocolFromUrl($server1));
107
-		$normalizedServer2 = strtolower(\OC\Share\Share::removeProtocolFromUrl($server2));
108
-
109
-		if (rtrim($normalizedServer1, '/') === rtrim($normalizedServer2, '/')) {
110
-			// FIXME this should be a method in the user management instead
111
-			\OCP\Util::emitHook(
112
-				'\OCA\Files_Sharing\API\Server2Server',
113
-				'preLoginNameUsedAsUserName',
114
-				['uid' => &$user1]
115
-			);
116
-			\OCP\Util::emitHook(
117
-				'\OCA\Files_Sharing\API\Server2Server',
118
-				'preLoginNameUsedAsUserName',
119
-				['uid' => &$user2]
120
-			);
121
-
122
-			if ($user1 === $user2) {
123
-				return true;
124
-			}
125
-		}
126
-
127
-		return false;
128
-	}
129
-
130
-	public static function getTokenLength(): int {
131
-		$config = \OCP\Server::get(\OCP\IAppConfig::class);
132
-		$tokenLength = $config->getValueInt('core', 'shareapi_token_length', self::DEFAULT_TOKEN_LENGTH);
133
-		$tokenLength = $tokenLength ?: self::DEFAULT_TOKEN_LENGTH;
134
-
135
-		// Token length should be within the defined min and max limits
136
-		return max(self::MIN_TOKEN_LENGTH, min($tokenLength, self::MAX_TOKEN_LENGTH));
137
-	}
11
+    /**
12
+     * get default expire settings defined by the admin
13
+     * @return array contains 'defaultExpireDateSet', 'enforceExpireDate', 'expireAfterDays'
14
+     */
15
+    public static function getDefaultExpireSetting() {
16
+        $config = \OC::$server->getConfig();
17
+
18
+        $defaultExpireSettings = ['defaultExpireDateSet' => false];
19
+
20
+        // get default expire settings
21
+        $defaultExpireDate = $config->getAppValue('core', 'shareapi_default_expire_date', 'no');
22
+        if ($defaultExpireDate === 'yes') {
23
+            $enforceExpireDate = $config->getAppValue('core', 'shareapi_enforce_expire_date', 'no');
24
+            $defaultExpireSettings['defaultExpireDateSet'] = true;
25
+            $defaultExpireSettings['expireAfterDays'] = (int)$config->getAppValue('core', 'shareapi_expire_after_n_days', '7');
26
+            $defaultExpireSettings['enforceExpireDate'] = $enforceExpireDate === 'yes';
27
+        }
28
+
29
+        return $defaultExpireSettings;
30
+    }
31
+
32
+    public static function calcExpireDate() {
33
+        $expireAfter = \OC\Share\Share::getExpireInterval() * 24 * 60 * 60;
34
+        $expireAt = time() + $expireAfter;
35
+        $date = new \DateTime();
36
+        $date->setTimestamp($expireAt);
37
+        $date->setTime(0, 0, 0);
38
+        //$dateString = $date->format('Y-m-d') . ' 00:00:00';
39
+
40
+        return $date;
41
+    }
42
+
43
+    /**
44
+     * calculate expire date
45
+     * @param array $defaultExpireSettings contains 'defaultExpireDateSet', 'enforceExpireDate', 'expireAfterDays'
46
+     * @param int $creationTime timestamp when the share was created
47
+     * @param int $userExpireDate expire timestamp set by the user
48
+     * @return mixed integer timestamp or False
49
+     */
50
+    public static function calculateExpireDate($defaultExpireSettings, $creationTime, $userExpireDate = null) {
51
+        $expires = false;
52
+        $defaultExpires = null;
53
+
54
+        if (!empty($defaultExpireSettings['defaultExpireDateSet'])) {
55
+            $defaultExpires = $creationTime + $defaultExpireSettings['expireAfterDays'] * 86400;
56
+        }
57
+
58
+
59
+        if (isset($userExpireDate)) {
60
+            // if the admin decided to enforce the default expire date then we only take
61
+            // the user defined expire date of it is before the default expire date
62
+            if ($defaultExpires && !empty($defaultExpireSettings['enforceExpireDate'])) {
63
+                $expires = min($userExpireDate, $defaultExpires);
64
+            } else {
65
+                $expires = $userExpireDate;
66
+            }
67
+        } elseif ($defaultExpires && !empty($defaultExpireSettings['enforceExpireDate'])) {
68
+            $expires = $defaultExpires;
69
+        }
70
+
71
+        return $expires;
72
+    }
73
+
74
+    /**
75
+     * Strips away a potential file names and trailing slashes:
76
+     * - http://localhost
77
+     * - http://localhost/
78
+     * - http://localhost/index.php
79
+     * - http://localhost/index.php/s/{shareToken}
80
+     *
81
+     * all return: http://localhost
82
+     *
83
+     * @param string $remote
84
+     * @return string
85
+     */
86
+    protected static function fixRemoteURL($remote) {
87
+        $remote = str_replace('\\', '/', $remote);
88
+        if ($fileNamePosition = strpos($remote, '/index.php')) {
89
+            $remote = substr($remote, 0, $fileNamePosition);
90
+        }
91
+        $remote = rtrim($remote, '/');
92
+
93
+        return $remote;
94
+    }
95
+
96
+    /**
97
+     * check if two federated cloud IDs refer to the same user
98
+     *
99
+     * @param string $user1
100
+     * @param string $server1
101
+     * @param string $user2
102
+     * @param string $server2
103
+     * @return bool true if both users and servers are the same
104
+     */
105
+    public static function isSameUserOnSameServer($user1, $server1, $user2, $server2) {
106
+        $normalizedServer1 = strtolower(\OC\Share\Share::removeProtocolFromUrl($server1));
107
+        $normalizedServer2 = strtolower(\OC\Share\Share::removeProtocolFromUrl($server2));
108
+
109
+        if (rtrim($normalizedServer1, '/') === rtrim($normalizedServer2, '/')) {
110
+            // FIXME this should be a method in the user management instead
111
+            \OCP\Util::emitHook(
112
+                '\OCA\Files_Sharing\API\Server2Server',
113
+                'preLoginNameUsedAsUserName',
114
+                ['uid' => &$user1]
115
+            );
116
+            \OCP\Util::emitHook(
117
+                '\OCA\Files_Sharing\API\Server2Server',
118
+                'preLoginNameUsedAsUserName',
119
+                ['uid' => &$user2]
120
+            );
121
+
122
+            if ($user1 === $user2) {
123
+                return true;
124
+            }
125
+        }
126
+
127
+        return false;
128
+    }
129
+
130
+    public static function getTokenLength(): int {
131
+        $config = \OCP\Server::get(\OCP\IAppConfig::class);
132
+        $tokenLength = $config->getValueInt('core', 'shareapi_token_length', self::DEFAULT_TOKEN_LENGTH);
133
+        $tokenLength = $tokenLength ?: self::DEFAULT_TOKEN_LENGTH;
134
+
135
+        // Token length should be within the defined min and max limits
136
+        return max(self::MIN_TOKEN_LENGTH, min($tokenLength, self::MAX_TOKEN_LENGTH));
137
+    }
138 138
 }
Please login to merge, or discard this patch.
apps/sharebymail/composer/composer/autoload_static.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -6,33 +6,33 @@
 block discarded – undo
6 6
 
7 7
 class ComposerStaticInitShareByMail
8 8
 {
9
-    public static $prefixLengthsPsr4 = array (
9
+    public static $prefixLengthsPsr4 = array(
10 10
         'O' => 
11
-        array (
11
+        array(
12 12
             'OCA\\ShareByMail\\' => 16,
13 13
         ),
14 14
     );
15 15
 
16
-    public static $prefixDirsPsr4 = array (
16
+    public static $prefixDirsPsr4 = array(
17 17
         'OCA\\ShareByMail\\' => 
18
-        array (
19
-            0 => __DIR__ . '/..' . '/../lib',
18
+        array(
19
+            0 => __DIR__.'/..'.'/../lib',
20 20
         ),
21 21
     );
22 22
 
23
-    public static $classMap = array (
24
-        'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php',
25
-        'OCA\\ShareByMail\\Activity' => __DIR__ . '/..' . '/../lib/Activity.php',
26
-        'OCA\\ShareByMail\\AppInfo\\Application' => __DIR__ . '/..' . '/../lib/AppInfo/Application.php',
27
-        'OCA\\ShareByMail\\Capabilities' => __DIR__ . '/..' . '/../lib/Capabilities.php',
28
-        'OCA\\ShareByMail\\Settings\\Admin' => __DIR__ . '/..' . '/../lib/Settings/Admin.php',
29
-        'OCA\\ShareByMail\\Settings\\SettingsManager' => __DIR__ . '/..' . '/../lib/Settings/SettingsManager.php',
30
-        'OCA\\ShareByMail\\ShareByMailProvider' => __DIR__ . '/..' . '/../lib/ShareByMailProvider.php',
23
+    public static $classMap = array(
24
+        'Composer\\InstalledVersions' => __DIR__.'/..'.'/composer/InstalledVersions.php',
25
+        'OCA\\ShareByMail\\Activity' => __DIR__.'/..'.'/../lib/Activity.php',
26
+        'OCA\\ShareByMail\\AppInfo\\Application' => __DIR__.'/..'.'/../lib/AppInfo/Application.php',
27
+        'OCA\\ShareByMail\\Capabilities' => __DIR__.'/..'.'/../lib/Capabilities.php',
28
+        'OCA\\ShareByMail\\Settings\\Admin' => __DIR__.'/..'.'/../lib/Settings/Admin.php',
29
+        'OCA\\ShareByMail\\Settings\\SettingsManager' => __DIR__.'/..'.'/../lib/Settings/SettingsManager.php',
30
+        'OCA\\ShareByMail\\ShareByMailProvider' => __DIR__.'/..'.'/../lib/ShareByMailProvider.php',
31 31
     );
32 32
 
33 33
     public static function getInitializer(ClassLoader $loader)
34 34
     {
35
-        return \Closure::bind(function () use ($loader) {
35
+        return \Closure::bind(function() use ($loader) {
36 36
             $loader->prefixLengthsPsr4 = ComposerStaticInitShareByMail::$prefixLengthsPsr4;
37 37
             $loader->prefixDirsPsr4 = ComposerStaticInitShareByMail::$prefixDirsPsr4;
38 38
             $loader->classMap = ComposerStaticInitShareByMail::$classMap;
Please login to merge, or discard this patch.
apps/sharebymail/composer/composer/autoload_classmap.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -6,11 +6,11 @@
 block discarded – undo
6 6
 $baseDir = $vendorDir;
7 7
 
8 8
 return array(
9
-    'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php',
10
-    'OCA\\ShareByMail\\Activity' => $baseDir . '/../lib/Activity.php',
11
-    'OCA\\ShareByMail\\AppInfo\\Application' => $baseDir . '/../lib/AppInfo/Application.php',
12
-    'OCA\\ShareByMail\\Capabilities' => $baseDir . '/../lib/Capabilities.php',
13
-    'OCA\\ShareByMail\\Settings\\Admin' => $baseDir . '/../lib/Settings/Admin.php',
14
-    'OCA\\ShareByMail\\Settings\\SettingsManager' => $baseDir . '/../lib/Settings/SettingsManager.php',
15
-    'OCA\\ShareByMail\\ShareByMailProvider' => $baseDir . '/../lib/ShareByMailProvider.php',
9
+    'Composer\\InstalledVersions' => $vendorDir.'/composer/InstalledVersions.php',
10
+    'OCA\\ShareByMail\\Activity' => $baseDir.'/../lib/Activity.php',
11
+    'OCA\\ShareByMail\\AppInfo\\Application' => $baseDir.'/../lib/AppInfo/Application.php',
12
+    'OCA\\ShareByMail\\Capabilities' => $baseDir.'/../lib/Capabilities.php',
13
+    'OCA\\ShareByMail\\Settings\\Admin' => $baseDir.'/../lib/Settings/Admin.php',
14
+    'OCA\\ShareByMail\\Settings\\SettingsManager' => $baseDir.'/../lib/Settings/SettingsManager.php',
15
+    'OCA\\ShareByMail\\ShareByMailProvider' => $baseDir.'/../lib/ShareByMailProvider.php',
16 16
 );
Please login to merge, or discard this patch.
apps/contactsinteraction/composer/composer/autoload_static.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -6,37 +6,37 @@
 block discarded – undo
6 6
 
7 7
 class ComposerStaticInitContactsInteraction
8 8
 {
9
-    public static $prefixLengthsPsr4 = array (
9
+    public static $prefixLengthsPsr4 = array(
10 10
         'O' => 
11
-        array (
11
+        array(
12 12
             'OCA\\ContactsInteraction\\' => 24,
13 13
         ),
14 14
     );
15 15
 
16
-    public static $prefixDirsPsr4 = array (
16
+    public static $prefixDirsPsr4 = array(
17 17
         'OCA\\ContactsInteraction\\' => 
18
-        array (
19
-            0 => __DIR__ . '/..' . '/../lib',
18
+        array(
19
+            0 => __DIR__.'/..'.'/../lib',
20 20
         ),
21 21
     );
22 22
 
23
-    public static $classMap = array (
24
-        'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php',
25
-        'OCA\\ContactsInteraction\\AddressBook' => __DIR__ . '/..' . '/../lib/AddressBook.php',
26
-        'OCA\\ContactsInteraction\\AddressBookProvider' => __DIR__ . '/..' . '/../lib/AddressBookProvider.php',
27
-        'OCA\\ContactsInteraction\\AppInfo\\Application' => __DIR__ . '/..' . '/../lib/AppInfo/Application.php',
28
-        'OCA\\ContactsInteraction\\BackgroundJob\\CleanupJob' => __DIR__ . '/..' . '/../lib/BackgroundJob/CleanupJob.php',
29
-        'OCA\\ContactsInteraction\\Card' => __DIR__ . '/..' . '/../lib/Card.php',
30
-        'OCA\\ContactsInteraction\\Db\\CardSearchDao' => __DIR__ . '/..' . '/../lib/Db/CardSearchDao.php',
31
-        'OCA\\ContactsInteraction\\Db\\RecentContact' => __DIR__ . '/..' . '/../lib/Db/RecentContact.php',
32
-        'OCA\\ContactsInteraction\\Db\\RecentContactMapper' => __DIR__ . '/..' . '/../lib/Db/RecentContactMapper.php',
33
-        'OCA\\ContactsInteraction\\Listeners\\ContactInteractionListener' => __DIR__ . '/..' . '/../lib/Listeners/ContactInteractionListener.php',
34
-        'OCA\\ContactsInteraction\\Migration\\Version010000Date20200304152605' => __DIR__ . '/..' . '/../lib/Migration/Version010000Date20200304152605.php',
23
+    public static $classMap = array(
24
+        'Composer\\InstalledVersions' => __DIR__.'/..'.'/composer/InstalledVersions.php',
25
+        'OCA\\ContactsInteraction\\AddressBook' => __DIR__.'/..'.'/../lib/AddressBook.php',
26
+        'OCA\\ContactsInteraction\\AddressBookProvider' => __DIR__.'/..'.'/../lib/AddressBookProvider.php',
27
+        'OCA\\ContactsInteraction\\AppInfo\\Application' => __DIR__.'/..'.'/../lib/AppInfo/Application.php',
28
+        'OCA\\ContactsInteraction\\BackgroundJob\\CleanupJob' => __DIR__.'/..'.'/../lib/BackgroundJob/CleanupJob.php',
29
+        'OCA\\ContactsInteraction\\Card' => __DIR__.'/..'.'/../lib/Card.php',
30
+        'OCA\\ContactsInteraction\\Db\\CardSearchDao' => __DIR__.'/..'.'/../lib/Db/CardSearchDao.php',
31
+        'OCA\\ContactsInteraction\\Db\\RecentContact' => __DIR__.'/..'.'/../lib/Db/RecentContact.php',
32
+        'OCA\\ContactsInteraction\\Db\\RecentContactMapper' => __DIR__.'/..'.'/../lib/Db/RecentContactMapper.php',
33
+        'OCA\\ContactsInteraction\\Listeners\\ContactInteractionListener' => __DIR__.'/..'.'/../lib/Listeners/ContactInteractionListener.php',
34
+        'OCA\\ContactsInteraction\\Migration\\Version010000Date20200304152605' => __DIR__.'/..'.'/../lib/Migration/Version010000Date20200304152605.php',
35 35
     );
36 36
 
37 37
     public static function getInitializer(ClassLoader $loader)
38 38
     {
39
-        return \Closure::bind(function () use ($loader) {
39
+        return \Closure::bind(function() use ($loader) {
40 40
             $loader->prefixLengthsPsr4 = ComposerStaticInitContactsInteraction::$prefixLengthsPsr4;
41 41
             $loader->prefixDirsPsr4 = ComposerStaticInitContactsInteraction::$prefixDirsPsr4;
42 42
             $loader->classMap = ComposerStaticInitContactsInteraction::$classMap;
Please login to merge, or discard this patch.
apps/contactsinteraction/composer/composer/autoload_classmap.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -6,15 +6,15 @@
 block discarded – undo
6 6
 $baseDir = $vendorDir;
7 7
 
8 8
 return array(
9
-    'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php',
10
-    'OCA\\ContactsInteraction\\AddressBook' => $baseDir . '/../lib/AddressBook.php',
11
-    'OCA\\ContactsInteraction\\AddressBookProvider' => $baseDir . '/../lib/AddressBookProvider.php',
12
-    'OCA\\ContactsInteraction\\AppInfo\\Application' => $baseDir . '/../lib/AppInfo/Application.php',
13
-    'OCA\\ContactsInteraction\\BackgroundJob\\CleanupJob' => $baseDir . '/../lib/BackgroundJob/CleanupJob.php',
14
-    'OCA\\ContactsInteraction\\Card' => $baseDir . '/../lib/Card.php',
15
-    'OCA\\ContactsInteraction\\Db\\CardSearchDao' => $baseDir . '/../lib/Db/CardSearchDao.php',
16
-    'OCA\\ContactsInteraction\\Db\\RecentContact' => $baseDir . '/../lib/Db/RecentContact.php',
17
-    'OCA\\ContactsInteraction\\Db\\RecentContactMapper' => $baseDir . '/../lib/Db/RecentContactMapper.php',
18
-    'OCA\\ContactsInteraction\\Listeners\\ContactInteractionListener' => $baseDir . '/../lib/Listeners/ContactInteractionListener.php',
19
-    'OCA\\ContactsInteraction\\Migration\\Version010000Date20200304152605' => $baseDir . '/../lib/Migration/Version010000Date20200304152605.php',
9
+    'Composer\\InstalledVersions' => $vendorDir.'/composer/InstalledVersions.php',
10
+    'OCA\\ContactsInteraction\\AddressBook' => $baseDir.'/../lib/AddressBook.php',
11
+    'OCA\\ContactsInteraction\\AddressBookProvider' => $baseDir.'/../lib/AddressBookProvider.php',
12
+    'OCA\\ContactsInteraction\\AppInfo\\Application' => $baseDir.'/../lib/AppInfo/Application.php',
13
+    'OCA\\ContactsInteraction\\BackgroundJob\\CleanupJob' => $baseDir.'/../lib/BackgroundJob/CleanupJob.php',
14
+    'OCA\\ContactsInteraction\\Card' => $baseDir.'/../lib/Card.php',
15
+    'OCA\\ContactsInteraction\\Db\\CardSearchDao' => $baseDir.'/../lib/Db/CardSearchDao.php',
16
+    'OCA\\ContactsInteraction\\Db\\RecentContact' => $baseDir.'/../lib/Db/RecentContact.php',
17
+    'OCA\\ContactsInteraction\\Db\\RecentContactMapper' => $baseDir.'/../lib/Db/RecentContactMapper.php',
18
+    'OCA\\ContactsInteraction\\Listeners\\ContactInteractionListener' => $baseDir.'/../lib/Listeners/ContactInteractionListener.php',
19
+    'OCA\\ContactsInteraction\\Migration\\Version010000Date20200304152605' => $baseDir.'/../lib/Migration/Version010000Date20200304152605.php',
20 20
 );
Please login to merge, or discard this patch.
apps/lookup_server_connector/composer/composer/autoload_static.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -6,30 +6,30 @@
 block discarded – undo
6 6
 
7 7
 class ComposerStaticInitLookupServerConnector
8 8
 {
9
-    public static $prefixLengthsPsr4 = array (
9
+    public static $prefixLengthsPsr4 = array(
10 10
         'O' => 
11
-        array (
11
+        array(
12 12
             'OCA\\LookupServerConnector\\' => 26,
13 13
         ),
14 14
     );
15 15
 
16
-    public static $prefixDirsPsr4 = array (
16
+    public static $prefixDirsPsr4 = array(
17 17
         'OCA\\LookupServerConnector\\' => 
18
-        array (
19
-            0 => __DIR__ . '/..' . '/../lib',
18
+        array(
19
+            0 => __DIR__.'/..'.'/../lib',
20 20
         ),
21 21
     );
22 22
 
23
-    public static $classMap = array (
24
-        'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php',
25
-        'OCA\\LookupServerConnector\\AppInfo\\Application' => __DIR__ . '/..' . '/../lib/AppInfo/Application.php',
26
-        'OCA\\LookupServerConnector\\BackgroundJobs\\RetryJob' => __DIR__ . '/..' . '/../lib/BackgroundJobs/RetryJob.php',
27
-        'OCA\\LookupServerConnector\\UpdateLookupServer' => __DIR__ . '/..' . '/../lib/UpdateLookupServer.php',
23
+    public static $classMap = array(
24
+        'Composer\\InstalledVersions' => __DIR__.'/..'.'/composer/InstalledVersions.php',
25
+        'OCA\\LookupServerConnector\\AppInfo\\Application' => __DIR__.'/..'.'/../lib/AppInfo/Application.php',
26
+        'OCA\\LookupServerConnector\\BackgroundJobs\\RetryJob' => __DIR__.'/..'.'/../lib/BackgroundJobs/RetryJob.php',
27
+        'OCA\\LookupServerConnector\\UpdateLookupServer' => __DIR__.'/..'.'/../lib/UpdateLookupServer.php',
28 28
     );
29 29
 
30 30
     public static function getInitializer(ClassLoader $loader)
31 31
     {
32
-        return \Closure::bind(function () use ($loader) {
32
+        return \Closure::bind(function() use ($loader) {
33 33
             $loader->prefixLengthsPsr4 = ComposerStaticInitLookupServerConnector::$prefixLengthsPsr4;
34 34
             $loader->prefixDirsPsr4 = ComposerStaticInitLookupServerConnector::$prefixDirsPsr4;
35 35
             $loader->classMap = ComposerStaticInitLookupServerConnector::$classMap;
Please login to merge, or discard this patch.
apps/lookup_server_connector/composer/composer/autoload_classmap.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -6,8 +6,8 @@
 block discarded – undo
6 6
 $baseDir = $vendorDir;
7 7
 
8 8
 return array(
9
-    'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php',
10
-    'OCA\\LookupServerConnector\\AppInfo\\Application' => $baseDir . '/../lib/AppInfo/Application.php',
11
-    'OCA\\LookupServerConnector\\BackgroundJobs\\RetryJob' => $baseDir . '/../lib/BackgroundJobs/RetryJob.php',
12
-    'OCA\\LookupServerConnector\\UpdateLookupServer' => $baseDir . '/../lib/UpdateLookupServer.php',
9
+    'Composer\\InstalledVersions' => $vendorDir.'/composer/InstalledVersions.php',
10
+    'OCA\\LookupServerConnector\\AppInfo\\Application' => $baseDir.'/../lib/AppInfo/Application.php',
11
+    'OCA\\LookupServerConnector\\BackgroundJobs\\RetryJob' => $baseDir.'/../lib/BackgroundJobs/RetryJob.php',
12
+    'OCA\\LookupServerConnector\\UpdateLookupServer' => $baseDir.'/../lib/UpdateLookupServer.php',
13 13
 );
Please login to merge, or discard this patch.
lib/private/Files/Cache/CacheEntry.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
 	}
59 59
 
60 60
 	public function getId() {
61
-		return (int)$this->data['fileid'];
61
+		return (int) $this->data['fileid'];
62 62
 	}
63 63
 
64 64
 	public function getStorageId() {
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
 
68 68
 
69 69
 	public function getPath() {
70
-		return (string)$this->data['path'];
70
+		return (string) $this->data['path'];
71 71
 	}
72 72
 
73 73
 
Please login to merge, or discard this patch.
Indentation   +111 added lines, -111 removed lines patch added patch discarded remove patch
@@ -13,120 +13,120 @@
 block discarded – undo
13 13
  * meta data for a file or folder
14 14
  */
15 15
 class CacheEntry implements ICacheEntry {
16
-	/**
17
-	 * @var array
18
-	 */
19
-	private $data;
16
+    /**
17
+     * @var array
18
+     */
19
+    private $data;
20 20
 
21
-	public function __construct(array $data) {
22
-		$this->data = $data;
23
-	}
21
+    public function __construct(array $data) {
22
+        $this->data = $data;
23
+    }
24 24
 
25
-	public function offsetSet($offset, $value): void {
26
-		$this->data[$offset] = $value;
27
-	}
25
+    public function offsetSet($offset, $value): void {
26
+        $this->data[$offset] = $value;
27
+    }
28 28
 
29
-	public function offsetExists($offset): bool {
30
-		return isset($this->data[$offset]);
31
-	}
32
-
33
-	public function offsetUnset($offset): void {
34
-		unset($this->data[$offset]);
35
-	}
36
-
37
-	/**
38
-	 * @return mixed
39
-	 */
40
-	#[\ReturnTypeWillChange]
41
-	public function offsetGet($offset) {
42
-		if (isset($this->data[$offset])) {
43
-			return $this->data[$offset];
44
-		} else {
45
-			return null;
46
-		}
47
-	}
48
-
49
-	public function getId() {
50
-		return (int)$this->data['fileid'];
51
-	}
52
-
53
-	public function getStorageId() {
54
-		return $this->data['storage'];
55
-	}
56
-
57
-
58
-	public function getPath() {
59
-		return (string)$this->data['path'];
60
-	}
61
-
62
-
63
-	public function getName() {
64
-		return $this->data['name'];
65
-	}
66
-
67
-
68
-	public function getMimeType() {
69
-		return $this->data['mimetype'];
70
-	}
71
-
72
-
73
-	public function getMimePart() {
74
-		return $this->data['mimepart'];
75
-	}
76
-
77
-	public function getSize() {
78
-		return $this->data['size'];
79
-	}
80
-
81
-	public function getMTime() {
82
-		return $this->data['mtime'];
83
-	}
84
-
85
-	public function getStorageMTime() {
86
-		return $this->data['storage_mtime'];
87
-	}
88
-
89
-	public function getEtag() {
90
-		return $this->data['etag'];
91
-	}
92
-
93
-	public function getPermissions() {
94
-		return $this->data['permissions'];
95
-	}
96
-
97
-	public function isEncrypted() {
98
-		return isset($this->data['encrypted']) && $this->data['encrypted'];
99
-	}
100
-
101
-	public function getMetadataEtag(): ?string {
102
-		return $this->data['metadata_etag'] ?? null;
103
-	}
104
-
105
-	public function getCreationTime(): ?int {
106
-		return $this->data['creation_time'] ?? null;
107
-	}
108
-
109
-	public function getUploadTime(): ?int {
110
-		return $this->data['upload_time'] ?? null;
111
-	}
112
-
113
-	public function getParentId(): int {
114
-		return $this->data['parent'];
115
-	}
116
-
117
-	public function getData() {
118
-		return $this->data;
119
-	}
29
+    public function offsetExists($offset): bool {
30
+        return isset($this->data[$offset]);
31
+    }
32
+
33
+    public function offsetUnset($offset): void {
34
+        unset($this->data[$offset]);
35
+    }
36
+
37
+    /**
38
+     * @return mixed
39
+     */
40
+    #[\ReturnTypeWillChange]
41
+    public function offsetGet($offset) {
42
+        if (isset($this->data[$offset])) {
43
+            return $this->data[$offset];
44
+        } else {
45
+            return null;
46
+        }
47
+    }
48
+
49
+    public function getId() {
50
+        return (int)$this->data['fileid'];
51
+    }
52
+
53
+    public function getStorageId() {
54
+        return $this->data['storage'];
55
+    }
56
+
57
+
58
+    public function getPath() {
59
+        return (string)$this->data['path'];
60
+    }
61
+
62
+
63
+    public function getName() {
64
+        return $this->data['name'];
65
+    }
66
+
67
+
68
+    public function getMimeType() {
69
+        return $this->data['mimetype'];
70
+    }
71
+
72
+
73
+    public function getMimePart() {
74
+        return $this->data['mimepart'];
75
+    }
76
+
77
+    public function getSize() {
78
+        return $this->data['size'];
79
+    }
80
+
81
+    public function getMTime() {
82
+        return $this->data['mtime'];
83
+    }
84
+
85
+    public function getStorageMTime() {
86
+        return $this->data['storage_mtime'];
87
+    }
88
+
89
+    public function getEtag() {
90
+        return $this->data['etag'];
91
+    }
92
+
93
+    public function getPermissions() {
94
+        return $this->data['permissions'];
95
+    }
96
+
97
+    public function isEncrypted() {
98
+        return isset($this->data['encrypted']) && $this->data['encrypted'];
99
+    }
100
+
101
+    public function getMetadataEtag(): ?string {
102
+        return $this->data['metadata_etag'] ?? null;
103
+    }
104
+
105
+    public function getCreationTime(): ?int {
106
+        return $this->data['creation_time'] ?? null;
107
+    }
108
+
109
+    public function getUploadTime(): ?int {
110
+        return $this->data['upload_time'] ?? null;
111
+    }
112
+
113
+    public function getParentId(): int {
114
+        return $this->data['parent'];
115
+    }
116
+
117
+    public function getData() {
118
+        return $this->data;
119
+    }
120 120
 
121
-	public function __clone() {
122
-		$this->data = array_merge([], $this->data);
123
-	}
121
+    public function __clone() {
122
+        $this->data = array_merge([], $this->data);
123
+    }
124 124
 
125
-	public function getUnencryptedSize(): int {
126
-		if ($this->data['encrypted'] && isset($this->data['unencrypted_size']) && $this->data['unencrypted_size'] > 0) {
127
-			return $this->data['unencrypted_size'];
128
-		} else {
129
-			return $this->data['size'] ?? 0;
130
-		}
131
-	}
125
+    public function getUnencryptedSize(): int {
126
+        if ($this->data['encrypted'] && isset($this->data['unencrypted_size']) && $this->data['unencrypted_size'] > 0) {
127
+            return $this->data['unencrypted_size'];
128
+        } else {
129
+            return $this->data['size'] ?? 0;
130
+        }
131
+    }
132 132
 }
Please login to merge, or discard this patch.
core/Migrations/Version21000Date20201202095923.php 1 patch
Indentation   +37 added lines, -37 removed lines patch added patch discarded remove patch
@@ -32,44 +32,44 @@
 block discarded – undo
32 32
 use OCP\Migration\SimpleMigrationStep;
33 33
 
34 34
 class Version21000Date20201202095923 extends SimpleMigrationStep {
35
-	/**
36
-	 * @param IOutput $output
37
-	 * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
38
-	 * @param array $options
39
-	 * @return null|ISchemaWrapper
40
-	 */
41
-	public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper {
42
-		/** @var ISchemaWrapper $schema */
43
-		$schema = $schemaClosure();
35
+    /**
36
+     * @param IOutput $output
37
+     * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
38
+     * @param array $options
39
+     * @return null|ISchemaWrapper
40
+     */
41
+    public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper {
42
+        /** @var ISchemaWrapper $schema */
43
+        $schema = $schemaClosure();
44 44
 
45
-		if (!$schema->hasTable('accounts_data')) {
46
-			$table = $schema->createTable('accounts_data');
47
-			$table->addColumn('id', Types::BIGINT, [
48
-				'autoincrement' => true,
49
-				'notnull' => true,
50
-				'length' => 20,
51
-			]);
52
-			$table->addColumn('uid', Types::STRING, [
53
-				'notnull' => true,
54
-				'length' => 64,
55
-			]);
56
-			$table->addColumn('name', Types::STRING, [
57
-				'notnull' => true,
58
-				'length' => 64,
59
-			]);
60
-			$table->addColumn('value', Types::STRING, [
61
-				'notnull' => false,
62
-				'length' => 255,
63
-				'default' => '',
64
-			]);
65
-			$table->setPrimaryKey(['id']);
66
-			$table->addIndex(['uid'], 'accounts_data_uid');
67
-			$table->addIndex(['name'], 'accounts_data_name');
68
-			$table->addIndex(['value'], 'accounts_data_value');
45
+        if (!$schema->hasTable('accounts_data')) {
46
+            $table = $schema->createTable('accounts_data');
47
+            $table->addColumn('id', Types::BIGINT, [
48
+                'autoincrement' => true,
49
+                'notnull' => true,
50
+                'length' => 20,
51
+            ]);
52
+            $table->addColumn('uid', Types::STRING, [
53
+                'notnull' => true,
54
+                'length' => 64,
55
+            ]);
56
+            $table->addColumn('name', Types::STRING, [
57
+                'notnull' => true,
58
+                'length' => 64,
59
+            ]);
60
+            $table->addColumn('value', Types::STRING, [
61
+                'notnull' => false,
62
+                'length' => 255,
63
+                'default' => '',
64
+            ]);
65
+            $table->setPrimaryKey(['id']);
66
+            $table->addIndex(['uid'], 'accounts_data_uid');
67
+            $table->addIndex(['name'], 'accounts_data_name');
68
+            $table->addIndex(['value'], 'accounts_data_value');
69 69
 
70
-			return $schema;
71
-		}
70
+            return $schema;
71
+        }
72 72
 
73
-		return null;
74
-	}
73
+        return null;
74
+    }
75 75
 }
Please login to merge, or discard this patch.