Showing 706 of 6,805 total issues
Method CopyMerge
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function CopyMerge($fromImg, $toX, $toY, $fromX, $fromY, $toWidth, $toHeight, $fromWidth = -1, $fromHeight = -1, $aMix = 100)
{
if ($aMix == 100) {
$this->CopyCanvasH(
$this->img,
Method GetBBoxTTF
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function GetBBoxTTF($aTxt, $aAngle = 0)
{
// Normalize the bounding box to become a minimum
// enscribing rectangle
Method LoadBkgImage
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function LoadBkgImage($aImgFormat = '', $aFile = '', $aImgStr = '')
{
if ($aImgStr != '') {
return Image::CreateFromString($aImgStr);
}
Method StrokeBoxedText2
has 12 arguments (exceeds 4 allowed). Consider refactoring. Open
$x,
$y,
$txt,
$dir = 0,
$fcolor = 'white',
Method StrokeBoxedText
has 12 arguments (exceeds 4 allowed). Consider refactoring. Open
$x,
$y,
$txt,
$dir = 0,
$fcolor = 'white',
Method ShadowRectangle
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function ShadowRectangle($xl, $yu, $xr, $yl, $fcolor = false, $shadow_width = 4, $shadow_color = 'darkgray', $useAlpha = true)
{
// This is complicated by the fact that we must also handle the case where
// the reactangle has no fill color
$xl = floor($xl);
Method SetFont
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function SetFont()
{
$numargs = func_num_args();
if ($numargs == 2 || $numargs == 3) {
$aFF = func_get_arg(0);
Method ApplyPlot
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function ApplyPlot($plot)
{
switch (get_class($plot)) {
case 'BarPlot':
$plot->Clear();
Method File
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function File($family, $style = FS_NORMAL, $font_path = null)
{
$fam = @$this->font_files[$family];
if (!$fam) {
Util\JpGraphError::RaiseL(25046, $family); //("Specified TTF font family (id=$family) is unknown or does not exist. Please note that TTF fonts are not distributed with JpGraph for copyright reasons. You can find the MS TTF WEB-fonts (arial, courier etc) for download at http://corefonts.sourceforge.net/");
Method GetPlotsYMinMax
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function GetPlotsYMinMax($bPlots)
{
$aPlots = array_filter($bPlots, function ($plot) {
//\Kint::dump($plot, $plot instanceof Plot\Plot);
return $plot instanceof Plot\Plot;
Method Stroke
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function Stroke($aImg, $aXScale, $aYScale)
{
assert($this->prect != null);
if ($this->dir == HORIZONTAL) {
if ($this->min === 'min') {
Method IntCalcTicks
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function IntCalcTicks($maxsteps, $min, $max, $a, $majend = true)
{
$diff = $max - $min;
if ($diff == 0) {
Util\JpGraphError::RaiseL(25075); //('Can\'t automatically determine ticks since min==max.');
Method GetXMinMax
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function GetXMinMax()
{
list($min, $ymin) = $this->plots[0]->Min();
list($max, $ymax) = $this->plots[0]->Max();
Method _doManualTickPos
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _doManualTickPos($aScale)
{
$n = safe_count($this->iManualTickPos);
$m = safe_count($this->iManualMinTickPos);
$doLbl = safe_count($this->iManualTickLabels) > 0;
Method doAutoScaleYAxis
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function doAutoScaleYAxis()
{
//Check if we should autoscale y-axis
if (!$this->yscale->IsSpecified() && safe_count($this->plots) > 0) {
list($min, $max) = $this->GetPlotsYMinMax($this->plots);
Function AddSliceToCSIM
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public function AddSliceToCSIM($i, $xc, $yc, $radius, $sa, $ea)
{
//Slice number, ellipse centre (x,y), height, width, start angle, end angle
while ($sa > 2 * M_PI) {
$sa = $sa - 2 * M_PI;
- 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 Add3DSliceToCSIM
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public function Add3DSliceToCSIM($i, $xc, $yc, $height, $width, $thick, $sa, $ea)
{
//Slice number, ellipse centre (x,y), height, width, start angle, end angle
$sa *= M_PI / 180;
- 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 Set
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public function Set($aLocale)
{
if (in_array($aLocale, array_keys($this->iDayAbb), true)) {
$this->iLocale = $aLocale;
- 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 Stream
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public function Stream($aFile = '')
{
$this->DoSupersampling();
$func = 'image' . $this->img_format;
- 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 SetLineStyle
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public function SetLineStyle($s)
{
if (is_numeric($s)) {
if ($s < 1 || $s > 4) {
Util\JpGraphError::RaiseL(25101, $s); //(" Illegal numeric argument to SetLineStyle(): ($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"