Showing 76 of 2,695 total issues
File InstallApp.php
has 400 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace REBELinBLUE\Deployer\Console\Commands;
use Illuminate\Config\Repository as ConfigRepository;
- Create a ticketCreate a ticket
Function submit
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
Uploader.prototype.submit = function() {
const self = this;
if (window.FormData && self._files) {
// build a FormData
- Create a ticketCreate a ticket
Function setProjectMembers
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
public function setProjectMembers(array $members, Project $project)
{
$sync = [];
// Attaching the members to the projects
- 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 getInstallInformation
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function getInstallInformation()
{
$this->header('Installation details');
$regions = $this->getTimezoneRegions();
- Create a ticketCreate a ticket
Project
has 22 functions (exceeds 20 allowed). Consider refactoring. Open
class Project extends Model implements HasPresenter
{
use SoftDeletes, BroadcastChanges, ProjectRelations;
const FINISHED = 0;
- Create a ticketCreate a ticket
Deployment
has 22 functions (exceeds 20 allowed). Consider refactoring. Open
class Deployment extends Model implements HasPresenter, RuntimeInterface
{
use SoftDeletes;
const COMPLETED = 0;
- Create a ticketCreate a ticket
File uploader.js
has 260 lines of code (exceeds 250 allowed). Consider refactoring. Open
// TODO: Convert to ES6
let iframeCount = 0;
function Uploader(options) {
if (!(this instanceof Uploader)) {
- Create a ticketCreate a ticket
Function updateDeployment
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
function updateDeployment(data) {
const container = $(`#deployment_${data.model.id}`);
if (container.length > 0) {
const deployment = new Deployment(data.model);
- Create a ticketCreate a ticket
Method handle
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function handle(EnvFile $writer, Requirements $requirements)
{
$this->line('');
$config = base_path('.env');
- Create a ticketCreate a ticket
Function save
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
public function save(array $input)
{
$path = base_path('.env');
$config = $this->filesystem->get($path);
- 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 15 (exceeds 5 allowed). Consider refactoring. Open
public function handle(Process $process, RefRepositoryInterface $repository)
{
$mirror_dir = $this->project->mirrorPath();
$this->project->refs()->delete();
- 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 updateDeployment
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
function updateDeployment(data) {
const container = $(`#deployment_${data.model.id}`);
if (container.length > 0) {
const deployment = new Deployment(data.model);
- 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 setup
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Uploader.prototype.setup = function() {
this.form = $(`<form method="post" enctype="multipart/form-data" target="" action="${this.settings.action}" />`);
this.iframe = newIframe();
this.form.attr('target', this.iframe.attr('name'));
- Create a ticketCreate a ticket
Method handle
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function handle(Dispatcher $dispatcher, Requirements $requirements, EnvFile $writer)
{
$this->line('');
if (!$this->checkCanInstall() || !$requirements->check($this)) {
- Create a ticketCreate a ticket
Method save
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function save(array $input)
{
$path = base_path('.env');
$config = $this->filesystem->get($path);
- Create a ticketCreate a ticket
Method shareFileCommands
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function shareFileCommands($release_dir, $shared_dir, $project_dir)
{
/** @var Collection $files */
$files = $this->deployment->project->sharedFiles;
if (!$files->count()) {
- Create a ticketCreate a ticket
Function handle
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public function handle()
{
$tmp_dir = storage_path('app/tmp');
// Clear out old SSH key files and archives
- 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 getTokens
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function getTokens(Server $server)
{
$releases_dir = $server->clean_path . '/releases';
$latest_release_dir = $releases_dir . '/' . $this->deployment->release_id;
$release_shared_dir = $server->clean_path . '/shared';
- Create a ticketCreate a ticket
Method getEmailInformation
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function getEmailInformation()
{
$this->header('Email details');
$email = [];
- Create a ticketCreate a ticket
Function handle
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public function handle(Dispatcher $dispatcher, Requirements $requirements, EnvFile $writer)
{
$this->line('');
if (!$this->checkCanInstall() || !$requirements->check($this)) {
- 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"