Showing 59 of 59 total issues
Method prepare
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function prepare()
{
$matches = null;
if (Type::determinePickle($this->path, $matches) < 1) {
throw new Exception('Not a pickle git URI');
Method configure
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function configure()
{
parent::configure();
$this
Function rebuildPickleParts
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
protected function rebuildPickleParts($pickleSection, array $dlls_add, array $dlls_del = [])
{
$lines = explode("\n", $pickleSection);
$new = [];
- 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 appendPkgConfigureOptions
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
protected function appendPkgConfigureOptions(&$configureOptions)
{
$opt = $this->pkg->getConfigureOptions();
if (isset($opt[$this->pkg->getName()])) {
$extEnableOption = $opt[$this->pkg->getName()];
- 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 download
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function download($url)
{
$output = $this->output;
$progress = $this->progress;
Method getInfoFromConfigureLog
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function getInfoFromConfigureLog()
{
$info = [
'thread_safe' => null,
'compiler' => null,
Function copyFiles
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
private function copyFiles()
{
$DLLs = glob($this->tempDir . '/*.dll');
$this->extDll = [];
foreach ($DLLs as $dll) {
- 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 fetchArg
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function fetchArg($which, $config)
{
$next = 0;
$options = [];
Method findInLinks
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function findInLinks($url, $toFind)
{
$page = @file_get_contents($url);
$opts = [
'http' => [
Method __construct
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function __construct(Interfaces\Package $package)
{
$dir = $package->getSourceDir();
$path = $package->getSourceDir() . '/.gitignore';
$this->excluded = glob("{$dir}/.git/*");
Method getInfoFromPecl
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function getInfoFromPecl()
{
$baseUrl = WebsiteFactory::getWebsite()->getBaseUrl();
$url = $baseUrl . '/get/' . $this->extName;
$headers = get_headers($url);
Function getConfigureOptions
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function getConfigureOptions()
{
$options = [];
if (defined('PHP_WINDOWS_VERSION_MAJOR')) {
- 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 getInfoFromPecl
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
private function getInfoFromPecl()
{
$baseUrl = WebsiteFactory::getWebsite()->getBaseUrl();
$url = $baseUrl . '/get/' . $this->extName;
$headers = get_headers($url);
- 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 getIniPathFromPhpInfo
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
protected function getIniPathFromPhpInfo($info)
{
$iniPath = '';
foreach ($info as $s) {
- 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 prepare
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
protected function prepare()
{
$engine = Engine::factory();
$matches = null;
if (Type::determinePecl($this->path, $matches) < 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
Function findInLinks
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private function findInLinks($url, $toFind)
{
$page = @file_get_contents($url);
$opts = [
'http' => [
- 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 sourceInstall
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
protected function sourceInstall($package, InputInterface $input, OutputInterface $output, $optionsValue = [], $force_opts = ''): bool
Function determine
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public static function determine($path, $remote)
{
if (substr($path, -4) == '.tgz' || substr($path, -7) == '.tar.gz') {
return self::TGZ;
}
- 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 readPackage
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public static function readPackage($path, $noconvert)
{
$jsonLoader = new Package\Util\JSON\Loader(new Package\Util\Loader());
$package = null;
- 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 cleanup
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function cleanup()
{
if (is_dir($this->tempDir)) {
$iterator = new RecursiveIteratorIterator(
new RecursiveDirectoryIterator(
- 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"