Showing 864 of 1,073 total issues
Method make
has 11 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function make(BatchRepository $repository,
string $id,
string $name,
int $totalJobs,
int $pendingJobs,
Method __construct
has 11 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function __construct($name = 'default', $backoff = 0, $memory = 128, $timeout = 60, $sleep = 3, $maxTries = 1,
$force = false, $stopWhenEmpty = false, $maxJobs = 0, $maxTime = 0, $rest = 0)
Method handle
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function handle()
{
if ($this->isProhibited() ||
! $this->confirmToProceed()) {
return Command::FAILURE;
Method handle
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function handle(ConnectionResolverInterface $connections)
{
$connection = $connections->connection($this->input->getOption('database'));
$schema = $connection->getSchemaBuilder();
$tables = collect($schema->getTables())
Method createAwsDynamoTable
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function createAwsDynamoTable(): void
{
$definition = [
'TableName' => $this->table,
'AttributeDefinitions' => [
Method operatorForWhere
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function operatorForWhere($key, $operator = null, $value = null)
{
if ($this->useAsCallable($key)) {
return $key;
}
Method many
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function many(array $keys)
{
if (count($keys) === 0) {
return [];
}
Method assertDispatchedWithChainOfObjects
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function assertDispatchedWithChainOfObjects($command, $expectedChain, $callback)
{
$chain = $expectedChain;
PHPUnit::assertTrue(
Consider simplifying this complex logical expression. Open
Open
if ($response instanceof PsrResponseInterface) {
$response = (new HttpFoundationFactory)->createResponse($response);
} elseif ($response instanceof Model && $response->wasRecentlyCreated) {
$response = new JsonResponse($response, 201);
} elseif ($response instanceof Stringable) {
Consider simplifying this complex logical expression. Open
Open
if (($databaseEngine === 'mysql' && version_compare($databaseVersion, '8.0.1', '>=')) ||
($databaseEngine === 'mariadb' && version_compare($databaseVersion, '10.6.0', '>=')) ||
($databaseEngine === 'pgsql' && version_compare($databaseVersion, '9.5', '>=')) ||
($databaseEngine === 'vitess' && version_compare($databaseVersion, '19.0', '>='))) {
return 'FOR UPDATE SKIP LOCKED';
Consider simplifying this complex logical expression. Open
Open
if (is_null($using) && (is_string($web) || is_array($web) || is_string($api) || is_array($api) || is_string($pages) || is_string($health)) || is_callable($then)) {
$using = $this->buildRoutingCallback($web, $api, $pages, $health, $apiPrefix, $then);
}
Method assertInvalid
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function assertInvalid($errors = null,
$errorBag = 'default',
$responseKey = 'errors')
{
if ($this->baseResponse->headers->get('Content-Type') === 'application/json') {
Method compileStatements
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function compileStatements($template)
{
preg_match_all('/\B@(@?\w+(?:::\w+)?)([ \t]*)(\( ( [\S\s]*? ) \))?/x', $template, $matches);
$offset = 0;
Method handle
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function handle()
{
$cipher = $this->option('cipher') ?: 'AES-256-CBC';
$key = $this->option('key');
Method createRedisClusterInstance
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function createRedisClusterInstance(array $servers, array $options)
{
$parameters = [
null,
array_values($servers),
Method assertDownload
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function assertDownload($filename = null)
{
$contentDisposition = explode(';', $this->headers->get('content-disposition', ''));
if (trim($contentDisposition[0]) !== 'attachment') {
Method transaction
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function transaction(Closure $callback, $attempts = 1)
{
for ($currentAttempt = 1; $currentAttempt <= $attempts; $currentAttempt++) {
$this->beginTransaction();
Method decrement
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function decrement($key, $value = 1)
{
try {
$response = $this->dynamo->updateItem([
'TableName' => $this->table,
Method add
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function add($key, $value, $seconds)
{
try {
$this->dynamo->putItem([
'TableName' => $this->table,
Method setUpRedis
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function setUpRedis()
{
if (! extension_loaded('redis')) {
$this->markTestSkipped('The redis extension is not installed. Please install the extension to enable '.__CLASS__);
}