Completed
Push — master ( 7b85da...a99c68 )
by
unknown
43:24
created
tests/lib/Share20/DefaultShareProviderTest.php 1 patch
Spacing   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -717,7 +717,7 @@  discard block
 block discarded – undo
717 717
 		$share2 = $this->provider->create($share);
718 718
 
719 719
 		$this->assertNotNull($share2->getId());
720
-		$this->assertSame('ocinternal:' . $share2->getId(), $share2->getFullId());
720
+		$this->assertSame('ocinternal:'.$share2->getId(), $share2->getFullId());
721 721
 		$this->assertSame(IShare::TYPE_USER, $share2->getShareType());
722 722
 		$this->assertSame('sharedWith', $share2->getSharedWith());
723 723
 		$this->assertSame('sharedBy', $share2->getSharedBy());
@@ -787,7 +787,7 @@  discard block
 block discarded – undo
787 787
 		$share2 = $this->provider->create($share);
788 788
 
789 789
 		$this->assertNotNull($share2->getId());
790
-		$this->assertSame('ocinternal:' . $share2->getId(), $share2->getFullId());
790
+		$this->assertSame('ocinternal:'.$share2->getId(), $share2->getFullId());
791 791
 		$this->assertSame(IShare::TYPE_GROUP, $share2->getShareType());
792 792
 		$this->assertSame('sharedWith', $share2->getSharedWith());
793 793
 		$this->assertSame('sharedBy', $share2->getSharedBy());
@@ -856,7 +856,7 @@  discard block
 block discarded – undo
856 856
 		$share2 = $this->provider->create($share);
857 857
 
858 858
 		$this->assertNotNull($share2->getId());
859
-		$this->assertSame('ocinternal:' . $share2->getId(), $share2->getFullId());
859
+		$this->assertSame('ocinternal:'.$share2->getId(), $share2->getFullId());
860 860
 		$this->assertSame(IShare::TYPE_LINK, $share2->getShareType());
861 861
 		$this->assertSame('sharedBy', $share2->getSharedBy());
862 862
 		$this->assertSame('shareOwner', $share2->getShareOwner());
@@ -1068,7 +1068,7 @@  discard block
 block discarded – undo
1068 1068
 
1069 1069
 		$groups = [];
1070 1070
 		foreach (range(0, 100) as $i) {
1071
-			$groups[] = 'group' . $i;
1071
+			$groups[] = 'group'.$i;
1072 1072
 		}
1073 1073
 
1074 1074
 		$groups[] = 'sharedWith';
@@ -1187,7 +1187,7 @@  discard block
 block discarded – undo
1187 1187
 		$this->assertCount(1, $share);
1188 1188
 
1189 1189
 		$share = $share[0];
1190
-		$this->assertSame((string)$id, $share->getId());
1190
+		$this->assertSame((string) $id, $share->getId());
1191 1191
 		$this->assertSame('sharedWith', $share->getSharedWith());
1192 1192
 		$this->assertSame('shareOwner', $share->getShareOwner());
1193 1193
 		$this->assertSame('sharedBy', $share->getSharedBy());
@@ -1322,7 +1322,7 @@  discard block
 block discarded – undo
1322 1322
 
1323 1323
 		$groups = [];
1324 1324
 		foreach (range(0, 100) as $i) {
1325
-			$groups[] = 'group' . $i;
1325
+			$groups[] = 'group'.$i;
1326 1326
 		}
1327 1327
 
1328 1328
 		$groups[] = 'sharedWith';
@@ -1855,13 +1855,13 @@  discard block
 block discarded – undo
1855 1855
 		$users = [];
1856 1856
 		for ($i = 0; $i < 6; $i++) {
1857 1857
 			$user = $this->createMock(IUser::class);
1858
-			$user->method('getUID')->willReturn('user' . $i);
1859
-			$user->method('getDisplayName')->willReturn('user' . $i);
1860
-			$users['user' . $i] = $user;
1858
+			$user->method('getUID')->willReturn('user'.$i);
1859
+			$user->method('getDisplayName')->willReturn('user'.$i);
1860
+			$users['user'.$i] = $user;
1861 1861
 		}
1862 1862
 
1863 1863
 		$this->userManager->method('get')->willReturnCallback(
1864
-			function ($userId) use ($users) {
1864
+			function($userId) use ($users) {
1865 1865
 				return $users[$userId];
1866 1866
 			}
1867 1867
 		);
@@ -1913,12 +1913,12 @@  discard block
 block discarded – undo
1913 1913
 		$users = [];
1914 1914
 		for ($i = 0; $i < 6; $i++) {
1915 1915
 			$user = $this->createMock(IUser::class);
1916
-			$user->method('getUID')->willReturn('user' . $i);
1917
-			$users['user' . $i] = $user;
1916
+			$user->method('getUID')->willReturn('user'.$i);
1917
+			$users['user'.$i] = $user;
1918 1918
 		}
1919 1919
 
1920 1920
 		$this->userManager->method('get')->willReturnCallback(
1921
-			function ($userId) use ($users) {
1921
+			function($userId) use ($users) {
1922 1922
 				return $users[$userId];
1923 1923
 			}
1924 1924
 		);
@@ -1979,12 +1979,12 @@  discard block
 block discarded – undo
1979 1979
 		$users = [];
1980 1980
 		for ($i = 0; $i < 6; $i++) {
1981 1981
 			$user = $this->createMock(IUser::class);
1982
-			$user->method('getUID')->willReturn('user' . $i);
1983
-			$users['user' . $i] = $user;
1982
+			$user->method('getUID')->willReturn('user'.$i);
1983
+			$users['user'.$i] = $user;
1984 1984
 		}
1985 1985
 
1986 1986
 		$this->userManager->method('get')->willReturnCallback(
1987
-			function ($userId) use ($users) {
1987
+			function($userId) use ($users) {
1988 1988
 				return $users[$userId];
1989 1989
 			}
1990 1990
 		);
@@ -2036,12 +2036,12 @@  discard block
 block discarded – undo
2036 2036
 		$users = [];
2037 2037
 		for ($i = 0; $i < 6; $i++) {
2038 2038
 			$user = $this->createMock(IUser::class);
2039
-			$user->method('getUID')->willReturn('user' . $i);
2040
-			$users['user' . $i] = $user;
2039
+			$user->method('getUID')->willReturn('user'.$i);
2040
+			$users['user'.$i] = $user;
2041 2041
 		}
2042 2042
 
2043 2043
 		$this->userManager->method('get')->willReturnCallback(
2044
-			function ($userId) use ($users) {
2044
+			function($userId) use ($users) {
2045 2045
 				return $users[$userId];
2046 2046
 			}
2047 2047
 		);
@@ -2049,13 +2049,13 @@  discard block
 block discarded – undo
2049 2049
 		$groups = [];
2050 2050
 		for ($i = 0; $i < 2; $i++) {
2051 2051
 			$group = $this->createMock(IGroup::class);
2052
-			$group->method('getGID')->willReturn('group' . $i);
2053
-			$group->method('getDisplayName')->willReturn('group-displayname' . $i);
2054
-			$groups['group' . $i] = $group;
2052
+			$group->method('getGID')->willReturn('group'.$i);
2053
+			$group->method('getDisplayName')->willReturn('group-displayname'.$i);
2054
+			$groups['group'.$i] = $group;
2055 2055
 		}
2056 2056
 
2057 2057
 		$this->groupManager->method('get')->willReturnCallback(
2058
-			function ($groupId) use ($groups) {
2058
+			function($groupId) use ($groups) {
2059 2059
 				return $groups[$groupId];
2060 2060
 			}
2061 2061
 		);
@@ -2115,12 +2115,12 @@  discard block
 block discarded – undo
2115 2115
 		$users = [];
2116 2116
 		for ($i = 0; $i < 6; $i++) {
2117 2117
 			$user = $this->createMock(IUser::class);
2118
-			$user->method('getUID')->willReturn('user' . $i);
2119
-			$users['user' . $i] = $user;
2118
+			$user->method('getUID')->willReturn('user'.$i);
2119
+			$users['user'.$i] = $user;
2120 2120
 		}
2121 2121
 
2122 2122
 		$this->userManager->method('get')->willReturnCallback(
2123
-			function ($userId) use ($users) {
2123
+			function($userId) use ($users) {
2124 2124
 				return $users[$userId];
2125 2125
 			}
2126 2126
 		);
@@ -2128,13 +2128,13 @@  discard block
 block discarded – undo
2128 2128
 		$groups = [];
2129 2129
 		for ($i = 0; $i < 2; $i++) {
2130 2130
 			$group = $this->createMock(IGroup::class);
2131
-			$group->method('getGID')->willReturn('group' . $i);
2132
-			$group->method('getDisplayName')->willReturn('group-displayname' . $i);
2133
-			$groups['group' . $i] = $group;
2131
+			$group->method('getGID')->willReturn('group'.$i);
2132
+			$group->method('getDisplayName')->willReturn('group-displayname'.$i);
2133
+			$groups['group'.$i] = $group;
2134 2134
 		}
2135 2135
 
2136 2136
 		$this->groupManager->method('get')->willReturnCallback(
2137
-			function ($groupId) use ($groups) {
2137
+			function($groupId) use ($groups) {
2138 2138
 				return $groups[$groupId];
2139 2139
 			}
2140 2140
 		);
@@ -2192,12 +2192,12 @@  discard block
 block discarded – undo
2192 2192
 		$this->assertSame('user0', $shares[0]['share_with']);
2193 2193
 		$this->assertSame('user4', $shares[0]['uid_initiator']);
2194 2194
 		$this->assertSame('user5', $shares[0]['uid_owner']);
2195
-		$this->assertSame(1, (int)$shares[0]['permissions']);
2195
+		$this->assertSame(1, (int) $shares[0]['permissions']);
2196 2196
 
2197 2197
 		$this->assertSame('user3', $shares[1]['share_with']);
2198 2198
 		$this->assertSame('user4', $shares[1]['uid_initiator']);
2199 2199
 		$this->assertSame('user5', $shares[1]['uid_owner']);
2200
-		$this->assertSame(0, (int)$shares[1]['permissions']);
2200
+		$this->assertSame(0, (int) $shares[1]['permissions']);
2201 2201
 
2202 2202
 
2203 2203
 		$stmt->closeCursor();
Please login to merge, or discard this patch.
tests/lib/LargeFileHelperTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
 	public function testFormatUnsignedIntegerFloat(): void {
19 19
 		$this->assertSame(
20 20
 			'9007199254740992',
21
-			$this->helper->formatUnsignedInteger((float)9007199254740992)
21
+			$this->helper->formatUnsignedInteger((float) 9007199254740992)
22 22
 		);
23 23
 	}
24 24
 
Please login to merge, or discard this patch.
tests/lib/Authentication/TwoFactorAuth/ProviderLoaderTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
 	public function testGetProviders(): void {
73 73
 		$provider = $this->createMock(IProvider::class);
74 74
 		$provider->method('getId')->willReturn('test');
75
-		\OC::$server->registerService('\\OCA\\TwoFactorTest\\Provider', function () use ($provider) {
75
+		\OC::$server->registerService('\\OCA\\TwoFactorTest\\Provider', function() use ($provider) {
76 76
 			return $provider;
77 77
 		});
78 78
 		$this->appManager->expects($this->once())
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
 		$provider = $this->createMock(IProvider::class);
98 98
 		$provider->method('getId')->willReturn('test');
99 99
 
100
-		\OC::$server->registerService('\\OCA\\TwoFactorTest\\Provider', function () use ($provider) {
100
+		\OC::$server->registerService('\\OCA\\TwoFactorTest\\Provider', function() use ($provider) {
101 101
 			return $provider;
102 102
 		});
103 103
 
Please login to merge, or discard this patch.
tests/lib/Authentication/TwoFactorAuth/MandatoryTwoFactorTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
 				['twofactor_enforced_excluded_groups', [], []],
92 92
 			]);
93 93
 		$this->groupManager->method('isInGroup')
94
-			->willReturnCallback(function ($user, $group) {
94
+			->willReturnCallback(function($user, $group) {
95 95
 				return $user === 'user123' && $group === 'twofactorers';
96 96
 			});
97 97
 
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
 				['twofactor_enforced_excluded_groups', [], ['yoloers']],
130 130
 			]);
131 131
 		$this->groupManager->method('isInGroup')
132
-			->willReturnCallback(function ($user, $group) {
132
+			->willReturnCallback(function($user, $group) {
133 133
 				return $user === 'user123' && $group === 'yoloers';
134 134
 			});
135 135
 
Please login to merge, or discard this patch.
tests/lib/Contacts/ContactsMenu/ManagerTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@
 block discarded – undo
51 51
 			$entry = $this->createMock(Entry::class);
52 52
 			$entry->expects($this->any())
53 53
 				->method('getFullName')
54
-				->willReturn('Contact ' . $char);
54
+				->willReturn('Contact '.$char);
55 55
 			$entries[] = $entry;
56 56
 		}
57 57
 		return $entries;
Please login to merge, or discard this patch.
tests/lib/DB/QueryBuilder/QuoteHelperTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -123,9 +123,9 @@
 block discarded – undo
123 123
 
124 124
 		if (substr_count($string, '.')) {
125 125
 			[$alias, $columnName] = explode('.', $string);
126
-			return '`' . $alias . '`.`' . $columnName . '`';
126
+			return '`'.$alias.'`.`'.$columnName.'`';
127 127
 		}
128 128
 
129
-		return '`' . $string . '`';
129
+		return '`'.$string.'`';
130 130
 	}
131 131
 }
Please login to merge, or discard this patch.
tests/lib/DB/MigratorTest.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -64,18 +64,18 @@  discard block
 block discarded – undo
64 64
 	}
65 65
 
66 66
 	private function getUniqueTableName() {
67
-		return strtolower($this->getUniqueID($this->config->getSystemValueString('dbtableprefix', 'oc_') . 'test_'));
67
+		return strtolower($this->getUniqueID($this->config->getSystemValueString('dbtableprefix', 'oc_').'test_'));
68 68
 	}
69 69
 
70 70
 	protected function tearDown(): void {
71 71
 		// Try to delete if exists (IF EXISTS NOT SUPPORTED IN ORACLE)
72 72
 		try {
73
-			$this->connection->exec('DROP TABLE ' . $this->connection->quoteIdentifier($this->tableNameTmp));
73
+			$this->connection->exec('DROP TABLE '.$this->connection->quoteIdentifier($this->tableNameTmp));
74 74
 		} catch (Exception $e) {
75 75
 		}
76 76
 
77 77
 		try {
78
-			$this->connection->exec('DROP TABLE ' . $this->connection->quoteIdentifier($this->tableName));
78
+			$this->connection->exec('DROP TABLE '.$this->connection->quoteIdentifier($this->tableName));
79 79
 		} catch (Exception $e) {
80 80
 		}
81 81
 		parent::tearDown();
@@ -89,13 +89,13 @@  discard block
 block discarded – undo
89 89
 		$table = $startSchema->createTable($this->tableName);
90 90
 		$table->addColumn('id', 'integer');
91 91
 		$table->addColumn('name', 'string');
92
-		$table->addIndex(['id'], $this->tableName . '_id');
92
+		$table->addIndex(['id'], $this->tableName.'_id');
93 93
 
94 94
 		$endSchema = new Schema([], [], $this->getSchemaConfig());
95 95
 		$table = $endSchema->createTable($this->tableName);
96 96
 		$table->addColumn('id', 'integer');
97 97
 		$table->addColumn('name', 'string');
98
-		$table->addUniqueIndex(['id'], $this->tableName . '_id');
98
+		$table->addUniqueIndex(['id'], $this->tableName.'_id');
99 99
 
100 100
 		return [$startSchema, $endSchema];
101 101
 	}
@@ -108,13 +108,13 @@  discard block
 block discarded – undo
108 108
 		$table = $startSchema->createTable($this->tableName);
109 109
 		$table->addColumn('id', $from);
110 110
 		$table->addColumn('name', 'string');
111
-		$table->addIndex(['id'], $this->tableName . '_id');
111
+		$table->addIndex(['id'], $this->tableName.'_id');
112 112
 
113 113
 		$endSchema = new Schema([], [], $this->getSchemaConfig());
114 114
 		$table = $endSchema->createTable($this->tableName);
115 115
 		$table->addColumn('id', $to);
116 116
 		$table->addColumn('name', 'string');
117
-		$table->addIndex(['id'], $this->tableName . '_id');
117
+		$table->addIndex(['id'], $this->tableName.'_id');
118 118
 
119 119
 		return [$startSchema, $endSchema];
120 120
 	}
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
 		$oldTablePrefix = $this->config->getSystemValueString('dbtableprefix', 'oc_');
144 144
 
145 145
 		$this->config->setSystemValue('dbtableprefix', 'ownc_');
146
-		$this->tableName = strtolower($this->getUniqueID($this->config->getSystemValueString('dbtableprefix') . 'test_'));
146
+		$this->tableName = strtolower($this->getUniqueID($this->config->getSystemValueString('dbtableprefix').'test_'));
147 147
 
148 148
 		[$startSchema, $endSchema] = $this->getDuplicateKeySchemas();
149 149
 		$migrator = $this->getMigrator();
@@ -291,7 +291,7 @@  discard block
 block discarded – undo
291 291
 		$table->addColumn('will_it_blend', $columnType, [
292 292
 			'notnull' => true,
293 293
 		]);
294
-		$table->addIndex(['id'], $this->tableName . '_id');
294
+		$table->addIndex(['id'], $this->tableName.'_id');
295 295
 
296 296
 		$migrator = $this->getMigrator();
297 297
 		$migrator->migrate($startSchema);
Please login to merge, or discard this patch.
tests/lib/RichObjectStrings/ValidatorTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -90,7 +90,7 @@
 block discarded – undo
90 90
 		}
91 91
 
92 92
 		$v = new Validator(new Definitions());
93
-		$v->validate('{' . $key . '}', [
93
+		$v->validate('{'.$key.'}', [
94 94
 			$key => [
95 95
 				'type' => 'highlight',
96 96
 				'id' => 'identifier',
Please login to merge, or discard this patch.
tests/lib/RichObjectStrings/DefinitionsTest.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -58,18 +58,18 @@
 block discarded – undo
58 58
 	}
59 59
 
60 60
 	public function validateParameter($parameter, $data) {
61
-		$this->assertTrue(is_array($data), 'Parameter ' . $parameter . ' is invalid');
61
+		$this->assertTrue(is_array($data), 'Parameter '.$parameter.' is invalid');
62 62
 		$this->assertArrayHasKey('since', $data);
63
-		$this->assertNotEmpty($data['since'], 'Since of parameter ' . $parameter . ' must not be empty');
63
+		$this->assertNotEmpty($data['since'], 'Since of parameter '.$parameter.' must not be empty');
64 64
 		$this->assertArrayHasKey('required', $data);
65
-		$this->assertTrue(is_bool($data['required']), 'Required of parameter ' . $parameter . ' must be a boolean');
65
+		$this->assertTrue(is_bool($data['required']), 'Required of parameter '.$parameter.' must be a boolean');
66 66
 		if ($parameter === 'id' || $parameter === 'name') {
67
-			$this->assertTrue($data['required'], 'Parameter ' . $parameter . ' must be required');
67
+			$this->assertTrue($data['required'], 'Parameter '.$parameter.' must be required');
68 68
 		}
69 69
 
70 70
 		$this->assertArrayHasKey('description', $data);
71
-		$this->assertNotEquals('', $data['description'], 'Description of parameter ' . $parameter . ' must not be empty');
71
+		$this->assertNotEquals('', $data['description'], 'Description of parameter '.$parameter.' must not be empty');
72 72
 		$this->assertArrayHasKey('example', $data);
73
-		$this->assertNotEquals('', $data['example'], 'Example of parameter ' . $parameter . ' must not be empty');
73
+		$this->assertNotEquals('', $data['example'], 'Example of parameter '.$parameter.' must not be empty');
74 74
 	}
75 75
 }
Please login to merge, or discard this patch.