Skip to content

Commit 673b955

Browse files
committed
chore: update stubs
Signed-off-by: Robin Appelman <robin@icewind.nl>
1 parent 98ce44b commit 673b955

49 files changed

Lines changed: 397 additions & 176 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

β€Žphpstan.neonβ€Ž

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ parameters:
4444
- tests/stubs/oc_files_objectstore_objectstorescanner.php
4545
- tests/stubs/oc_files_objectstore_objectstorestorage.php
4646
- tests/stubs/oc_files_objectstore_primaryobjectstoreconfig.php
47+
- tests/stubs/oc_files_search_searchbinaryoperator.php
48+
- tests/stubs/oc_files_search_searchcomparison.php
49+
- tests/stubs/oc_files_search_searchorder.php
50+
- tests/stubs/oc_files_search_searchquery.php
4751
- tests/stubs/oc_files_setupmanager.php
4852
- tests/stubs/oc_files_storage_common.php
4953
- tests/stubs/oc_files_storage_local.php

β€Žtests/stubs/oc_app.phpβ€Ž

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,16 @@
88
* SPDX-License-Identifier: AGPL-3.0-only
99
*/
1010
use OC\App\AppManager;
11-
use OC\App\DependencyAnalyzer;
1211
use OC\AppFramework\App;
1312
use OC\AppFramework\Bootstrap\Coordinator;
1413
use OC\Installer;
1514
use OC\NeedsUpdateException;
16-
use OC\Repair;
17-
use OC\Repair\Events\RepairErrorEvent;
1815
use OC\SystemConfig;
1916
use OCP\App\AppPathNotFoundException;
2017
use OCP\App\IAppManager;
2118
use OCP\Authentication\IAlternativeLogin;
2219
use OCP\Authentication\IAlternativeLoginProvider;
2320
use OCP\BackgroundJob\IJobList;
24-
use OCP\EventDispatcher\IEventDispatcher;
2521
use OCP\IAppConfig;
2622
use OCP\IConfig;
2723
use OCP\IGroup;
@@ -34,7 +30,6 @@
3430
use OCP\Support\Subscription\IRegistry;
3531
use Psr\Container\ContainerExceptionInterface;
3632
use Psr\Log\LoggerInterface;
37-
use function OCP\Log\logger;
3833

3934
/**
4035
* This class manages the apps. It allows them to register and integrate in the
@@ -119,6 +114,7 @@ public static function isType(string $app, array $types): bool
119114
* @param bool $all whether to return apps for all users, not only the
120115
* currently logged in one
121116
* @return list<string>
117+
* @deprecated 32.0.0 - use {@see \OCP\App\IAppManager::getEnabledAppsForUser} or {@see \OC\OCP\AppIAppManager::getEnabledApps} instead
122118
*/
123119
public static function getEnabledApps(bool $forceRefresh = false, bool $all = false): array
124120
{
@@ -256,6 +252,7 @@ public static function updateApp(string $appId): bool
256252
* @param string $appId
257253
* @param string[] $steps
258254
* @throws NeedsUpdateException
255+
* @deprecated 34.0.0 Use {@see \OC\App\AppManager::executeRepairSteps}
259256
*/
260257
public static function executeRepairSteps(string $appId, array $steps)
261258
{
@@ -270,6 +267,7 @@ public static function setupBackgroundJobs(array $jobs): void
270267

271268
/**
272269
* @throws \Exception
270+
* @deprecated 34.0.0 Use {@see \OC\App\AppManager::checkAppDependencies} instead
273271
*/
274272
public static function checkAppDependencies(IConfig $config, IL10N $l, array $info, bool $ignoreMax): void
275273
{

β€Žtests/stubs/oc_appframework_ocs_baseresponse.phpβ€Ž

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
55
* SPDX-License-Identifier: AGPL-3.0-or-later
66
*/
7+
78
namespace OC\AppFramework\OCS;
89

910
use OCP\AppFramework\Http;

β€Žtests/stubs/oc_appframework_ocs_v1response.phpβ€Ž

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
77
* SPDX-License-Identifier: AGPL-3.0-or-later
88
*/
9+
910
namespace OC\AppFramework\OCS;
1011

1112
use OCP\AppFramework\Http;

β€Žtests/stubs/oc_appframework_utility_simplecontainer.phpβ€Ž

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
* SPDX-FileCopyrightText: 2016 ownCloud, Inc.
66
* SPDX-License-Identifier: AGPL-3.0-only
77
*/
8+
89
namespace OC\AppFramework\Utility;
910

1011
use ArrayAccess;
@@ -26,6 +27,7 @@
2627
* SimpleContainer is a simple implementation of a container on basis of Pimple
2728
*/
2829
class SimpleContainer implements ArrayAccess, ContainerInterface, IContainer {
30+
/** @psalm-suppress ImpureStaticProperty A static property is the only way to pass the information from config to autoload */
2931
public static bool $useLazyObjects = false;
3032

3133
public function __construct()

β€Žtests/stubs/oc_core_command_base.phpβ€Ž

Lines changed: 35 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
* SPDX-FileCopyrightText: 2016 ownCloud, Inc.
66
* SPDX-License-Identifier: AGPL-3.0-only
77
*/
8+
89
namespace OC\Core\Command;
910

1011
use OC\Core\Command\User\ListCommand;
@@ -25,79 +26,82 @@ class Base extends Command implements CompletionAwareInterface {
2526

2627
protected string $defaultOutputFormat = self::OUTPUT_FORMAT_PLAIN;
2728

28-
protected function configure()
29-
{
30-
}
29+
#[\Override]
30+
protected function configure()
31+
{
32+
}
3133

3234
protected function writeArrayInOutputFormat(InputInterface $input, OutputInterface $output, iterable $items, string $prefix = ' - '): void
33-
{
34-
}
35+
{
36+
}
3537

3638
protected function writeTableInOutputFormat(InputInterface $input, OutputInterface $output, array $items): void
37-
{
38-
}
39+
{
40+
}
3941

4042
protected function writeStreamingTableInOutputFormat(InputInterface $input, OutputInterface $output, \Iterator $items, int $tableGroupSize): void
41-
{
42-
}
43+
{
44+
}
4345

4446
protected function writeStreamingJsonArray(InputInterface $input, OutputInterface $output, \Iterator $items): void
45-
{
46-
}
47+
{
48+
}
4749

4850
public function chunkIterator(\Iterator $iterator, int $count): \Iterator
49-
{
50-
}
51-
51+
{
52+
}
5253

5354
/**
5455
* @param mixed $item
5556
*/
5657
protected function writeMixedInOutputFormat(InputInterface $input, OutputInterface $output, $item)
57-
{
58-
}
58+
{
59+
}
5960

6061
protected function valueToString($value, bool $returnNull = true): ?string
61-
{
62-
}
62+
{
63+
}
6364

6465
/**
6566
* Throw InterruptedException when interrupted by user
6667
*
6768
* @throws InterruptedException
6869
*/
6970
protected function abortIfInterrupted()
70-
{
71-
}
71+
{
72+
}
7273

7374
/**
7475
* Changes the status of the command to "interrupted" if ctrl-c has been pressed
7576
*
7677
* Gives a chance to the command to properly terminate what it's doing
7778
*/
7879
public function cancelOperation(): void
79-
{
80-
}
80+
{
81+
}
8182

82-
public function run(InputInterface $input, OutputInterface $output): int
83-
{
84-
}
83+
#[\Override]
84+
public function run(InputInterface $input, OutputInterface $output): int
85+
{
86+
}
8587

8688
/**
8789
* @param string $optionName
8890
* @param CompletionContext $context
8991
* @return string[]
9092
*/
91-
public function completeOptionValues($optionName, CompletionContext $context)
92-
{
93-
}
93+
#[\Override]
94+
public function completeOptionValues($optionName, CompletionContext $context)
95+
{
96+
}
9497

9598
/**
9699
* @param string $argumentName
97100
* @param CompletionContext $context
98101
* @return string[]
99102
*/
100-
public function completeArgumentValues($argumentName, CompletionContext $context)
101-
{
102-
}
103+
#[\Override]
104+
public function completeArgumentValues($argumentName, CompletionContext $context)
105+
{
106+
}
103107
}

β€Žtests/stubs/oc_db_querybuilder_querybuilder.phpβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
* SPDX-FileCopyrightText: 2016 ownCloud, Inc.
66
* SPDX-License-Identifier: AGPL-3.0-only
77
*/
8+
89
namespace OC\DB\QueryBuilder;
910

1011
use Doctrine\DBAL\Query\QueryException;
@@ -138,7 +139,6 @@ public function executeStatement(?IDBConnection $connection = null): int
138139
{
139140
}
140141

141-
142142
/**
143143
* Gets the complete SQL string formed by the current specifications of this QueryBuilder.
144144
*

β€Žtests/stubs/oc_db_querybuilder_typedquerybuilder.phpβ€Ž

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
* SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors
77
* SPDX-License-Identifier: AGPL-3.0-or-later
88
*/
9+
910
namespace OC\DB\QueryBuilder;
1011

1112
use OCP\DB\QueryBuilder\ITypedQueryBuilder;

β€Žtests/stubs/oc_encryption_exceptions_decryptionfailedexception.phpβ€Ž

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
* SPDX-FileCopyrightText: 2016 ownCloud, Inc.
88
* SPDX-License-Identifier: AGPL-3.0-only
99
*/
10+
1011
namespace OC\Encryption\Exceptions;
1112

1213
use OCP\Encryption\Exceptions\GenericEncryptionException;

β€Žtests/stubs/oc_files_cache_cache.phpβ€Ž

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
* SPDX-FileCopyrightText: 2016 ownCloud, Inc.
66
* SPDX-License-Identifier: AGPL-3.0-only
77
*/
8+
89
namespace OC\Files\Cache;
910

1011
use OC\DatabaseException;
@@ -24,8 +25,6 @@
2425
use OCP\Files\Cache\CacheEntryInsertedEvent;
2526
use OCP\Files\Cache\CacheEntryRemovedEvent;
2627
use OCP\Files\Cache\CacheEntryUpdatedEvent;
27-
use OCP\Files\Cache\CacheInsertEvent;
28-
use OCP\Files\Cache\CacheUpdateEvent;
2928
use OCP\Files\Cache\ICache;
3029
use OCP\Files\Cache\ICacheEntry;
3130
use OCP\Files\Config\IUserMountCache;
@@ -349,7 +348,6 @@ public function calculateFolderSize($path, $entry = null)
349348
{
350349
}
351350

352-
353351
/**
354352
* inner function because we can't add new params to the public function without breaking any child classes
355353
*

0 commit comments

Comments
Β (0)