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

[8.x] Add explicit @return annotations in {@inheritdoc} from vendors and add some missing #[\ReturnTypeWillChange] #38819

Merged
merged 2 commits into from
Sep 15, 2021
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions src/Illuminate/Cache/Repository.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,8 @@ public function many(array $keys)

/**
* {@inheritdoc}
*
* @return iterable
*/
public function getMultiple($keys, $default = null)
{
Expand Down Expand Up @@ -219,6 +221,8 @@ public function put($key, $value, $ttl = null)

/**
* {@inheritdoc}
*
* @return bool
*/
public function set($key, $value, $ttl = null)
{
Expand Down Expand Up @@ -276,6 +280,8 @@ protected function putManyForever(array $values)

/**
* {@inheritdoc}
*
* @return bool
*/
public function setMultiple($values, $ttl = null)
{
Expand Down Expand Up @@ -439,6 +445,8 @@ public function forget($key)

/**
* {@inheritdoc}
*
* @return bool
*/
public function delete($key)
{
Expand All @@ -447,6 +455,8 @@ public function delete($key)

/**
* {@inheritdoc}
*
* @return bool
*/
public function deleteMultiple($keys)
{
Expand All @@ -463,6 +473,8 @@ public function deleteMultiple($keys)

/**
* {@inheritdoc}
*
* @return bool
*/
public function clear()
{
Expand Down
2 changes: 2 additions & 0 deletions src/Illuminate/Console/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ public function __construct(Container $laravel, Dispatcher $events, $version)

/**
* {@inheritdoc}
*
* @return int
*/
public function run(InputInterface $input = null, OutputInterface $output = null)
{
Expand Down
4 changes: 4 additions & 0 deletions src/Illuminate/Console/Command.php
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,8 @@ protected function resolveCommand($command)

/**
* {@inheritdoc}
*
* @return bool
*/
public function isHidden()
{
Expand All @@ -171,6 +173,8 @@ public function isHidden()

/**
* {@inheritdoc}
*
* @return static
*/
public function setHidden(bool $hidden)
{
Expand Down
8 changes: 6 additions & 2 deletions src/Illuminate/Container/Container.php
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,9 @@ public function bound($abstract)
}

/**
* {@inheritdoc}
* {@inheritdoc}
*
* @return bool
*/
public function has($id)
{
Expand Down Expand Up @@ -693,7 +695,9 @@ public function make($abstract, array $parameters = [])
}

/**
* {@inheritdoc}
* {@inheritdoc}
*
* @return mixed
*/
public function get($id)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/Container/Util.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public static function getParameterClassName($parameter)
$type = $parameter->getType();

if (! $type instanceof ReflectionNamedType || $type->isBuiltin()) {
return;
return null;
}

$name = $type->getName();
Expand Down
4 changes: 4 additions & 0 deletions src/Illuminate/Database/DBAL/TimestampType.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ class TimestampType extends Type
{
/**
* {@inheritdoc}
*
* @return string
*/
public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform)
{
Expand Down Expand Up @@ -97,6 +99,8 @@ protected function getSQLitePlatformSQLDeclaration(array $fieldDeclaration)

/**
* {@inheritdoc}
*
* @return string
*/
public function getName()
{
Expand Down
3 changes: 3 additions & 0 deletions src/Illuminate/Database/PDO/SqlServerDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@

class SqlServerDriver extends AbstractSQLServerDriver
{
/**
* @return \Doctrine\DBAL\Driver\Connection
*/
public function connect(array $params)
{
return new SqlServerConnection(
Expand Down
2 changes: 2 additions & 0 deletions src/Illuminate/Foundation/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -958,6 +958,8 @@ protected function fireAppCallbacks(array $callbacks)

/**
* {@inheritdoc}
*
* @return \Symfony\Component\HttpFoundation\Response
*/
public function handle(SymfonyRequest $request, int $type = self::MASTER_REQUEST, bool $catch = true)
{
Expand Down
6 changes: 6 additions & 0 deletions src/Illuminate/Http/JsonResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ public function __construct($data = null, $status = 200, $headers = [], $options

/**
* {@inheritdoc}
*
* @return static
*/
public static function fromJsonString(?string $data = null, int $status = 200, array $headers = [])
{
Expand Down Expand Up @@ -65,6 +67,8 @@ public function getData($assoc = false, $depth = 512)

/**
* {@inheritdoc}
*
* @return static
*/
public function setData($data = [])
{
Expand Down Expand Up @@ -109,6 +113,8 @@ protected function hasValidJson($jsonError)

/**
* {@inheritdoc}
*
* @return static
*/
public function setEncodingOptions($options)
{
Expand Down
2 changes: 2 additions & 0 deletions src/Illuminate/Http/Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,8 @@ public static function createFromBase(SymfonyRequest $request)

/**
* {@inheritdoc}
*
* @return static
*/
public function duplicate(array $query = null, array $request = null, array $attributes = null, array $cookies = null, array $files = null, array $server = null)
{
Expand Down
2 changes: 2 additions & 0 deletions src/Illuminate/Mail/Transport/ArrayTransport.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ public function __construct()

/**
* {@inheritdoc}
*
* @return int
*/
public function send(Swift_Mime_SimpleMessage $message, &$failedRecipients = null)
{
Expand Down
2 changes: 2 additions & 0 deletions src/Illuminate/Mail/Transport/LogTransport.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ public function __construct(LoggerInterface $logger)

/**
* {@inheritdoc}
*
* @return int
*/
public function send(Swift_Mime_SimpleMessage $message, &$failedRecipients = null)
{
Expand Down
2 changes: 2 additions & 0 deletions src/Illuminate/Mail/Transport/MailgunTransport.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ public function __construct(ClientInterface $client, $key, $domain, $endpoint =

/**
* {@inheritdoc}
*
* @return int
*/
public function send(Swift_Mime_SimpleMessage $message, &$failedRecipients = null)
{
Expand Down
2 changes: 2 additions & 0 deletions src/Illuminate/Mail/Transport/SesTransport.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ public function __construct(SesClient $ses, $options = [])

/**
* {@inheritdoc}
*
* @return int
*/
public function send(Swift_Mime_SimpleMessage $message, &$failedRecipients = null)
{
Expand Down
4 changes: 4 additions & 0 deletions src/Illuminate/Mail/Transport/Transport.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ abstract class Transport implements Swift_Transport

/**
* {@inheritdoc}
*
* @return bool
*/
public function isStarted()
{
Expand All @@ -42,6 +44,8 @@ public function stop()

/**
* {@inheritdoc}
*
* @return bool
*/
public function ping()
{
Expand Down
12 changes: 12 additions & 0 deletions src/Illuminate/Session/ArraySessionHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ public function __construct($minutes)

/**
* {@inheritdoc}
*
* @return bool
*/
#[\ReturnTypeWillChange]
public function open($savePath, $sessionName)
Expand All @@ -45,6 +47,8 @@ public function open($savePath, $sessionName)

/**
* {@inheritdoc}
*
* @return bool
*/
#[\ReturnTypeWillChange]
public function close()
Expand All @@ -54,6 +58,8 @@ public function close()

/**
* {@inheritdoc}
*
* @return string|false
*/
#[\ReturnTypeWillChange]
public function read($sessionId)
Expand All @@ -75,6 +81,8 @@ public function read($sessionId)

/**
* {@inheritdoc}
*
* @return bool
*/
#[\ReturnTypeWillChange]
public function write($sessionId, $data)
Expand All @@ -89,6 +97,8 @@ public function write($sessionId, $data)

/**
* {@inheritdoc}
*
* @return bool
*/
#[\ReturnTypeWillChange]
public function destroy($sessionId)
Expand All @@ -102,6 +112,8 @@ public function destroy($sessionId)

/**
* {@inheritdoc}
*
* @return int|false
*/
#[\ReturnTypeWillChange]
public function gc($lifetime)
Expand Down
12 changes: 12 additions & 0 deletions src/Illuminate/Session/CacheBasedSessionHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ public function __construct(CacheContract $cache, $minutes)

/**
* {@inheritdoc}
*
* @return bool
*/
#[\ReturnTypeWillChange]
public function open($savePath, $sessionName)
Expand All @@ -45,6 +47,8 @@ public function open($savePath, $sessionName)

/**
* {@inheritdoc}
*
* @return bool
*/
#[\ReturnTypeWillChange]
public function close()
Expand All @@ -54,6 +58,8 @@ public function close()

/**
* {@inheritdoc}
*
* @return string|false
*/
#[\ReturnTypeWillChange]
public function read($sessionId)
Expand All @@ -63,6 +69,8 @@ public function read($sessionId)

/**
* {@inheritdoc}
*
* @return bool
*/
#[\ReturnTypeWillChange]
public function write($sessionId, $data)
Expand All @@ -72,6 +80,8 @@ public function write($sessionId, $data)

/**
* {@inheritdoc}
*
* @return bool
*/
#[\ReturnTypeWillChange]
public function destroy($sessionId)
Expand All @@ -81,6 +91,8 @@ public function destroy($sessionId)

/**
* {@inheritdoc}
*
* @return int|false
*/
#[\ReturnTypeWillChange]
public function gc($lifetime)
Expand Down
Loading