Skip to content
This repository has been archived by the owner on Mar 1, 2023. It is now read-only.

Commit

Permalink
Scrutinizer Auto-Fixes (#343)
Browse files Browse the repository at this point in the history
This commit consists of patches automatically generated for this project on https://scrutinizer-ci.com
  • Loading branch information
scrutinizer-auto-fixer authored and prisis committed Aug 16, 2016
1 parent 12015b1 commit e246d32
Show file tree
Hide file tree
Showing 16 changed files with 35 additions and 20 deletions.
1 change: 0 additions & 1 deletion src/Viserio/Cache/CacheManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
use Memcached;
use MongoDB\Driver\Manager as MongoDBManager;
use Predis\Client as PredisClient;
use Psr\Cache\CacheItemPoolInterface;
use Redis;
use Viserio\{
Filesystem\FilesystemManager,
Expand Down
2 changes: 1 addition & 1 deletion src/Viserio/Connect/ConnectManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ protected function createMariadbConnection(array $config): PDO
*
* @param array $config
*
* @return \Mongo|\MongoClient|\MongoDB\Client
* @return PDO
*/
protected function createMongoConnection(array $config): PDO
{
Expand Down
1 change: 0 additions & 1 deletion src/Viserio/Container/Container.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
namespace Viserio\Container;

use Interop\Container\ContainerInterface as ContainerInteropInterface;
use Nucleus\Invoker\Invoker;
use Viserio\Container\Exception\BindingResolutionException;
use Viserio\Container\Exception\ContainerException;
use Viserio\Container\Exception\NotFoundException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
declare(strict_types=1);
namespace Viserio\Contracts\Exception\Exception;

use __PHP_Incomplete_Class;
use ArrayObject;
use Throwable;
use __PHP_Incomplete_Class;

/**
* @author Fabien Potencier <fabien@symfony.com>
Expand Down
5 changes: 5 additions & 0 deletions src/Viserio/Contracts/Exception/Handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,13 @@ public function addShouldntReport(Throwable $exception): Handler;

/**
* Register the exception / Error handlers for the application.
* @return void
*/
public function register();

/**
* Unregister the PHP error handler.
* @return void
*/
public function unregister();

Expand All @@ -96,6 +98,7 @@ public function unregister();
* @param null $context
*
* @throws \ErrorException
* @return void
*/
public function handleError(
int $level,
Expand All @@ -113,11 +116,13 @@ public function handleError(
* be handled differently since they are not normal exceptions.
*
* @param \Throwable $exception
* @return null|string
*/
public function handleException(Throwable $exception);

/**
* Handle the PHP shutdown event.
* @return void
*/
public function handleShutdown();
}
2 changes: 1 addition & 1 deletion src/Viserio/Contracts/Mail/GPGMailer.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public function sign($text): string;
*
* @throws \Exception
*
* @return string
* @return boolean
*/
public function verify($text, string $fingerprint): bool;
}
8 changes: 8 additions & 0 deletions src/Viserio/Contracts/StaticalProxy/AliasLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ public function load(string $alias): bool;

/**
* Removes an alias.
* @return void
*/
public function removeAlias();

Expand All @@ -42,6 +43,7 @@ public function resolveAlias(string $alias);
*
* @param string|string[] $patterns
* @param string|null $translation
* @return void
*/
public function aliasPattern($patterns, string $translation = null);

Expand All @@ -50,6 +52,7 @@ public function aliasPattern($patterns, string $translation = null);
*
* @param string $pattern
* @param string|null $translation
* @return void
*/
public function removeAliasPattern(string $pattern, string $translation = null);

Expand All @@ -58,6 +61,7 @@ public function removeAliasPattern(string $pattern, string $translation = null);
*
* @param string $class
* @param string $alias
* @return void
*/
public function aliasNamespace(string $class, string $alias);

Expand All @@ -72,11 +76,13 @@ public function resolveNamespaceAlias(string $alias);

/**
* Removes a namespace alias.
* @return void
*/
public function removeNamespaceAlias();

/**
* Register the loader on the auto-loader stack.
* @return void
*/
public function register();

Expand All @@ -89,13 +95,15 @@ public function isRegistered(): bool;

/**
* Unregisters the autoloader function.
* @return void
*/
public function unregister();

/**
* Set the registered aliases.
*
* @param array $aliases
* @return void
*/
public function setAliases(array $aliases);

Expand Down
6 changes: 6 additions & 0 deletions src/Viserio/Contracts/View/Virtuoso.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ public function yieldContent(string $section, string $default = ''): string;
*
* @param string $section
* @param string $content
* @return void
*/
public function startSection(string $section, string $content = '');

Expand All @@ -91,6 +92,7 @@ public function startSection(string $section, string $content = '');
*
* @param string $section
* @param string $content
* @return void
*/
public function inject(string $section, string $content);

Expand All @@ -116,21 +118,25 @@ public function appendSection(): string;

/**
* Clear all of the section contents.
* @return void
*/
public function clearSections();

/**
* Clear all of the section contents if done rendering.
* @return void
*/
public function clearSectionsIfDoneRendering();

/**
* Increment the rendering counter.
* @return void
*/
public function incrementRender();

/**
* Decrement the rendering counter.
* @return void
*/
public function decrementRender();

Expand Down
3 changes: 1 addition & 2 deletions src/Viserio/Mail/Mailer.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@
namespace Viserio\Mail;

use Closure;
use Exception;
use InvalidArgumentException;
use Narrowspark\Arr\StaticArr as Arr;
use Swift_Mailer;
use Swift_Mime_Message;
use Swift_Message;
use Swift_Mime_Message;
use Viserio\Contracts\{
Events\Traits\EventsAwareTrait,
Mail\Mailer as MailerContract,
Expand Down
2 changes: 1 addition & 1 deletion src/Viserio/Mail/Transport/Mandrill.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public function getKey(): string
*
* @param string $key
*
* @return string
* @return Mandrill
*/
public function setKey(string $key): Mandrill
{
Expand Down
6 changes: 3 additions & 3 deletions src/Viserio/Mail/Transport/Postmark.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public function getServerToken(): string
*
* @param string $serverToken
*
* @return string
* @return Postmark
*/
public function setServerToken(string $serverToken): Postmark
{
Expand All @@ -90,7 +90,7 @@ public function setServerToken(string $serverToken): Postmark
* Convert email dictionary with emails and names
* to array of emails with names.
*
* @param array $emails
* @param string[] $emails
*
* @return array
*/
Expand All @@ -115,7 +115,7 @@ protected function convertEmailsArray(array $emails): array
* @param Swift_Mime_Message $message
* @param string $mimeType
*
* @return \Swift_Mime_MimePart|null
* @return \Swift_Mime_MimeEntity|null
*/
protected function getMIMEPart(Swift_Mime_Message $message, $mimeType)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Viserio/Mail/Transport/Ses.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function __construct(SesClient $ses)
* @param \Swift_Mime_Message $message
* @param string[]|null $failedRecipients
*
* @return Log|null
* @return integer
*/
public function send(Swift_Mime_Message $message, &$failedRecipients = null)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Viserio/Mail/Transport/SparkPost.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public function getKey(): string
*
* @param string $key
*
* @return string
* @return SparkPost
*/
public function setKey(string $key): SparkPost
{
Expand Down
7 changes: 3 additions & 4 deletions src/Viserio/Mail/TransportManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@
namespace Viserio\Mail;

use Aws\Ses\SesClient;
use Interop\Container\ContainerInterface;
use Swift_SmtpTransport as SmtpTransport;
use Swift_MailTransport as MailTransport;
use Narrowspark\Arr\StaticArr as Arr;
use GuzzleHttp\Client as HttpClient;
use Narrowspark\Arr\StaticArr as Arr;
use Psr\Log\LoggerInterface;
use Swift_MailTransport as MailTransport;
use Swift_SmtpTransport as SmtpTransport;
use Viserio\Support\AbstractManager;
use Viserio\Mail\Transport\{
Log as LogTransport,
Expand Down
2 changes: 1 addition & 1 deletion src/Viserio/Queue/Connectors/SyncQueue.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
namespace Viserio\Queue\Connectors;

use Throwable;
use Viserio\Contracts\Queue\Job as JobContract;
use Viserio\Contracts\Exception\Exception\FatalThrowableError;
use Viserio\Contracts\Queue\Job as JobContract;
use Viserio\Queue\Jobs\SyncJob;

class SyncQueue extends AbstractQueue
Expand Down
4 changes: 2 additions & 2 deletions src/Viserio/StaticalProxy/StaticalProxy.php
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ protected static function resolveStaticalProxyInstance($name)
*
* @param string $name
*
* @return object
* @return MockInterface
*/
protected static function createFreshMockInstance(string $name)
{
Expand All @@ -168,7 +168,7 @@ protected static function createFreshMockInstance(string $name)
/**
* Create a fresh mock instance for the given class.
*
* @return object
* @return MockInterface
*/
protected static function createMock()
{
Expand Down

0 comments on commit e246d32

Please sign in to comment.