Issues (1377)

Security Analysis    no request data  

This project does not seem to handle request data directly as such no vulnerable execution paths were found.

  Cross-Site Scripting
Cross-Site Scripting enables an attacker to inject code into the response of a web-request that is viewed by other users. It can for example be used to bypass access controls, or even to take over other users' accounts.
  File Exposure
File Exposure allows an attacker to gain access to local files that he should not be able to access. These files can for example include database credentials, or other configuration files.
  File Manipulation
File Manipulation enables an attacker to write custom data to files. This potentially leads to injection of arbitrary code on the server.
  Object Injection
Object Injection enables an attacker to inject an object into PHP code, and can lead to arbitrary code execution, file exposure, or file manipulation attacks.
  Code Injection
Code Injection enables an attacker to execute arbitrary code on the server.
  Response Splitting
Response Splitting can be used to send arbitrary responses.
  File Inclusion
File Inclusion enables an attacker to inject custom files into PHP's file loading mechanism, either explicitly passed to include, or for example via PHP's auto-loading mechanism.
  Command Injection
Command Injection enables an attacker to inject a shell command that is execute with the privileges of the web-server. This can be used to expose sensitive data, or gain access of your server.
  SQL Injection
SQL Injection enables an attacker to execute arbitrary SQL code on your database server gaining access to user data, or manipulating user data.
  XPath Injection
XPath Injection enables an attacker to modify the parts of XML document that are read. If that XML document is for example used for authentication, this can lead to further vulnerabilities similar to SQL Injection.
  LDAP Injection
LDAP Injection enables an attacker to inject LDAP statements potentially granting permission to run unauthorized queries, or modify content inside the LDAP tree.
  Header Injection
  Other Vulnerability
This category comprises other attack vectors such as manipulating the PHP runtime, loading custom extensions, freezing the runtime, or similar.
  Regex Injection
Regex Injection enables an attacker to execute arbitrary code in your PHP process.
  XML Injection
XML Injection enables an attacker to read files on your local filesystem including configuration files, or can be abused to freeze your web-server process.
  Variable Injection
Variable Injection enables an attacker to overwrite program variables with custom data, and can lead to further vulnerabilities.
Unfortunately, the security analysis is currently not available for your project. If you are a non-commercial open-source project, please contact support to gain access.

API/Chart/PlotOptions/HighchartsSolidgauge.php (6 issues)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
3
/**
4
 * This file is part of the highcharts-bundle package.
5
 *
6
 * (c) 2017 WEBEWEB
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions;
13
14
use JsonSerializable;
15
use WBW\Library\Core\Utility\Argument\ArrayUtility;
16
17
/**
18
 * Highcharts solidgauge.
19
 *
20
 * @author webeweb <https://github.com/webeweb/>
21
 * @package WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions
22
 * @version 5.0.14
23
 * @final
24
 */
25
final class HighchartsSolidgauge implements JsonSerializable {
26
27
    /**
28
     * Animation.
29
     *
30
     * @var boolean
31
     */
32
    private $animation = true;
33
34
    /**
35
     * Animation limit.
36
     *
37
     * @var integer
38
     */
39
    private $animationLimit;
40
41
    /**
42
     * Class name.
43
     *
44
     * @var string
45
     * @since 5.0.0
46
     */
47
    private $className;
48
49
    /**
50
     * Color index.
51
     *
52
     * @var integer
53
     * @since 5.0.0
54
     */
55
    private $colorIndex;
56
57
    /**
58
     * Cursor.
59
     *
60
     * @var string
61
     */
62
    private $cursor;
63
64
    /**
65
     * Data labels.
66
     *
67
     * @var array
68
     * @since 2.3.0
69
     */
70
    private $dataLabels;
71
72
    /**
73
     * Description.
74
     *
75
     * @var string
76
     * @since 5.0.0
77
     */
78
    private $description;
79
80
    /**
81
     * Enable mouse tracking.
82
     *
83
     * @var boolean
84
     */
85
    private $enableMouseTracking = true;
86
87
    /**
88
     * Events.
89
     *
90
     * @var \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Solidgauge\HighchartsEvents
91
     */
92
    private $events;
93
94
    /**
95
     * Expose element to a11y.
96
     *
97
     * @var boolean
98
     * @since 5.0.12
99
     */
100
    private $exposeElementToA11y;
101
102
    /**
103
     * Find nearest point by.
104
     *
105
     * @var string
106
     * @since 5.0.10
107
     */
108
    private $findNearestPointBy;
109
110
    /**
111
     * Get extremes from all.
112
     *
113
     * @var boolean
114
     * @since 4.1.6
115
     */
116
    private $getExtremesFromAll = false;
117
118
    /**
119
     * Keys.
120
     *
121
     * @var array
122
     * @since 4.1.6
123
     */
124
    private $keys;
125
126
    /**
127
     * Linecap.
128
     *
129
     * @var string
130
     * @since 4.2.2
131
     */
132
    private $linecap = "round";
133
134
    /**
135
     * Overshoot.
136
     *
137
     * @var integer
138
     * @since 3.0.10
139
     */
140
    private $overshoot = 0;
141
142
    /**
143
     * Point.
144
     *
145
     * @var \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Solidgauge\HighchartsPoint
146
     */
147
    private $point;
148
149
    /**
150
     * Point description formatter.
151
     *
152
     * @var string
153
     * @since 5.0.12
154
     */
155
    private $pointDescriptionFormatter;
156
157
    /**
158
     * Rounded.
159
     *
160
     * @var boolean
161
     * @since 5.0.8
162
     */
163
    private $rounded = false;
164
165
    /**
166
     * Selected.
167
     *
168
     * @var boolean
169
     * @since 1.2.0
170
     */
171
    private $selected = false;
172
173
    /**
174
     * Show checkbox.
175
     *
176
     * @var boolean
177
     * @since 1.2.0
178
     */
179
    private $showCheckbox = false;
180
181
    /**
182
     * Show in legend.
183
     *
184
     * @var boolean
185
     * @since 2.3.0
186
     */
187
    private $showInLegend;
188
189
    /**
190
     * Skip keyboard navigation.
191
     *
192
     * @var boolean
193
     * @since 5.0.12
194
     */
195
    private $skipKeyboardNavigation;
196
197
    /**
198
     * Sticky tracking.
199
     *
200
     * @var boolean
201
     * @since 2.0
202
     */
203
    private $stickyTracking = true;
204
205
    /**
206
     * Threshold.
207
     *
208
     * @var integer
209
     * @since 5.0.3
210
     */
211
    private $threshold;
212
213
    /**
214
     * Tooltip.
215
     *
216
     * @var array
217
     * @since 2.3
218
     */
219
    private $tooltip;
220
221
    /**
222
     * Visible.
223
     *
224
     * @var boolean
225
     */
226
    private $visible = true;
227
228
    /**
229
     * Wrap.
230
     *
231
     * @var boolean
232
     * @since 3.0
233
     */
234
    private $wrap = true;
235
236
    /**
237
     * Constructor.
238
     *
239
     * @param boolean $ignoreDefaultValues Ignore the default values.
240
     */
241
    public function __construct($ignoreDefaultValues = true) {
242
        if (true === $ignoreDefaultValues) {
243
            $this->clear();
244
        }
245
    }
246
247
    /**
248
     * Clear.
249
     *
250
     * @return void
251
     */
252
    public function clear() {
253
254
        // Clear the animation.
255
        $this->animation = null;
256
257
        // Clear the animation limit.
258
        $this->animationLimit = null;
259
260
        // Clear the class name.
261
        $this->className = null;
262
263
        // Clear the color index.
264
        $this->colorIndex = null;
265
266
        // Clear the cursor.
267
        $this->cursor = null;
268
269
        // Clear the data labels.
270
        $this->dataLabels = null;
0 ignored issues
show
Documentation Bug introduced by
It seems like null of type null is incompatible with the declared type array of property $dataLabels.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
271
272
        // Clear the description.
273
        $this->description = null;
274
275
        // Clear the enable mouse tracking.
276
        $this->enableMouseTracking = null;
277
278
        // Clear the events.
279
        if (null !== $this->events) {
280
            $this->events->clear();
281
        }
282
283
        // Clear the expose element to a11y.
284
        $this->exposeElementToA11y = null;
285
286
        // Clear the find nearest point by.
287
        $this->findNearestPointBy = null;
288
289
        // Clear the get extremes from all.
290
        $this->getExtremesFromAll = null;
291
292
        // Clear the keys.
293
        $this->keys = null;
0 ignored issues
show
Documentation Bug introduced by
It seems like null of type null is incompatible with the declared type array of property $keys.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
294
295
        // Clear the linecap.
296
        $this->linecap = null;
297
298
        // Clear the overshoot.
299
        $this->overshoot = null;
300
301
        // Clear the point.
302
        if (null !== $this->point) {
303
            $this->point->clear();
304
        }
305
306
        // Clear the point description formatter.
307
        $this->pointDescriptionFormatter = null;
308
309
        // Clear the rounded.
310
        $this->rounded = null;
311
312
        // Clear the selected.
313
        $this->selected = null;
314
315
        // Clear the show checkbox.
316
        $this->showCheckbox = null;
317
318
        // Clear the show in legend.
319
        $this->showInLegend = null;
320
321
        // Clear the skip keyboard navigation.
322
        $this->skipKeyboardNavigation = null;
323
324
        // Clear the sticky tracking.
325
        $this->stickyTracking = null;
326
327
        // Clear the threshold.
328
        $this->threshold = null;
329
330
        // Clear the tooltip.
331
        $this->tooltip = null;
0 ignored issues
show
Documentation Bug introduced by
It seems like null of type null is incompatible with the declared type array of property $tooltip.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
332
333
        // Clear the visible.
334
        $this->visible = null;
335
336
        // Clear the wrap.
337
        $this->wrap = null;
338
    }
339
340
    /**
341
     * Get the animation.
342
     *
343
     * @return boolean Returns the animation.
344
     */
345
    public function getAnimation() {
346
        return $this->animation;
347
    }
348
349
    /**
350
     * Get the animation limit.
351
     *
352
     * @return integer Returns the animation limit.
353
     */
354
    public function getAnimationLimit() {
355
        return $this->animationLimit;
356
    }
357
358
    /**
359
     * Get the class name.
360
     *
361
     * @return string Returns the class name.
362
     */
363
    public function getClassName() {
364
        return $this->className;
365
    }
366
367
    /**
368
     * Get the color index.
369
     *
370
     * @return integer Returns the color index.
371
     */
372
    public function getColorIndex() {
373
        return $this->colorIndex;
374
    }
375
376
    /**
377
     * Get the cursor.
378
     *
379
     * @return string Returns the cursor.
380
     */
381
    public function getCursor() {
382
        return $this->cursor;
383
    }
384
385
    /**
386
     * Get the data labels.
387
     *
388
     * @return array Returns the data labels.
389
     */
390
    public function getDataLabels() {
391
        return $this->dataLabels;
392
    }
393
394
    /**
395
     * Get the description.
396
     *
397
     * @return string Returns the description.
398
     */
399
    public function getDescription() {
400
        return $this->description;
401
    }
402
403
    /**
404
     * Get the enable mouse tracking.
405
     *
406
     * @return boolean Returns the enable mouse tracking.
407
     */
408
    public function getEnableMouseTracking() {
409
        return $this->enableMouseTracking;
410
    }
411
412
    /**
413
     * Get the events.
414
     *
415
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Solidgauge\HighchartsEvents Returns the events.
416
     */
417
    public function getEvents() {
418
        return $this->events;
419
    }
420
421
    /**
422
     * Get the expose element to a11y.
423
     *
424
     * @return boolean Returns the expose element to a11y.
425
     */
426
    public function getExposeElementToA11y() {
427
        return $this->exposeElementToA11y;
428
    }
429
430
    /**
431
     * Get the find nearest point by.
432
     *
433
     * @return string Returns the find nearest point by.
434
     */
435
    public function getFindNearestPointBy() {
436
        return $this->findNearestPointBy;
437
    }
438
439
    /**
440
     * Get the get extremes from all.
441
     *
442
     * @return boolean Returns the get extremes from all.
443
     */
444
    public function getGetExtremesFromAll() {
445
        return $this->getExtremesFromAll;
446
    }
447
448
    /**
449
     * Get the keys.
450
     *
451
     * @return array Returns the keys.
452
     */
453
    public function getKeys() {
454
        return $this->keys;
455
    }
456
457
    /**
458
     * Get the linecap.
459
     *
460
     * @return string Returns the linecap.
461
     */
462
    public function getLinecap() {
463
        return $this->linecap;
464
    }
465
466
    /**
467
     * Get the overshoot.
468
     *
469
     * @return integer Returns the overshoot.
470
     */
471
    public function getOvershoot() {
472
        return $this->overshoot;
473
    }
474
475
    /**
476
     * Get the point.
477
     *
478
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Solidgauge\HighchartsPoint Returns the point.
479
     */
480
    public function getPoint() {
481
        return $this->point;
482
    }
483
484
    /**
485
     * Get the point description formatter.
486
     *
487
     * @return string Returns the point description formatter.
488
     */
489
    public function getPointDescriptionFormatter() {
490
        return $this->pointDescriptionFormatter;
491
    }
492
493
    /**
494
     * Get the rounded.
495
     *
496
     * @return boolean Returns the rounded.
497
     */
498
    public function getRounded() {
499
        return $this->rounded;
500
    }
501
502
    /**
503
     * Get the selected.
504
     *
505
     * @return boolean Returns the selected.
506
     */
507
    public function getSelected() {
508
        return $this->selected;
509
    }
510
511
    /**
512
     * Get the show checkbox.
513
     *
514
     * @return boolean Returns the show checkbox.
515
     */
516
    public function getShowCheckbox() {
517
        return $this->showCheckbox;
518
    }
519
520
    /**
521
     * Get the show in legend.
522
     *
523
     * @return boolean Returns the show in legend.
524
     */
525
    public function getShowInLegend() {
526
        return $this->showInLegend;
527
    }
528
529
    /**
530
     * Get the skip keyboard navigation.
531
     *
532
     * @return boolean Returns the skip keyboard navigation.
533
     */
534
    public function getSkipKeyboardNavigation() {
535
        return $this->skipKeyboardNavigation;
536
    }
537
538
    /**
539
     * Get the sticky tracking.
540
     *
541
     * @return boolean Returns the sticky tracking.
542
     */
543
    public function getStickyTracking() {
544
        return $this->stickyTracking;
545
    }
546
547
    /**
548
     * Get the threshold.
549
     *
550
     * @return integer Returns the threshold.
551
     */
552
    public function getThreshold() {
553
        return $this->threshold;
554
    }
555
556
    /**
557
     * Get the tooltip.
558
     *
559
     * @return array Returns the tooltip.
560
     */
561
    public function getTooltip() {
562
        return $this->tooltip;
563
    }
564
565
    /**
566
     * Get the visible.
567
     *
568
     * @return boolean Returns the visible.
569
     */
570
    public function getVisible() {
571
        return $this->visible;
572
    }
573
574
    /**
575
     * Get the wrap.
576
     *
577
     * @return boolean Returns the wrap.
578
     */
579
    public function getWrap() {
580
        return $this->wrap;
581
    }
582
583
    /**
584
     * Serialize this instance.
585
     *
586
     * @return array Returns an array representing this instance.
587
     */
588
    public function jsonSerialize() {
589
        return $this->toArray();
590
    }
591
592
    /**
593
     * Create a new events.
594
     *
595
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Solidgauge\HighchartsEvents Returns the events.
596
     */
597
    public function newEvents() {
598
        $this->events = new \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Solidgauge\HighchartsEvents();
599
        return $this->events;
600
    }
601
602
    /**
603
     * Create a new point.
604
     *
605
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Solidgauge\HighchartsPoint Returns the point.
606
     */
607
    public function newPoint() {
608
        $this->point = new \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Solidgauge\HighchartsPoint();
609
        return $this->point;
610
    }
611
612
    /**
613
     * Set the animation.
614
     *
615
     * @param boolean $animation The animation.
616
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsSolidgauge Returns the highcharts solidgauge.
617
     */
618
    public function setAnimation($animation) {
619
        $this->animation = $animation;
620
        return $this;
621
    }
622
623
    /**
624
     * Set the animation limit.
625
     *
626
     * @param integer $animationLimit The animation limit.
627
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsSolidgauge Returns the highcharts solidgauge.
628
     */
629
    public function setAnimationLimit($animationLimit) {
630
        $this->animationLimit = $animationLimit;
631
        return $this;
632
    }
633
634
    /**
635
     * Set the class name.
636
     *
637
     * @param string $className The class name.
638
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsSolidgauge Returns the highcharts solidgauge.
639
     */
640
    public function setClassName($className) {
641
        $this->className = $className;
642
        return $this;
643
    }
644
645
    /**
646
     * Set the color index.
647
     *
648
     * @param integer $colorIndex The color index.
649
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsSolidgauge Returns the highcharts solidgauge.
650
     */
651
    public function setColorIndex($colorIndex) {
652
        $this->colorIndex = $colorIndex;
653
        return $this;
654
    }
655
656
    /**
657
     * Set the cursor.
658
     *
659
     * @param string $cursor The cursor.
660
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsSolidgauge Returns the highcharts solidgauge.
661
     */
662
    public function setCursor($cursor) {
663
        switch ($cursor) {
664
            case null:
665
            case "crosshair":
666
            case "default":
667
            case "help":
668
            case "none":
669
            case "pointer":
670
            $this->cursor = $cursor;
671
            break;
672
        }
673
        return $this;
674
    }
675
676
    /**
677
     * Set the data labels.
678
     *
679
     * @param array $dataLabels The data labels.
680
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsSolidgauge Returns the highcharts solidgauge.
681
     */
682
    public function setDataLabels(array $dataLabels = null) {
683
        $this->dataLabels = $dataLabels;
0 ignored issues
show
Documentation Bug introduced by
It seems like $dataLabels can be null. However, the property $dataLabels is declared as array. Maybe change the type of the property to array|null or add a type check?

Our type inference engine has found an assignment of a scalar value (like a string, an integer or null) to a property which is an array.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property.

To type hint that a parameter can be either an array or null, you can set a type hint of array and a default value of null. The PHP interpreter will then accept both an array or null for that parameter.

function aContainsB(array $needle = null, array  $haystack) {
    if (!$needle) {
        return false;
    }

    return array_intersect($haystack, $needle) == $haystack;
}

The function can be called with either null or an array for the parameter $needle but will only accept an array as $haystack.

Loading history...
684
        return $this;
685
    }
686
687
    /**
688
     * Set the description.
689
     *
690
     * @param string $description The description.
691
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsSolidgauge Returns the highcharts solidgauge.
692
     */
693
    public function setDescription($description) {
694
        $this->description = $description;
695
        return $this;
696
    }
697
698
    /**
699
     * Set the enable mouse tracking.
700
     *
701
     * @param boolean $enableMouseTracking The enable mouse tracking.
702
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsSolidgauge Returns the highcharts solidgauge.
703
     */
704
    public function setEnableMouseTracking($enableMouseTracking) {
705
        $this->enableMouseTracking = $enableMouseTracking;
706
        return $this;
707
    }
708
709
    /**
710
     * Set the events.
711
     *
712
     * @param \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Solidgauge\HighchartsEvents $events The events.
713
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsSolidgauge Returns the highcharts solidgauge.
714
     */
715
    public function setEvents(\WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Solidgauge\HighchartsEvents $events = null) {
716
        $this->events = $events;
717
        return $this;
718
    }
719
720
    /**
721
     * Set the expose element to a11y.
722
     *
723
     * @param boolean $exposeElementToA11y The expose element to a11y.
724
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsSolidgauge Returns the highcharts solidgauge.
725
     */
726
    public function setExposeElementToA11y($exposeElementToA11y) {
727
        $this->exposeElementToA11y = $exposeElementToA11y;
728
        return $this;
729
    }
730
731
    /**
732
     * Set the find nearest point by.
733
     *
734
     * @param string $findNearestPointBy The find nearest point by.
735
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsSolidgauge Returns the highcharts solidgauge.
736
     */
737
    public function setFindNearestPointBy($findNearestPointBy) {
738
        switch ($findNearestPointBy) {
739
            case "x":
740
            case "xy":
741
            $this->findNearestPointBy = $findNearestPointBy;
742
            break;
743
        }
744
        return $this;
745
    }
746
747
    /**
748
     * Set the get extremes from all.
749
     *
750
     * @param boolean $getExtremesFromAll The get extremes from all.
751
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsSolidgauge Returns the highcharts solidgauge.
752
     */
753
    public function setGetExtremesFromAll($getExtremesFromAll) {
754
        $this->getExtremesFromAll = $getExtremesFromAll;
755
        return $this;
756
    }
757
758
    /**
759
     * Set the keys.
760
     *
761
     * @param array $keys The keys.
762
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsSolidgauge Returns the highcharts solidgauge.
763
     */
764
    public function setKeys(array $keys = null) {
765
        $this->keys = $keys;
0 ignored issues
show
Documentation Bug introduced by
It seems like $keys can be null. However, the property $keys is declared as array. Maybe change the type of the property to array|null or add a type check?

Our type inference engine has found an assignment of a scalar value (like a string, an integer or null) to a property which is an array.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property.

To type hint that a parameter can be either an array or null, you can set a type hint of array and a default value of null. The PHP interpreter will then accept both an array or null for that parameter.

function aContainsB(array $needle = null, array  $haystack) {
    if (!$needle) {
        return false;
    }

    return array_intersect($haystack, $needle) == $haystack;
}

The function can be called with either null or an array for the parameter $needle but will only accept an array as $haystack.

Loading history...
766
        return $this;
767
    }
768
769
    /**
770
     * Set the linecap.
771
     *
772
     * @param string $linecap The linecap.
773
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsSolidgauge Returns the highcharts solidgauge.
774
     */
775
    public function setLinecap($linecap) {
776
        switch ($linecap) {
777
            case "round":
778
            case "square":
779
            $this->linecap = $linecap;
780
            break;
781
        }
782
        return $this;
783
    }
784
785
    /**
786
     * Set the overshoot.
787
     *
788
     * @param integer $overshoot The overshoot.
789
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsSolidgauge Returns the highcharts solidgauge.
790
     */
791
    public function setOvershoot($overshoot) {
792
        $this->overshoot = $overshoot;
793
        return $this;
794
    }
795
796
    /**
797
     * Set the point.
798
     *
799
     * @param \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Solidgauge\HighchartsPoint $point The point.
800
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsSolidgauge Returns the highcharts solidgauge.
801
     */
802
    public function setPoint(\WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Solidgauge\HighchartsPoint $point = null) {
803
        $this->point = $point;
804
        return $this;
805
    }
806
807
    /**
808
     * Set the point description formatter.
809
     *
810
     * @param string $pointDescriptionFormatter The point description formatter.
811
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsSolidgauge Returns the highcharts solidgauge.
812
     */
813
    public function setPointDescriptionFormatter($pointDescriptionFormatter) {
814
        $this->pointDescriptionFormatter = $pointDescriptionFormatter;
815
        return $this;
816
    }
817
818
    /**
819
     * Set the rounded.
820
     *
821
     * @param boolean $rounded The rounded.
822
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsSolidgauge Returns the highcharts solidgauge.
823
     */
824
    public function setRounded($rounded) {
825
        $this->rounded = $rounded;
826
        return $this;
827
    }
828
829
    /**
830
     * Set the selected.
831
     *
832
     * @param boolean $selected The selected.
833
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsSolidgauge Returns the highcharts solidgauge.
834
     */
835
    public function setSelected($selected) {
836
        $this->selected = $selected;
837
        return $this;
838
    }
839
840
    /**
841
     * Set the show checkbox.
842
     *
843
     * @param boolean $showCheckbox The show checkbox.
844
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsSolidgauge Returns the highcharts solidgauge.
845
     */
846
    public function setShowCheckbox($showCheckbox) {
847
        $this->showCheckbox = $showCheckbox;
848
        return $this;
849
    }
850
851
    /**
852
     * Set the show in legend.
853
     *
854
     * @param boolean $showInLegend The show in legend.
855
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsSolidgauge Returns the highcharts solidgauge.
856
     */
857
    public function setShowInLegend($showInLegend) {
858
        $this->showInLegend = $showInLegend;
859
        return $this;
860
    }
861
862
    /**
863
     * Set the skip keyboard navigation.
864
     *
865
     * @param boolean $skipKeyboardNavigation The skip keyboard navigation.
866
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsSolidgauge Returns the highcharts solidgauge.
867
     */
868
    public function setSkipKeyboardNavigation($skipKeyboardNavigation) {
869
        $this->skipKeyboardNavigation = $skipKeyboardNavigation;
870
        return $this;
871
    }
872
873
    /**
874
     * Set the sticky tracking.
875
     *
876
     * @param boolean $stickyTracking The sticky tracking.
877
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsSolidgauge Returns the highcharts solidgauge.
878
     */
879
    public function setStickyTracking($stickyTracking) {
880
        $this->stickyTracking = $stickyTracking;
881
        return $this;
882
    }
883
884
    /**
885
     * Set the threshold.
886
     *
887
     * @param integer $threshold The threshold.
888
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsSolidgauge Returns the highcharts solidgauge.
889
     */
890
    public function setThreshold($threshold) {
891
        $this->threshold = $threshold;
892
        return $this;
893
    }
894
895
    /**
896
     * Set the tooltip.
897
     *
898
     * @param array $tooltip The tooltip.
899
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsSolidgauge Returns the highcharts solidgauge.
900
     */
901
    public function setTooltip(array $tooltip = null) {
902
        $this->tooltip = $tooltip;
0 ignored issues
show
Documentation Bug introduced by
It seems like $tooltip can be null. However, the property $tooltip is declared as array. Maybe change the type of the property to array|null or add a type check?

Our type inference engine has found an assignment of a scalar value (like a string, an integer or null) to a property which is an array.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property.

To type hint that a parameter can be either an array or null, you can set a type hint of array and a default value of null. The PHP interpreter will then accept both an array or null for that parameter.

function aContainsB(array $needle = null, array  $haystack) {
    if (!$needle) {
        return false;
    }

    return array_intersect($haystack, $needle) == $haystack;
}

The function can be called with either null or an array for the parameter $needle but will only accept an array as $haystack.

Loading history...
903
        return $this;
904
    }
905
906
    /**
907
     * Set the visible.
908
     *
909
     * @param boolean $visible The visible.
910
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsSolidgauge Returns the highcharts solidgauge.
911
     */
912
    public function setVisible($visible) {
913
        $this->visible = $visible;
914
        return $this;
915
    }
916
917
    /**
918
     * Set the wrap.
919
     *
920
     * @param boolean $wrap The wrap.
921
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsSolidgauge Returns the highcharts solidgauge.
922
     */
923
    public function setWrap($wrap) {
924
        $this->wrap = $wrap;
925
        return $this;
926
    }
927
928
    /**
929
     * Convert into an array representing this instance.
930
     *
931
     * @return array Returns an array representing this instance.
932
     */
933
    public function toArray() {
934
935
        // Initialize the output.
936
        $output = [];
937
938
        // Set the animation.
939
        ArrayUtility::set($output, "animation", $this->animation, [null]);
940
941
        // Set the animation limit.
942
        ArrayUtility::set($output, "animationLimit", $this->animationLimit, [null]);
943
944
        // Set the class name.
945
        ArrayUtility::set($output, "className", $this->className, [null]);
946
947
        // Set the color index.
948
        ArrayUtility::set($output, "colorIndex", $this->colorIndex, [null]);
949
950
        // Set the cursor.
951
        ArrayUtility::set($output, "cursor", $this->cursor, [null]);
952
953
        // Set the data labels.
954
        ArrayUtility::set($output, "dataLabels", $this->dataLabels, [null]);
955
956
        // Set the description.
957
        ArrayUtility::set($output, "description", $this->description, [null]);
958
959
        // Set the enable mouse tracking.
960
        ArrayUtility::set($output, "enableMouseTracking", $this->enableMouseTracking, [null]);
961
962
        // Set the events.
963
        if (null !== $this->events) {
964
            ArrayUtility::set($output, "events", $this->events->toArray(), []);
965
        }
966
967
        // Set the expose element to a11y.
968
        ArrayUtility::set($output, "exposeElementToA11y", $this->exposeElementToA11y, [null]);
969
970
        // Set the find nearest point by.
971
        ArrayUtility::set($output, "findNearestPointBy", $this->findNearestPointBy, [null]);
972
973
        // Set the get extremes from all.
974
        ArrayUtility::set($output, "getExtremesFromAll", $this->getExtremesFromAll, [null]);
975
976
        // Set the keys.
977
        ArrayUtility::set($output, "keys", $this->keys, [null]);
978
979
        // Set the linecap.
980
        ArrayUtility::set($output, "linecap", $this->linecap, [null]);
981
982
        // Set the overshoot.
983
        ArrayUtility::set($output, "overshoot", $this->overshoot, [null]);
984
985
        // Set the point.
986
        if (null !== $this->point) {
987
            ArrayUtility::set($output, "point", $this->point->toArray(), []);
988
        }
989
990
        // Set the point description formatter.
991
        ArrayUtility::set($output, "pointDescriptionFormatter", $this->pointDescriptionFormatter, [null]);
992
993
        // Set the rounded.
994
        ArrayUtility::set($output, "rounded", $this->rounded, [null]);
995
996
        // Set the selected.
997
        ArrayUtility::set($output, "selected", $this->selected, [null]);
998
999
        // Set the show checkbox.
1000
        ArrayUtility::set($output, "showCheckbox", $this->showCheckbox, [null]);
1001
1002
        // Set the show in legend.
1003
        ArrayUtility::set($output, "showInLegend", $this->showInLegend, [null]);
1004
1005
        // Set the skip keyboard navigation.
1006
        ArrayUtility::set($output, "skipKeyboardNavigation", $this->skipKeyboardNavigation, [null]);
1007
1008
        // Set the sticky tracking.
1009
        ArrayUtility::set($output, "stickyTracking", $this->stickyTracking, [null]);
1010
1011
        // Set the threshold.
1012
        ArrayUtility::set($output, "threshold", $this->threshold, [null]);
1013
1014
        // Set the tooltip.
1015
        ArrayUtility::set($output, "tooltip", $this->tooltip, [null]);
1016
1017
        // Set the visible.
1018
        ArrayUtility::set($output, "visible", $this->visible, [null]);
1019
1020
        // Set the wrap.
1021
        ArrayUtility::set($output, "wrap", $this->wrap, [null]);
1022
1023
        // Return the output.
1024
        return $output;
1025
    }
1026
1027
}
1028