]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fix "misplaced variables" warning of Psalm in PHPDoc statements 22272/head
authorMorris Jobke <hey@morrisjobke.de>
Mon, 17 Aug 2020 15:16:50 +0000 (17:16 +0200)
committerMorris Jobke <hey@morrisjobke.de>
Mon, 17 Aug 2020 15:46:57 +0000 (17:46 +0200)
Ref #21787

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
19 files changed:
apps/files_external/lib/Service/GlobalStoragesService.php
apps/files_sharing/templates/public.php
apps/files_trashbin/templates/index.php
apps/settings/lib/Search/AppSearch.php
apps/user_ldap/templates/renewpassword.php
core/Command/User/ResetPassword.php
core/register_command.php
core/templates/404.php
core/templates/login.php
core/templates/publicshareauth.php
core/templates/twofactorsetupchallenge.php
core/templates/twofactorshowchallenge.php
core/templates/untrustedDomain.php
lib/private/DB/MDB2SchemaManager.php
lib/private/DB/Migrator.php
lib/private/PreviewManager.php
lib/private/Search.php
lib/private/Server.php
lib/private/legacy/OC_Util.php

index 2905e08883edb1340b31d9a10eb76aa6c337eaf1..3ef6fd798d48dc3097c1c78c8b941da887da7000 100644 (file)
@@ -167,7 +167,7 @@ class GlobalStoragesService extends StoragesService {
        /**
         * Get all configured admin and personal mounts
         *
-        * @return array map of storage id to storage config
+        * @return StorageConfig[] map of storage id to storage config
         */
        public function getStorageForAllUsers() {
                $mounts = $this->dbConfig->getAllMounts();
index bdd3e8399ead639e5ac9c7942b76b37a3f4474e8..82544385dec94d75454c73e64edbf3fb306ab215 100644 (file)
@@ -1,5 +1,5 @@
 <?php
-/** @var \OCP\IL10N $_ */
+/** @var \OCP\IL10N $l */
 /** @var array $_ */
 ?>
 <div id="app-content">
index 2bf4be54f6a1b7f086bb1e7867b507d6ce4f560b..6d375b699f3a89878241c376245cc47cad6d7f65 100644 (file)
@@ -1,4 +1,4 @@
-<?php /** @var $l \OCP\IL10N */ ?>
+<?php /** @var \OCP\IL10N $l */ ?>
 <div id="controls">
        <div id="file_action_panel"></div>
 </div>
index 393f63a9e81b0292969a472d9c350a6e399795bc..849bac0f7300b6df0316ad7f29d8ea98f121aae0 100644 (file)
@@ -70,7 +70,6 @@ class AppSearch implements IProvider {
         * @inheritDoc
         */
        public function search(IUser $user, ISearchQuery $query): SearchResult {
-               /** @var  $entries */
                $entries = $this->navigationManager->getAll('all');
 
                $result = [];
index c3ea94fbf02763e8c3494bf07f6e02145909da21..dca7a459c83ac6740b5dc97da990e3458dba45cc 100644 (file)
@@ -1,4 +1,4 @@
-<?php /** @var $l OC_L10N */ ?>
+<?php /** @var \OCP\IL10N $l */ ?>
 <?php
 script('user_ldap', [
        'renewPassword',
index bcb3c774ef02c906ac8a063f30d77a803b21e3eb..bde82fd4770153ca34e9da87e5c7db55e893f995 100644 (file)
@@ -70,7 +70,6 @@ class ResetPassword extends Command {
        protected function execute(InputInterface $input, OutputInterface $output): int {
                $username = $input->getArgument('user');
 
-               /** @var $user \OCP\IUser */
                $user = $this->userManager->get($username);
                if (is_null($user)) {
                        $output->writeln('<error>User does not exist</error>');
index 03d458a9cbc63b79d8a3fa68a975069234e14f61..412e8ba8678dc0234d59fc3877b1f626c6613b44 100644 (file)
@@ -42,7 +42,7 @@
  *
  */
 
-/** @var $application Symfony\Component\Console\Application */
+/** @var Symfony\Component\Console\Application $application */
 $application->add(new \Stecman\Component\Symfony\Console\BashCompletion\CompletionCommand());
 $application->add(new OC\Core\Command\Status);
 $application->add(new OC\Core\Command\Check(\OC::$server->getSystemConfig()));
index 85ddb4c4b17f4dc2b3423951b277a03d62d85c9f..10c49f34b6cc9eb9876091136e8bcbe03abda0ea 100644 (file)
@@ -1,7 +1,7 @@
 <?php
-/** @var $_ array */
-/** @var $l \OCP\IL10N */
-/** @var $theme OCP\Defaults */
+/** @var array $_ */
+/** @var \OCP\IL10N $l */
+/** @var \OCP\Defaults $theme */
 // @codeCoverageIgnoreStart
 if (!isset($_)) {//standalone  page is not supported anymore - redirect to /
        require_once '../../lib/base.php';
index 124a62f064609cb4d02312b42ee9e0d2c47c018f..4dc5e41f91726e0b6aa1e32e45ae357dad000fa6 100644 (file)
@@ -1,4 +1,4 @@
-<?php /** @var $l \OCP\IL10N */ ?>
+<?php /** @var \OCP\IL10N $l */ ?>
 <?php
 script('core', 'dist/login');
 ?>
index 22e226222911956f0f10660ce63cd49f90920d63..96c5bc891114af8094bd76c79fc7d9b6fd5563f2 100644 (file)
@@ -1,6 +1,6 @@
 <?php
-       /** @var $_ array */
-       /** @var $l \OCP\IL10N */
+       /** @var array $_ */
+       /** @var \OCP\IL10N $l */
        style('core', 'guest');
        style('core', 'publicshareauth');
        script('core', 'publicshareauth');
index a5b8b44f049730586f687111f59e1a2a0f717122..ea6a1e62f6e6bcd8fe4f02972424082e1e305291 100644 (file)
@@ -1,9 +1,9 @@
 <?php
-/** @var $l \OCP\IL10N */
-/** @var $_ array */
-/* @var $provider OCP\Authentication\TwoFactorAuth\IProvider */
+/** @var \OCP\IL10N $l */
+/** @var array $_ */
+/** @var \OCP\Authentication\TwoFactorAuth\IProvider $provider */
 $provider = $_['provider'];
-/* @var $template string */
+/* @var string $template */
 $template = $_['template'];
 ?>
 
index 481cea06eb05bb9073157f90809daf7e8bcc1b5f..9be36fe13a25cb52037a3cdedf9b3d8708c17511 100644 (file)
@@ -1,7 +1,7 @@
 <?php
-/** @var $l \OCP\IL10N */
-/** @var $_ array */
-/* @var $error boolean */
+/** @var \OCP\IL10N $l */
+/** @var array $_*/
+/** @var boolean $error */
 $error = $_['error'];
 /* @var $error_message string */
 $error_message = $_['error_message'];
index 7de4ff78f30e879e746c69ad060ccb04c91485b9..75054106ab27f86a99b12d5a38666204d140230b 100644 (file)
@@ -1,4 +1,4 @@
-<?php /** @var $_ array */ ?>
+<?php /** @var array $_ */ ?>
 
 <div class="error">
        <h2><?php p($l->t('Access through untrusted domain')); ?></h2>
index 145272619b4aa5627aa6d9bea5c42436e81c3e03..7808e0c0b5121c2b911fd16436efeb08ef06779e 100644 (file)
@@ -145,7 +145,6 @@ class MDB2SchemaManager {
                $toSchema = new Schema([], [], $this->conn->getSchemaManager()->createSchemaConfig());
                $fromSchema = $schemaReader->loadSchemaFromFile($file, $toSchema);
                $toSchema = clone $fromSchema;
-               /** @var $table \Doctrine\DBAL\Schema\Table */
                foreach ($toSchema->getTables() as $table) {
                        $toSchema->dropTable($table->getName());
                }
index 2ea365ab294df47067f16cb826da5d9f6ea0c307..be3d6557e95ca86b8b65cbb7dde1e5b7a4c68d9f 100644 (file)
@@ -226,7 +226,6 @@ class Migrator {
                $sourceSchema = $connection->getSchemaManager()->createSchema();
 
                // remove tables we don't know about
-               /** @var $table \Doctrine\DBAL\Schema\Table */
                foreach ($sourceSchema->getTables() as $table) {
                        if (!$targetSchema->hasTable($table->getName())) {
                                $sourceSchema->dropTable($table->getName());
index 546d495b47d1d94b07c32a28b89d07215338915b..f6f6671f08b3db9937c99d7fa8af119ba53865ce 100644 (file)
@@ -261,7 +261,6 @@ class PreviewManager implements IPreview {
                                                continue;
                                        }
 
-                                       /** @var $provider IProvider */
                                        if ($provider->isAvailable($file)) {
                                                return true;
                                        }
index ae22a6d9f19daf7aee7edeb26089a4f1f4d638fb..9ecf34aef545d26114c8329415f60fa2486514c7 100644 (file)
@@ -36,6 +36,7 @@ use OCP\Search\Provider;
  * Provide an interface to all search providers
  */
 class Search implements ISearch {
+       /** @var Provider[] */
        private $providers = [];
        private $registeredProviders = [];
 
@@ -51,7 +52,6 @@ class Search implements ISearch {
                $this->initProviders();
                $results = [];
                foreach ($this->providers as $provider) {
-                       /** @var $provider Provider */
                        if (! $provider->providesResultsFor($inApps)) {
                                continue;
                        }
index 12abf793828a1bae61e229840f10df97ae692be7..a934628a047de4c18b059023345a242f3abfb700 100644 (file)
@@ -580,7 +580,7 @@ class Server extends ServerContainer implements IServerContainer {
                                $dispatcher->dispatchTyped(new BeforeUserLoggedInWithCookieEvent($uid));
                        });
                        $userSession->listen('\OC\User', 'postRememberedLogin', function ($user, $password) {
-                               /** @var $user \OC\User\User */
+                               /** @var \OC\User\User $user */
                                \OC_Hook::emit('OC_User', 'post_login', ['run' => true, 'uid' => $user->getUID(), 'password' => $password]);
 
                                /** @var IEventDispatcher $dispatcher */
index fd55962447e23f1681a3a9ad5ef745c00166554e..0be615a8e1d317a971f4facb89a2cd636831de92 100644 (file)
@@ -555,16 +555,16 @@ class OC_Util {
 
                $timestamp = filemtime(OC::$SERVERROOT . '/version.php');
                require OC::$SERVERROOT . '/version.php';
-               /** @var $timestamp int */
+               /** @var int $timestamp */
                self::$versionCache['OC_Version_Timestamp'] = $timestamp;
-               /** @var $OC_Version string */
+               /** @var string $OC_Version */
                self::$versionCache['OC_Version'] = $OC_Version;
-               /** @var $OC_VersionString string */
+               /** @var string $OC_VersionString */
                self::$versionCache['OC_VersionString'] = $OC_VersionString;
-               /** @var $OC_Build string */
+               /** @var string $OC_Build */
                self::$versionCache['OC_Build'] = $OC_Build;
 
-               /** @var $OC_Channel string */
+               /** @var string $OC_Channel */
                self::$versionCache['OC_Channel'] = $OC_Channel;
        }