Showing 76 of 2,695 total issues
Function getInstallInformation
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
private function getInstallInformation()
{
$this->header('Installation details');
$regions = $this->getTimezoneRegions();
- Read upRead up
- Create a ticketCreate a ticket
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method index
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
UserRepositoryInterface $user,
TemplateRepositoryInterface $templateRepository,
GroupRepositoryInterface $groupRepository,
Request $request,
ViewFactory $view,
- Create a ticketCreate a ticket
Function update
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function update()
{
$prev = base_path('.env.prev');
$current = base_path('.env');
$dist = base_path('.env.dist');
- Read upRead up
- Create a ticketCreate a ticket
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function viewData
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
viewData() {
const data = this.model.toJSON();
let css = 'info';
let icon = 'clock-o';
- Read upRead up
- Create a ticketCreate a ticket
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method __construct
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
UserRepositoryInterface $repository,
Google2FA $google2fa,
ViewFactory $view,
Translator $translator,
Redirector $redirector,
- Create a ticketCreate a ticket
Method __construct
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
ConfigRepository $config,
Filesystem $filesystem,
TokenGeneratorInterface $tokenGenerator,
ProcessBuilder $builder,
ValidationFactory $validator,
- Create a ticketCreate a ticket
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
CommandRepositoryInterface $commandRepository,
TemplateRepositoryInterface $templateRepository,
ViewFactory $view,
Translator $translator,
UrlGenerator $url
- Create a ticketCreate a ticket
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
JWTAuth $jwt,
Dispatcher $dispatcher,
Redirector $redirector,
ResponseFactory $response,
AuthFactory $auth
- Create a ticketCreate a ticket
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function __construct(Deployment $deployment, ServerLog $log, $local_file, $remote_file, $key)
- Create a ticketCreate a ticket
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
ProjectRepositoryInterface $projectRepository,
DeploymentRepositoryInterface $deploymentRepository,
ViewFactory $view,
Translator $translator,
Redirector $redirect
- Create a ticketCreate a ticket
Method askAndValidate
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function askAndValidate($question, array $choices, $validator, $default = null, $secret = false)
- Create a ticketCreate a ticket
Method listing
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function listing($target_id, $action, Translator $translator, ViewFactory $view, UrlGenerator $url)
- Create a ticketCreate a ticket
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Process $process,
ConfigRepository $config,
RedisManager $redis,
QueueManager $queue,
Filesystem $filesystem
- Create a ticketCreate a ticket
Function getCommitUrlAttribute
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function getCommitUrlAttribute()
{
if ($this->commit !== self::LOADING) {
$info = $this->project->accessDetails();
if (isset($info['domain']) && isset($info['reference'])) {
- Read upRead up
- Create a ticketCreate a ticket
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function handlePush
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function handlePush()
{
// Get the branch if it is the request, otherwise deploy the default branch
$branch = $this->request->has('branch') ? $this->request->get('branch') : null;
- Read upRead up
- Create a ticketCreate a ticket
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function getRepositoryUrlAttribute
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function getRepositoryUrlAttribute()
{
$info = $this->accessDetails();
if (isset($info['domain']) && isset($info['reference'])) {
- Read upRead up
- Create a ticketCreate a ticket
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function handle
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function handle()
{
$period = [];
$minute = (int) (Carbon::now()->format('i'));
- Read upRead up
- Create a ticketCreate a ticket
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Avoid too many return
statements within this method. Open
return 'primary';
- Create a ticketCreate a ticket
Avoid too many return
statements within this method. Open
return $this->translator->trans('deployments.failed');
- Create a ticketCreate a ticket
Avoid too many return
statements within this method. Open
return $this->process->setScript($script, $tokens, Process::DIRECT_INPUT);
- Create a ticketCreate a ticket