Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Automated] Update psalm-baseline.xml #23786

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
35 changes: 0 additions & 35 deletions build/psalm-baseline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1713,7 +1713,6 @@
<file src="apps/files_sharing/lib/Controller/ShareController.php">
<InvalidArgument occurrences="2">
<code>$files_list</code>
<code>'Share is read-only'</code>
</InvalidArgument>
<InvalidScalarArgument occurrences="3">
<code>$freeSpace</code>
Expand Down Expand Up @@ -2476,18 +2475,6 @@
<code>Resource</code>
</UndefinedDocblockClass>
</file>
<file src="apps/user_ldap/lib/LDAPProviderFactory.php">
<ImplementedReturnTypeMismatch occurrences="1">
<code>OCP\LDAP\ILDAPProvider</code>
</ImplementedReturnTypeMismatch>
<InvalidReturnStatement occurrences="1"/>
<InvalidReturnType occurrences="1">
<code>OCP\LDAP\ILDAPProvider</code>
</InvalidReturnType>
<UndefinedDocblockClass occurrences="1">
<code>OCP\LDAP\ILDAPProvider</code>
</UndefinedDocblockClass>
</file>
<file src="apps/user_ldap/lib/LogWrapper.php">
<InvalidReturnType occurrences="1">
<code>bool</code>
Expand Down Expand Up @@ -3213,11 +3200,6 @@
<code>$default</code>
</MoreSpecificImplementedParamType>
</file>
<file src="lib/private/AppFramework/Services/InitialState.php">
<ImplementedParamTypeMismatch occurrences="1">
<code>$closure</code>
</ImplementedParamTypeMismatch>
</file>
<file src="lib/private/Archive/TAR.php">
<FalsableReturnStatement occurrences="1">
<code>false</code>
Expand Down Expand Up @@ -3342,21 +3324,12 @@
<ImplementedReturnTypeMismatch occurrences="1">
<code>Color</code>
</ImplementedReturnTypeMismatch>
<ImplicitToStringCast occurrences="1">
<code>$avatar</code>
</ImplicitToStringCast>
<InvalidNullableReturnType occurrences="1">
<code>string|boolean</code>
</InvalidNullableReturnType>
<InvalidReturnStatement occurrences="1">
<code>$finalPalette[$this-&gt;hashToInt($hash, $steps * 3)]</code>
</InvalidReturnStatement>
<InvalidReturnType occurrences="1">
<code>Color</code>
</InvalidReturnType>
<NullableReturnStatement occurrences="1">
<code>$image-&gt;data()</code>
</NullableReturnStatement>
</file>
<file src="lib/private/Avatar/GuestAvatar.php">
<ImplementedReturnTypeMismatch occurrences="1">
Expand Down Expand Up @@ -5747,14 +5720,6 @@
<code>$this-&gt;resources</code>
</InvalidPropertyAssignmentValue>
</file>
<file src="lib/public/AppFramework/Services/IInitialState.php">
<MismatchingDocblockParamType occurrences="1">
<code>Closure</code>
</MismatchingDocblockParamType>
<UndefinedDocblockClass occurrences="1">
<code>Closure</code>
</UndefinedDocblockClass>
</file>
<file src="lib/public/BackgroundJob/TimedJob.php">
<MoreSpecificImplementedParamType occurrences="1">
<code>$jobList</code>
Expand Down
23 changes: 23 additions & 0 deletions lib/composer/amphp/amp/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@

The MIT License (MIT)

Copyright (c) 2015-2019 amphp
Copyright (c) 2016 PHP Asynchronous Interoperability Group

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
74 changes: 74 additions & 0 deletions lib/composer/amphp/amp/composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
{
"name": "amphp/amp",
"homepage": "http://amphp.org/amp",
"description": "A non-blocking concurrency framework for PHP applications.",
"keywords": [
"async",
"asynchronous",
"concurrency",
"promise",
"awaitable",
"future",
"non-blocking",
"event",
"event-loop"
],
"license": "MIT",
"authors": [
{
"name": "Daniel Lowrey",
"email": "rdlowrey@php.net"
},
{
"name": "Aaron Piotrowski",
"email": "aaron@trowski.com"
},
{
"name": "Bob Weinand",
"email": "bobwei9@hotmail.com"
},
{
"name": "Niklas Keller",
"email": "me@kelunik.com"
}
],
"require": {
"php": ">=7"
},
"require-dev": {
"ext-json": "*",
"amphp/phpunit-util": "^1",
"amphp/php-cs-fixer-config": "dev-master",
"react/promise": "^2",
"phpunit/phpunit": "^6.0.9 | ^7",
"psalm/phar": "^3.11@dev",
"jetbrains/phpstorm-stubs": "^2019.3"
},
"autoload": {
"psr-4": {
"Amp\\": "lib"
},
"files": [
"lib/functions.php",
"lib/Internal/functions.php"
]
},
"autoload-dev": {
"psr-4": {
"Amp\\Test\\": "test"
}
},
"support": {
"issues": "https://github.com/amphp/amp/issues",
"irc": "irc://irc.freenode.org/amphp"
},
"extra": {
"branch-alias": {
"dev-master": "2.x-dev"
}
},
"scripts": {
"test": "@php -dzend.assertions=1 -dassert.exception=1 ./vendor/bin/phpunit",
"code-style": "@php ./vendor/bin/php-cs-fixer fix"
}
}
80 changes: 80 additions & 0 deletions lib/composer/amphp/amp/lib/CallableMaker.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
<?php

namespace Amp;

// @codeCoverageIgnoreStart
if (\PHP_VERSION_ID < 70100) {
/** @psalm-suppress DuplicateClass */
trait CallableMaker
{
/** @var \ReflectionClass */
private static $__reflectionClass;

/** @var \ReflectionMethod[] */
private static $__reflectionMethods = [];

/**
* Creates a callable from a protected or private instance method that may be invoked by callers requiring a
* publicly invokable callback.
*
* @param string $method Instance method name.
*
* @return callable
*
* @psalm-suppress MixedInferredReturnType
*/
private function callableFromInstanceMethod(string $method): callable
{
if (!isset(self::$__reflectionMethods[$method])) {
if (self::$__reflectionClass === null) {
self::$__reflectionClass = new \ReflectionClass(self::class);
}
self::$__reflectionMethods[$method] = self::$__reflectionClass->getMethod($method);
}

return self::$__reflectionMethods[$method]->getClosure($this);
}

/**
* Creates a callable from a protected or private static method that may be invoked by methods requiring a
* publicly invokable callback.
*
* @param string $method Static method name.
*
* @return callable
*
* @psalm-suppress MixedInferredReturnType
*/
private static function callableFromStaticMethod(string $method): callable
{
if (!isset(self::$__reflectionMethods[$method])) {
if (self::$__reflectionClass === null) {
self::$__reflectionClass = new \ReflectionClass(self::class);
}
self::$__reflectionMethods[$method] = self::$__reflectionClass->getMethod($method);
}

return self::$__reflectionMethods[$method]->getClosure();
}
}
} else {
/** @psalm-suppress DuplicateClass */
trait CallableMaker
{
/**
* @deprecated Use \Closure::fromCallable() instead of this method in PHP 7.1.
*/
private function callableFromInstanceMethod(string $method): callable
{
return \Closure::fromCallable([$this, $method]);
}

/**
* @deprecated Use \Closure::fromCallable() instead of this method in PHP 7.1.
*/
private static function callableFromStaticMethod(string $method): callable
{
return \Closure::fromCallable([self::class, $method]);
}
}
} // @codeCoverageIgnoreEnd
49 changes: 49 additions & 0 deletions lib/composer/amphp/amp/lib/CancellationToken.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<?php

namespace Amp;

/**
* Cancellation tokens are simple objects that allow registering handlers to subscribe to cancellation requests.
*/
interface CancellationToken
{
/**
* Subscribes a new handler to be invoked on a cancellation request.
*
* This handler might be invoked immediately in case the token has already been cancelled. Returned generators will
* automatically be run as coroutines. Any unhandled exceptions will be throw into the event loop.
*
* @param callable(CancelledException) $callback Callback to be invoked on a cancellation request. Will receive a
* `CancelledException` as first argument that may be used to fail the operation's promise.
*
* @return string Identifier that can be used to cancel the subscription.
*/
public function subscribe(callable $callback): string;

/**
* Unsubscribes a previously registered handler.
*
* The handler will no longer be called as long as this method isn't invoked from a subscribed callback.
*
* @param string $id
*
* @return void
*/
public function unsubscribe(string $id);

/**
* Returns whether cancellation has been requested yet.
*
* @return bool
*/
public function isRequested(): bool;

/**
* Throws the `CancelledException` if cancellation has been requested, otherwise does nothing.
*
* @return void
*
* @throws CancelledException
*/
public function throwIfRequested();
}
Loading