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/HighchartsGauge.php (10 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 gauge.
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 HighchartsGauge 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.
51
     *
52
     * @var string
53
     */
54
    private $color;
55
56
    /**
57
     * Color index.
58
     *
59
     * @var integer
60
     * @since 5.0.0
61
     */
62
    private $colorIndex;
63
64
    /**
65
     * Cursor.
66
     *
67
     * @var string
68
     */
69
    private $cursor;
70
71
    /**
72
     * Data labels.
73
     *
74
     * @var array
75
     * @since 2.3.0
76
     */
77
    private $dataLabels;
78
79
    /**
80
     * Description.
81
     *
82
     * @var string
83
     * @since 5.0.0
84
     */
85
    private $description;
86
87
    /**
88
     * Dial.
89
     *
90
     * @var array
91
     * @since 2.3.0
92
     */
93
    private $dial;
94
95
    /**
96
     * Enable mouse tracking.
97
     *
98
     * @var boolean
99
     */
100
    private $enableMouseTracking = true;
101
102
    /**
103
     * Events.
104
     *
105
     * @var \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Gauge\HighchartsEvents
106
     */
107
    private $events;
108
109
    /**
110
     * Expose element to a11y.
111
     *
112
     * @var boolean
113
     * @since 5.0.12
114
     */
115
    private $exposeElementToA11y;
116
117
    /**
118
     * Find nearest point by.
119
     *
120
     * @var string
121
     * @since 5.0.10
122
     */
123
    private $findNearestPointBy;
124
125
    /**
126
     * Get extremes from all.
127
     *
128
     * @var boolean
129
     * @since 4.1.6
130
     */
131
    private $getExtremesFromAll = false;
132
133
    /**
134
     * Keys.
135
     *
136
     * @var array
137
     * @since 4.1.6
138
     */
139
    private $keys;
140
141
    /**
142
     * Linked to.
143
     *
144
     * @var string
145
     * @since 3.0
146
     */
147
    private $linkedTo;
148
149
    /**
150
     * Negative color.
151
     *
152
     * @var string
153
     * @since 3.0
154
     */
155
    private $negativeColor;
156
157
    /**
158
     * Overshoot.
159
     *
160
     * @var integer
161
     * @since 3.0.10
162
     */
163
    private $overshoot = 0;
164
165
    /**
166
     * Pivot.
167
     *
168
     * @var array
169
     * @since 2.3.0
170
     */
171
    private $pivot;
172
173
    /**
174
     * Point.
175
     *
176
     * @var \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Gauge\HighchartsPoint
177
     */
178
    private $point;
179
180
    /**
181
     * Point description formatter.
182
     *
183
     * @var string
184
     * @since 5.0.12
185
     */
186
    private $pointDescriptionFormatter;
187
188
    /**
189
     * Selected.
190
     *
191
     * @var boolean
192
     * @since 1.2.0
193
     */
194
    private $selected = false;
195
196
    /**
197
     * Show checkbox.
198
     *
199
     * @var boolean
200
     * @since 1.2.0
201
     */
202
    private $showCheckbox = false;
203
204
    /**
205
     * Show in legend.
206
     *
207
     * @var boolean
208
     * @since 2.3.0
209
     */
210
    private $showInLegend;
211
212
    /**
213
     * Skip keyboard navigation.
214
     *
215
     * @var boolean
216
     * @since 5.0.12
217
     */
218
    private $skipKeyboardNavigation;
219
220
    /**
221
     * Sticky tracking.
222
     *
223
     * @var boolean
224
     * @since 2.0
225
     */
226
    private $stickyTracking = true;
227
228
    /**
229
     * Threshold.
230
     *
231
     * @var integer
232
     * @since 3.0
233
     */
234
    private $threshold = 0;
235
236
    /**
237
     * Tooltip.
238
     *
239
     * @var array
240
     * @since 2.3
241
     */
242
    private $tooltip;
243
244
    /**
245
     * Visible.
246
     *
247
     * @var boolean
248
     */
249
    private $visible = true;
250
251
    /**
252
     * Wrap.
253
     *
254
     * @var boolean
255
     * @since 3.0
256
     */
257
    private $wrap = true;
258
259
    /**
260
     * Constructor.
261
     *
262
     * @param boolean $ignoreDefaultValues Ignore the default values.
263
     */
264
    public function __construct($ignoreDefaultValues = true) {
265
        if (true === $ignoreDefaultValues) {
266
            $this->clear();
267
        }
268
    }
269
270
    /**
271
     * Clear.
272
     *
273
     * @return void
274
     */
275
    public function clear() {
276
277
        // Clear the animation.
278
        $this->animation = null;
279
280
        // Clear the animation limit.
281
        $this->animationLimit = null;
282
283
        // Clear the class name.
284
        $this->className = null;
285
286
        // Clear the color.
287
        $this->color = null;
288
289
        // Clear the color index.
290
        $this->colorIndex = null;
291
292
        // Clear the cursor.
293
        $this->cursor = null;
294
295
        // Clear the data labels.
296
        $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...
297
298
        // Clear the description.
299
        $this->description = null;
300
301
        // Clear the dial.
302
        $this->dial = 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 $dial.

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...
303
304
        // Clear the enable mouse tracking.
305
        $this->enableMouseTracking = null;
306
307
        // Clear the events.
308
        if (null !== $this->events) {
309
            $this->events->clear();
310
        }
311
312
        // Clear the expose element to a11y.
313
        $this->exposeElementToA11y = null;
314
315
        // Clear the find nearest point by.
316
        $this->findNearestPointBy = null;
317
318
        // Clear the get extremes from all.
319
        $this->getExtremesFromAll = null;
320
321
        // Clear the keys.
322
        $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...
323
324
        // Clear the linked to.
325
        $this->linkedTo = null;
326
327
        // Clear the negative color.
328
        $this->negativeColor = null;
329
330
        // Clear the overshoot.
331
        $this->overshoot = null;
332
333
        // Clear the pivot.
334
        $this->pivot = 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 $pivot.

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...
335
336
        // Clear the point.
337
        if (null !== $this->point) {
338
            $this->point->clear();
339
        }
340
341
        // Clear the point description formatter.
342
        $this->pointDescriptionFormatter = null;
343
344
        // Clear the selected.
345
        $this->selected = null;
346
347
        // Clear the show checkbox.
348
        $this->showCheckbox = null;
349
350
        // Clear the show in legend.
351
        $this->showInLegend = null;
352
353
        // Clear the skip keyboard navigation.
354
        $this->skipKeyboardNavigation = null;
355
356
        // Clear the sticky tracking.
357
        $this->stickyTracking = null;
358
359
        // Clear the threshold.
360
        $this->threshold = null;
361
362
        // Clear the tooltip.
363
        $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...
364
365
        // Clear the visible.
366
        $this->visible = null;
367
368
        // Clear the wrap.
369
        $this->wrap = null;
370
    }
371
372
    /**
373
     * Get the animation.
374
     *
375
     * @return boolean Returns the animation.
376
     */
377
    public function getAnimation() {
378
        return $this->animation;
379
    }
380
381
    /**
382
     * Get the animation limit.
383
     *
384
     * @return integer Returns the animation limit.
385
     */
386
    public function getAnimationLimit() {
387
        return $this->animationLimit;
388
    }
389
390
    /**
391
     * Get the class name.
392
     *
393
     * @return string Returns the class name.
394
     */
395
    public function getClassName() {
396
        return $this->className;
397
    }
398
399
    /**
400
     * Get the color.
401
     *
402
     * @return string Returns the color.
403
     */
404
    public function getColor() {
405
        return $this->color;
406
    }
407
408
    /**
409
     * Get the color index.
410
     *
411
     * @return integer Returns the color index.
412
     */
413
    public function getColorIndex() {
414
        return $this->colorIndex;
415
    }
416
417
    /**
418
     * Get the cursor.
419
     *
420
     * @return string Returns the cursor.
421
     */
422
    public function getCursor() {
423
        return $this->cursor;
424
    }
425
426
    /**
427
     * Get the data labels.
428
     *
429
     * @return array Returns the data labels.
430
     */
431
    public function getDataLabels() {
432
        return $this->dataLabels;
433
    }
434
435
    /**
436
     * Get the description.
437
     *
438
     * @return string Returns the description.
439
     */
440
    public function getDescription() {
441
        return $this->description;
442
    }
443
444
    /**
445
     * Get the dial.
446
     *
447
     * @return array Returns the dial.
448
     */
449
    public function getDial() {
450
        return $this->dial;
451
    }
452
453
    /**
454
     * Get the enable mouse tracking.
455
     *
456
     * @return boolean Returns the enable mouse tracking.
457
     */
458
    public function getEnableMouseTracking() {
459
        return $this->enableMouseTracking;
460
    }
461
462
    /**
463
     * Get the events.
464
     *
465
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Gauge\HighchartsEvents Returns the events.
466
     */
467
    public function getEvents() {
468
        return $this->events;
469
    }
470
471
    /**
472
     * Get the expose element to a11y.
473
     *
474
     * @return boolean Returns the expose element to a11y.
475
     */
476
    public function getExposeElementToA11y() {
477
        return $this->exposeElementToA11y;
478
    }
479
480
    /**
481
     * Get the find nearest point by.
482
     *
483
     * @return string Returns the find nearest point by.
484
     */
485
    public function getFindNearestPointBy() {
486
        return $this->findNearestPointBy;
487
    }
488
489
    /**
490
     * Get the get extremes from all.
491
     *
492
     * @return boolean Returns the get extremes from all.
493
     */
494
    public function getGetExtremesFromAll() {
495
        return $this->getExtremesFromAll;
496
    }
497
498
    /**
499
     * Get the keys.
500
     *
501
     * @return array Returns the keys.
502
     */
503
    public function getKeys() {
504
        return $this->keys;
505
    }
506
507
    /**
508
     * Get the linked to.
509
     *
510
     * @return string Returns the linked to.
511
     */
512
    public function getLinkedTo() {
513
        return $this->linkedTo;
514
    }
515
516
    /**
517
     * Get the negative color.
518
     *
519
     * @return string Returns the negative color.
520
     */
521
    public function getNegativeColor() {
522
        return $this->negativeColor;
523
    }
524
525
    /**
526
     * Get the overshoot.
527
     *
528
     * @return integer Returns the overshoot.
529
     */
530
    public function getOvershoot() {
531
        return $this->overshoot;
532
    }
533
534
    /**
535
     * Get the pivot.
536
     *
537
     * @return array Returns the pivot.
538
     */
539
    public function getPivot() {
540
        return $this->pivot;
541
    }
542
543
    /**
544
     * Get the point.
545
     *
546
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Gauge\HighchartsPoint Returns the point.
547
     */
548
    public function getPoint() {
549
        return $this->point;
550
    }
551
552
    /**
553
     * Get the point description formatter.
554
     *
555
     * @return string Returns the point description formatter.
556
     */
557
    public function getPointDescriptionFormatter() {
558
        return $this->pointDescriptionFormatter;
559
    }
560
561
    /**
562
     * Get the selected.
563
     *
564
     * @return boolean Returns the selected.
565
     */
566
    public function getSelected() {
567
        return $this->selected;
568
    }
569
570
    /**
571
     * Get the show checkbox.
572
     *
573
     * @return boolean Returns the show checkbox.
574
     */
575
    public function getShowCheckbox() {
576
        return $this->showCheckbox;
577
    }
578
579
    /**
580
     * Get the show in legend.
581
     *
582
     * @return boolean Returns the show in legend.
583
     */
584
    public function getShowInLegend() {
585
        return $this->showInLegend;
586
    }
587
588
    /**
589
     * Get the skip keyboard navigation.
590
     *
591
     * @return boolean Returns the skip keyboard navigation.
592
     */
593
    public function getSkipKeyboardNavigation() {
594
        return $this->skipKeyboardNavigation;
595
    }
596
597
    /**
598
     * Get the sticky tracking.
599
     *
600
     * @return boolean Returns the sticky tracking.
601
     */
602
    public function getStickyTracking() {
603
        return $this->stickyTracking;
604
    }
605
606
    /**
607
     * Get the threshold.
608
     *
609
     * @return integer Returns the threshold.
610
     */
611
    public function getThreshold() {
612
        return $this->threshold;
613
    }
614
615
    /**
616
     * Get the tooltip.
617
     *
618
     * @return array Returns the tooltip.
619
     */
620
    public function getTooltip() {
621
        return $this->tooltip;
622
    }
623
624
    /**
625
     * Get the visible.
626
     *
627
     * @return boolean Returns the visible.
628
     */
629
    public function getVisible() {
630
        return $this->visible;
631
    }
632
633
    /**
634
     * Get the wrap.
635
     *
636
     * @return boolean Returns the wrap.
637
     */
638
    public function getWrap() {
639
        return $this->wrap;
640
    }
641
642
    /**
643
     * Serialize this instance.
644
     *
645
     * @return array Returns an array representing this instance.
646
     */
647
    public function jsonSerialize() {
648
        return $this->toArray();
649
    }
650
651
    /**
652
     * Create a new events.
653
     *
654
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Gauge\HighchartsEvents Returns the events.
655
     */
656
    public function newEvents() {
657
        $this->events = new \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Gauge\HighchartsEvents();
658
        return $this->events;
659
    }
660
661
    /**
662
     * Create a new point.
663
     *
664
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Gauge\HighchartsPoint Returns the point.
665
     */
666
    public function newPoint() {
667
        $this->point = new \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Gauge\HighchartsPoint();
668
        return $this->point;
669
    }
670
671
    /**
672
     * Set the animation.
673
     *
674
     * @param boolean $animation The animation.
675
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsGauge Returns the highcharts gauge.
676
     */
677
    public function setAnimation($animation) {
678
        $this->animation = $animation;
679
        return $this;
680
    }
681
682
    /**
683
     * Set the animation limit.
684
     *
685
     * @param integer $animationLimit The animation limit.
686
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsGauge Returns the highcharts gauge.
687
     */
688
    public function setAnimationLimit($animationLimit) {
689
        $this->animationLimit = $animationLimit;
690
        return $this;
691
    }
692
693
    /**
694
     * Set the class name.
695
     *
696
     * @param string $className The class name.
697
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsGauge Returns the highcharts gauge.
698
     */
699
    public function setClassName($className) {
700
        $this->className = $className;
701
        return $this;
702
    }
703
704
    /**
705
     * Set the color.
706
     *
707
     * @param string $color The color.
708
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsGauge Returns the highcharts gauge.
709
     */
710
    public function setColor($color) {
711
        $this->color = $color;
712
        return $this;
713
    }
714
715
    /**
716
     * Set the color index.
717
     *
718
     * @param integer $colorIndex The color index.
719
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsGauge Returns the highcharts gauge.
720
     */
721
    public function setColorIndex($colorIndex) {
722
        $this->colorIndex = $colorIndex;
723
        return $this;
724
    }
725
726
    /**
727
     * Set the cursor.
728
     *
729
     * @param string $cursor The cursor.
730
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsGauge Returns the highcharts gauge.
731
     */
732
    public function setCursor($cursor) {
733
        switch ($cursor) {
734
            case null:
735
            case "crosshair":
736
            case "default":
737
            case "help":
738
            case "none":
739
            case "pointer":
740
            $this->cursor = $cursor;
741
            break;
742
        }
743
        return $this;
744
    }
745
746
    /**
747
     * Set the data labels.
748
     *
749
     * @param array $dataLabels The data labels.
750
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsGauge Returns the highcharts gauge.
751
     */
752
    public function setDataLabels(array $dataLabels = null) {
753
        $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...
754
        return $this;
755
    }
756
757
    /**
758
     * Set the description.
759
     *
760
     * @param string $description The description.
761
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsGauge Returns the highcharts gauge.
762
     */
763
    public function setDescription($description) {
764
        $this->description = $description;
765
        return $this;
766
    }
767
768
    /**
769
     * Set the dial.
770
     *
771
     * @param array $dial The dial.
772
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsGauge Returns the highcharts gauge.
773
     */
774
    public function setDial(array $dial = null) {
775
        $this->dial = $dial;
0 ignored issues
show
Documentation Bug introduced by
It seems like $dial can be null. However, the property $dial 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...
776
        return $this;
777
    }
778
779
    /**
780
     * Set the enable mouse tracking.
781
     *
782
     * @param boolean $enableMouseTracking The enable mouse tracking.
783
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsGauge Returns the highcharts gauge.
784
     */
785
    public function setEnableMouseTracking($enableMouseTracking) {
786
        $this->enableMouseTracking = $enableMouseTracking;
787
        return $this;
788
    }
789
790
    /**
791
     * Set the events.
792
     *
793
     * @param \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Gauge\HighchartsEvents $events The events.
794
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsGauge Returns the highcharts gauge.
795
     */
796
    public function setEvents(\WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Gauge\HighchartsEvents $events = null) {
797
        $this->events = $events;
798
        return $this;
799
    }
800
801
    /**
802
     * Set the expose element to a11y.
803
     *
804
     * @param boolean $exposeElementToA11y The expose element to a11y.
805
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsGauge Returns the highcharts gauge.
806
     */
807
    public function setExposeElementToA11y($exposeElementToA11y) {
808
        $this->exposeElementToA11y = $exposeElementToA11y;
809
        return $this;
810
    }
811
812
    /**
813
     * Set the find nearest point by.
814
     *
815
     * @param string $findNearestPointBy The find nearest point by.
816
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsGauge Returns the highcharts gauge.
817
     */
818
    public function setFindNearestPointBy($findNearestPointBy) {
819
        switch ($findNearestPointBy) {
820
            case "x":
821
            case "xy":
822
            $this->findNearestPointBy = $findNearestPointBy;
823
            break;
824
        }
825
        return $this;
826
    }
827
828
    /**
829
     * Set the get extremes from all.
830
     *
831
     * @param boolean $getExtremesFromAll The get extremes from all.
832
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsGauge Returns the highcharts gauge.
833
     */
834
    public function setGetExtremesFromAll($getExtremesFromAll) {
835
        $this->getExtremesFromAll = $getExtremesFromAll;
836
        return $this;
837
    }
838
839
    /**
840
     * Set the keys.
841
     *
842
     * @param array $keys The keys.
843
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsGauge Returns the highcharts gauge.
844
     */
845
    public function setKeys(array $keys = null) {
846
        $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...
847
        return $this;
848
    }
849
850
    /**
851
     * Set the linked to.
852
     *
853
     * @param string $linkedTo The linked to.
854
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsGauge Returns the highcharts gauge.
855
     */
856
    public function setLinkedTo($linkedTo) {
857
        $this->linkedTo = $linkedTo;
858
        return $this;
859
    }
860
861
    /**
862
     * Set the negative color.
863
     *
864
     * @param string $negativeColor The negative color.
865
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsGauge Returns the highcharts gauge.
866
     */
867
    public function setNegativeColor($negativeColor) {
868
        $this->negativeColor = $negativeColor;
869
        return $this;
870
    }
871
872
    /**
873
     * Set the overshoot.
874
     *
875
     * @param integer $overshoot The overshoot.
876
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsGauge Returns the highcharts gauge.
877
     */
878
    public function setOvershoot($overshoot) {
879
        $this->overshoot = $overshoot;
880
        return $this;
881
    }
882
883
    /**
884
     * Set the pivot.
885
     *
886
     * @param array $pivot The pivot.
887
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsGauge Returns the highcharts gauge.
888
     */
889
    public function setPivot(array $pivot = null) {
890
        $this->pivot = $pivot;
0 ignored issues
show
Documentation Bug introduced by
It seems like $pivot can be null. However, the property $pivot 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...
891
        return $this;
892
    }
893
894
    /**
895
     * Set the point.
896
     *
897
     * @param \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Gauge\HighchartsPoint $point The point.
898
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsGauge Returns the highcharts gauge.
899
     */
900
    public function setPoint(\WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Gauge\HighchartsPoint $point = null) {
901
        $this->point = $point;
902
        return $this;
903
    }
904
905
    /**
906
     * Set the point description formatter.
907
     *
908
     * @param string $pointDescriptionFormatter The point description formatter.
909
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsGauge Returns the highcharts gauge.
910
     */
911
    public function setPointDescriptionFormatter($pointDescriptionFormatter) {
912
        $this->pointDescriptionFormatter = $pointDescriptionFormatter;
913
        return $this;
914
    }
915
916
    /**
917
     * Set the selected.
918
     *
919
     * @param boolean $selected The selected.
920
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsGauge Returns the highcharts gauge.
921
     */
922
    public function setSelected($selected) {
923
        $this->selected = $selected;
924
        return $this;
925
    }
926
927
    /**
928
     * Set the show checkbox.
929
     *
930
     * @param boolean $showCheckbox The show checkbox.
931
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsGauge Returns the highcharts gauge.
932
     */
933
    public function setShowCheckbox($showCheckbox) {
934
        $this->showCheckbox = $showCheckbox;
935
        return $this;
936
    }
937
938
    /**
939
     * Set the show in legend.
940
     *
941
     * @param boolean $showInLegend The show in legend.
942
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsGauge Returns the highcharts gauge.
943
     */
944
    public function setShowInLegend($showInLegend) {
945
        $this->showInLegend = $showInLegend;
946
        return $this;
947
    }
948
949
    /**
950
     * Set the skip keyboard navigation.
951
     *
952
     * @param boolean $skipKeyboardNavigation The skip keyboard navigation.
953
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsGauge Returns the highcharts gauge.
954
     */
955
    public function setSkipKeyboardNavigation($skipKeyboardNavigation) {
956
        $this->skipKeyboardNavigation = $skipKeyboardNavigation;
957
        return $this;
958
    }
959
960
    /**
961
     * Set the sticky tracking.
962
     *
963
     * @param boolean $stickyTracking The sticky tracking.
964
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsGauge Returns the highcharts gauge.
965
     */
966
    public function setStickyTracking($stickyTracking) {
967
        $this->stickyTracking = $stickyTracking;
968
        return $this;
969
    }
970
971
    /**
972
     * Set the threshold.
973
     *
974
     * @param integer $threshold The threshold.
975
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsGauge Returns the highcharts gauge.
976
     */
977
    public function setThreshold($threshold) {
978
        $this->threshold = $threshold;
979
        return $this;
980
    }
981
982
    /**
983
     * Set the tooltip.
984
     *
985
     * @param array $tooltip The tooltip.
986
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsGauge Returns the highcharts gauge.
987
     */
988
    public function setTooltip(array $tooltip = null) {
989
        $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...
990
        return $this;
991
    }
992
993
    /**
994
     * Set the visible.
995
     *
996
     * @param boolean $visible The visible.
997
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsGauge Returns the highcharts gauge.
998
     */
999
    public function setVisible($visible) {
1000
        $this->visible = $visible;
1001
        return $this;
1002
    }
1003
1004
    /**
1005
     * Set the wrap.
1006
     *
1007
     * @param boolean $wrap The wrap.
1008
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsGauge Returns the highcharts gauge.
1009
     */
1010
    public function setWrap($wrap) {
1011
        $this->wrap = $wrap;
1012
        return $this;
1013
    }
1014
1015
    /**
1016
     * Convert into an array representing this instance.
1017
     *
1018
     * @return array Returns an array representing this instance.
1019
     */
1020
    public function toArray() {
1021
1022
        // Initialize the output.
1023
        $output = [];
1024
1025
        // Set the animation.
1026
        ArrayUtility::set($output, "animation", $this->animation, [null]);
1027
1028
        // Set the animation limit.
1029
        ArrayUtility::set($output, "animationLimit", $this->animationLimit, [null]);
1030
1031
        // Set the class name.
1032
        ArrayUtility::set($output, "className", $this->className, [null]);
1033
1034
        // Set the color.
1035
        ArrayUtility::set($output, "color", $this->color, [null]);
1036
1037
        // Set the color index.
1038
        ArrayUtility::set($output, "colorIndex", $this->colorIndex, [null]);
1039
1040
        // Set the cursor.
1041
        ArrayUtility::set($output, "cursor", $this->cursor, [null]);
1042
1043
        // Set the data labels.
1044
        ArrayUtility::set($output, "dataLabels", $this->dataLabels, [null]);
1045
1046
        // Set the description.
1047
        ArrayUtility::set($output, "description", $this->description, [null]);
1048
1049
        // Set the dial.
1050
        ArrayUtility::set($output, "dial", $this->dial, [null]);
1051
1052
        // Set the enable mouse tracking.
1053
        ArrayUtility::set($output, "enableMouseTracking", $this->enableMouseTracking, [null]);
1054
1055
        // Set the events.
1056
        if (null !== $this->events) {
1057
            ArrayUtility::set($output, "events", $this->events->toArray(), []);
1058
        }
1059
1060
        // Set the expose element to a11y.
1061
        ArrayUtility::set($output, "exposeElementToA11y", $this->exposeElementToA11y, [null]);
1062
1063
        // Set the find nearest point by.
1064
        ArrayUtility::set($output, "findNearestPointBy", $this->findNearestPointBy, [null]);
1065
1066
        // Set the get extremes from all.
1067
        ArrayUtility::set($output, "getExtremesFromAll", $this->getExtremesFromAll, [null]);
1068
1069
        // Set the keys.
1070
        ArrayUtility::set($output, "keys", $this->keys, [null]);
1071
1072
        // Set the linked to.
1073
        ArrayUtility::set($output, "linkedTo", $this->linkedTo, [null]);
1074
1075
        // Set the negative color.
1076
        ArrayUtility::set($output, "negativeColor", $this->negativeColor, [null]);
1077
1078
        // Set the overshoot.
1079
        ArrayUtility::set($output, "overshoot", $this->overshoot, [null]);
1080
1081
        // Set the pivot.
1082
        ArrayUtility::set($output, "pivot", $this->pivot, [null]);
1083
1084
        // Set the point.
1085
        if (null !== $this->point) {
1086
            ArrayUtility::set($output, "point", $this->point->toArray(), []);
1087
        }
1088
1089
        // Set the point description formatter.
1090
        ArrayUtility::set($output, "pointDescriptionFormatter", $this->pointDescriptionFormatter, [null]);
1091
1092
        // Set the selected.
1093
        ArrayUtility::set($output, "selected", $this->selected, [null]);
1094
1095
        // Set the show checkbox.
1096
        ArrayUtility::set($output, "showCheckbox", $this->showCheckbox, [null]);
1097
1098
        // Set the show in legend.
1099
        ArrayUtility::set($output, "showInLegend", $this->showInLegend, [null]);
1100
1101
        // Set the skip keyboard navigation.
1102
        ArrayUtility::set($output, "skipKeyboardNavigation", $this->skipKeyboardNavigation, [null]);
1103
1104
        // Set the sticky tracking.
1105
        ArrayUtility::set($output, "stickyTracking", $this->stickyTracking, [null]);
1106
1107
        // Set the threshold.
1108
        ArrayUtility::set($output, "threshold", $this->threshold, [null]);
1109
1110
        // Set the tooltip.
1111
        ArrayUtility::set($output, "tooltip", $this->tooltip, [null]);
1112
1113
        // Set the visible.
1114
        ArrayUtility::set($output, "visible", $this->visible, [null]);
1115
1116
        // Set the wrap.
1117
        ArrayUtility::set($output, "wrap", $this->wrap, [null]);
1118
1119
        // Return the output.
1120
        return $output;
1121
    }
1122
1123
}
1124