Showing 17 of 126 total issues
File PackageInstaller.php
has 316 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/*
* This file is part of SeAT
*
Method alt_stat
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
function alt_stat($file)
{
clearstatcache();
$ss = @stat($file);
Function findSeatInstallation
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
public function findSeatInstallation(): string
{
$fs = new Filesystem();
- Read upRead up
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 configureMySql
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function configureMySql()
{
$mysql = new MySql($this->io);
Method configure
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function configure(string $path)
{
$this->io->text('Writing the Nginx Server block configuration');
// Get the OS that will be used to determine where the config will be
Function checkCommandRequirements
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public function checkCommandRequirements(array $commands = null)
{
// Map the executables from the function argument if needed
if ($commands)
- Read upRead up
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 checkPhpRequirements
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public function checkPhpRequirements(): bool
{
if (version_compare(phpversion(), '7.1', '<')) {
- Read upRead up
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 execute
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function execute(InputInterface $input, OutputInterface $output)
{
// Bind the input and output for later use in other methods.
$this->io = new SymfonyStyle($input, $output);
Method configure
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function configure(string $path)
{
$this->io->text('Writing the Apache Virtual Host configuration');
Function getOperatingSystem
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public function getOperatingSystem(): array
{
$fs = new Filesystem();
- Read upRead up
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 checkPermissions
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function checkPermissions()
{
$this->io->text('Checking filesystem permissions');
Method execute
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function execute(InputInterface $input, OutputInterface $output)
{
$this->io = new SymfonyStyle($input, $output);
$this->io->title('SeAT Installer');
Function configure
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function configure(string $path)
{
$this->io->text('Writing the Nginx Server block configuration');
// Get the OS that will be used to determine where the config will be
- Read upRead up
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 checkPermissions
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
protected function checkPermissions()
{
$this->io->text('Checking filesystem permissions');
- Read upRead up
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 configureMySql
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
protected function configureMySql()
{
$mysql = new MySql($this->io);
- Read upRead up
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 configure
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function configure(string $path)
{
$this->io->text('Writing the Apache Virtual Host configuration');
- Read upRead up
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 getWebserver
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function getWebserver()
{
$fs = new Filesystem();
- Read upRead up
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"