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/HighchartsPyramid.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 pyramid.
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 HighchartsPyramid implements JsonSerializable {
26
27
    /**
28
     * Allow point select.
29
     *
30
     * @var boolean
31
     * @since 1.2.0
32
     */
33
    private $allowPointSelect = false;
34
35
    /**
36
     * Animation limit.
37
     *
38
     * @var integer
39
     */
40
    private $animationLimit;
41
42
    /**
43
     * Border color.
44
     *
45
     * @var string
46
     */
47
    private $borderColor = "#ffffff";
48
49
    /**
50
     * Border width.
51
     *
52
     * @var integer
53
     */
54
    private $borderWidth = 1;
55
56
    /**
57
     * Center.
58
     *
59
     * @var array
60
     * @since 3.0
61
     */
62
    private $center = ["50%", "50%"];
63
64
    /**
65
     * Class name.
66
     *
67
     * @var string
68
     * @since 5.0.0
69
     */
70
    private $className;
71
72
    /**
73
     * Color index.
74
     *
75
     * @var integer
76
     * @since 5.0.0
77
     */
78
    private $colorIndex;
79
80
    /**
81
     * Colors.
82
     *
83
     * @var array
84
     * @since 3.0
85
     */
86
    private $colors;
87
88
    /**
89
     * Cursor.
90
     *
91
     * @var string
92
     */
93
    private $cursor;
94
95
    /**
96
     * Data labels.
97
     *
98
     * @var \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Pyramid\HighchartsDataLabels
99
     */
100
    private $dataLabels;
101
102
    /**
103
     * Depth.
104
     *
105
     * @var integer
106
     * @since 4.0
107
     */
108
    private $depth = 0;
109
110
    /**
111
     * Description.
112
     *
113
     * @var string
114
     * @since 5.0.0
115
     */
116
    private $description;
117
118
    /**
119
     * Enable mouse tracking.
120
     *
121
     * @var boolean
122
     */
123
    private $enableMouseTracking = true;
124
125
    /**
126
     * Events.
127
     *
128
     * @var \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Pyramid\HighchartsEvents
129
     */
130
    private $events;
131
132
    /**
133
     * Expose element to a11y.
134
     *
135
     * @var boolean
136
     * @since 5.0.12
137
     */
138
    private $exposeElementToA11y;
139
140
    /**
141
     * Find nearest point by.
142
     *
143
     * @var string
144
     * @since 5.0.10
145
     */
146
    private $findNearestPointBy;
147
148
    /**
149
     * Get extremes from all.
150
     *
151
     * @var boolean
152
     * @since 4.1.6
153
     */
154
    private $getExtremesFromAll = false;
155
156
    /**
157
     * Height.
158
     *
159
     * @var integer|string
160
     * @since 3.0
161
     */
162
    private $height;
163
164
    /**
165
     * Keys.
166
     *
167
     * @var array
168
     * @since 4.1.6
169
     */
170
    private $keys;
171
172
    /**
173
     * Linked to.
174
     *
175
     * @var string
176
     * @since 3.0
177
     */
178
    private $linkedTo;
179
180
    /**
181
     * Min size.
182
     *
183
     * @var integer
184
     * @since 3.0
185
     */
186
    private $minSize = 80;
187
188
    /**
189
     * Point.
190
     *
191
     * @var \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Pyramid\HighchartsPoint
192
     */
193
    private $point;
194
195
    /**
196
     * Point description formatter.
197
     *
198
     * @var string
199
     * @since 5.0.12
200
     */
201
    private $pointDescriptionFormatter;
202
203
    /**
204
     * Reversed.
205
     *
206
     * @var boolean
207
     * @since 3.0.10
208
     */
209
    private $reversed = true;
210
211
    /**
212
     * Selected.
213
     *
214
     * @var boolean
215
     * @since 1.2.0
216
     */
217
    private $selected = false;
218
219
    /**
220
     * Shadow.
221
     *
222
     * @var boolean|array
223
     */
224
    private $shadow = false;
225
226
    /**
227
     * Show in legend.
228
     *
229
     * @var boolean
230
     */
231
    private $showInLegend = false;
232
233
    /**
234
     * Skip keyboard navigation.
235
     *
236
     * @var boolean
237
     * @since 5.0.12
238
     */
239
    private $skipKeyboardNavigation;
240
241
    /**
242
     * Sliced offset.
243
     *
244
     * @var integer
245
     */
246
    private $slicedOffset = 10;
247
248
    /**
249
     * States.
250
     *
251
     * @var \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Pyramid\HighchartsStates
252
     */
253
    private $states;
254
255
    /**
256
     * Sticky tracking.
257
     *
258
     * @var boolean
259
     */
260
    private $stickyTracking = false;
261
262
    /**
263
     * Tooltip.
264
     *
265
     * @var array
266
     * @since 2.3
267
     */
268
    private $tooltip;
269
270
    /**
271
     * Visible.
272
     *
273
     * @var boolean
274
     */
275
    private $visible = true;
276
277
    /**
278
     * Width.
279
     *
280
     * @var integer|string
281
     * @since 3.0
282
     */
283
    private $width = "90%";
284
285
    /**
286
     * Zone axis.
287
     *
288
     * @var string
289
     * @since 4.1.0
290
     */
291
    private $zoneAxis = "y";
292
293
    /**
294
     * Zones.
295
     *
296
     * @var array
297
     * @since 4.1.0
298
     */
299
    private $zones;
300
301
    /**
302
     * Constructor.
303
     *
304
     * @param boolean $ignoreDefaultValues Ignore the default values.
305
     */
306
    public function __construct($ignoreDefaultValues = true) {
307
        if (true === $ignoreDefaultValues) {
308
            $this->clear();
309
        }
310
    }
311
312
    /**
313
     * Clear.
314
     *
315
     * @return void
316
     */
317
    public function clear() {
318
319
        // Clear the allow point select.
320
        $this->allowPointSelect = null;
321
322
        // Clear the animation limit.
323
        $this->animationLimit = null;
324
325
        // Clear the border color.
326
        $this->borderColor = null;
327
328
        // Clear the border width.
329
        $this->borderWidth = null;
330
331
        // Clear the center.
332
        $this->center = 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 $center.

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...
333
334
        // Clear the class name.
335
        $this->className = null;
336
337
        // Clear the color index.
338
        $this->colorIndex = null;
339
340
        // Clear the colors.
341
        $this->colors = 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 $colors.

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...
342
343
        // Clear the cursor.
344
        $this->cursor = null;
345
346
        // Clear the data labels.
347
        if (null !== $this->dataLabels) {
348
            $this->dataLabels->clear();
349
        }
350
351
        // Clear the depth.
352
        $this->depth = null;
353
354
        // Clear the description.
355
        $this->description = null;
356
357
        // Clear the enable mouse tracking.
358
        $this->enableMouseTracking = null;
359
360
        // Clear the events.
361
        if (null !== $this->events) {
362
            $this->events->clear();
363
        }
364
365
        // Clear the expose element to a11y.
366
        $this->exposeElementToA11y = null;
367
368
        // Clear the find nearest point by.
369
        $this->findNearestPointBy = null;
370
371
        // Clear the get extremes from all.
372
        $this->getExtremesFromAll = null;
373
374
        // Clear the height.
375
        $this->height = null;
376
377
        // Clear the keys.
378
        $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...
379
380
        // Clear the linked to.
381
        $this->linkedTo = null;
382
383
        // Clear the min size.
384
        $this->minSize = null;
385
386
        // Clear the point.
387
        if (null !== $this->point) {
388
            $this->point->clear();
389
        }
390
391
        // Clear the point description formatter.
392
        $this->pointDescriptionFormatter = null;
393
394
        // Clear the reversed.
395
        $this->reversed = null;
396
397
        // Clear the selected.
398
        $this->selected = null;
399
400
        // Clear the shadow.
401
        $this->shadow = null;
402
403
        // Clear the show in legend.
404
        $this->showInLegend = null;
405
406
        // Clear the skip keyboard navigation.
407
        $this->skipKeyboardNavigation = null;
408
409
        // Clear the sliced offset.
410
        $this->slicedOffset = null;
411
412
        // Clear the states.
413
        if (null !== $this->states) {
414
            $this->states->clear();
415
        }
416
417
        // Clear the sticky tracking.
418
        $this->stickyTracking = null;
419
420
        // Clear the tooltip.
421
        $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...
422
423
        // Clear the visible.
424
        $this->visible = null;
425
426
        // Clear the width.
427
        $this->width = null;
428
429
        // Clear the zone axis.
430
        $this->zoneAxis = null;
431
432
        // Clear the zones.
433
        $this->zones = 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 $zones.

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...
434
    }
435
436
    /**
437
     * Get the allow point select.
438
     *
439
     * @return boolean Returns the allow point select.
440
     */
441
    public function getAllowPointSelect() {
442
        return $this->allowPointSelect;
443
    }
444
445
    /**
446
     * Get the animation limit.
447
     *
448
     * @return integer Returns the animation limit.
449
     */
450
    public function getAnimationLimit() {
451
        return $this->animationLimit;
452
    }
453
454
    /**
455
     * Get the border color.
456
     *
457
     * @return string Returns the border color.
458
     */
459
    public function getBorderColor() {
460
        return $this->borderColor;
461
    }
462
463
    /**
464
     * Get the border width.
465
     *
466
     * @return integer Returns the border width.
467
     */
468
    public function getBorderWidth() {
469
        return $this->borderWidth;
470
    }
471
472
    /**
473
     * Get the center.
474
     *
475
     * @return array Returns the center.
476
     */
477
    public function getCenter() {
478
        return $this->center;
479
    }
480
481
    /**
482
     * Get the class name.
483
     *
484
     * @return string Returns the class name.
485
     */
486
    public function getClassName() {
487
        return $this->className;
488
    }
489
490
    /**
491
     * Get the color index.
492
     *
493
     * @return integer Returns the color index.
494
     */
495
    public function getColorIndex() {
496
        return $this->colorIndex;
497
    }
498
499
    /**
500
     * Get the colors.
501
     *
502
     * @return array Returns the colors.
503
     */
504
    public function getColors() {
505
        return $this->colors;
506
    }
507
508
    /**
509
     * Get the cursor.
510
     *
511
     * @return string Returns the cursor.
512
     */
513
    public function getCursor() {
514
        return $this->cursor;
515
    }
516
517
    /**
518
     * Get the data labels.
519
     *
520
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Pyramid\HighchartsDataLabels Returns the data labels.
521
     */
522
    public function getDataLabels() {
523
        return $this->dataLabels;
524
    }
525
526
    /**
527
     * Get the depth.
528
     *
529
     * @return integer Returns the depth.
530
     */
531
    public function getDepth() {
532
        return $this->depth;
533
    }
534
535
    /**
536
     * Get the description.
537
     *
538
     * @return string Returns the description.
539
     */
540
    public function getDescription() {
541
        return $this->description;
542
    }
543
544
    /**
545
     * Get the enable mouse tracking.
546
     *
547
     * @return boolean Returns the enable mouse tracking.
548
     */
549
    public function getEnableMouseTracking() {
550
        return $this->enableMouseTracking;
551
    }
552
553
    /**
554
     * Get the events.
555
     *
556
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Pyramid\HighchartsEvents Returns the events.
557
     */
558
    public function getEvents() {
559
        return $this->events;
560
    }
561
562
    /**
563
     * Get the expose element to a11y.
564
     *
565
     * @return boolean Returns the expose element to a11y.
566
     */
567
    public function getExposeElementToA11y() {
568
        return $this->exposeElementToA11y;
569
    }
570
571
    /**
572
     * Get the find nearest point by.
573
     *
574
     * @return string Returns the find nearest point by.
575
     */
576
    public function getFindNearestPointBy() {
577
        return $this->findNearestPointBy;
578
    }
579
580
    /**
581
     * Get the get extremes from all.
582
     *
583
     * @return boolean Returns the get extremes from all.
584
     */
585
    public function getGetExtremesFromAll() {
586
        return $this->getExtremesFromAll;
587
    }
588
589
    /**
590
     * Get the height.
591
     *
592
     * @return integer|string Returns the height.
593
     */
594
    public function getHeight() {
595
        return $this->height;
596
    }
597
598
    /**
599
     * Get the keys.
600
     *
601
     * @return array Returns the keys.
602
     */
603
    public function getKeys() {
604
        return $this->keys;
605
    }
606
607
    /**
608
     * Get the linked to.
609
     *
610
     * @return string Returns the linked to.
611
     */
612
    public function getLinkedTo() {
613
        return $this->linkedTo;
614
    }
615
616
    /**
617
     * Get the min size.
618
     *
619
     * @return integer Returns the min size.
620
     */
621
    public function getMinSize() {
622
        return $this->minSize;
623
    }
624
625
    /**
626
     * Get the point.
627
     *
628
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Pyramid\HighchartsPoint Returns the point.
629
     */
630
    public function getPoint() {
631
        return $this->point;
632
    }
633
634
    /**
635
     * Get the point description formatter.
636
     *
637
     * @return string Returns the point description formatter.
638
     */
639
    public function getPointDescriptionFormatter() {
640
        return $this->pointDescriptionFormatter;
641
    }
642
643
    /**
644
     * Get the reversed.
645
     *
646
     * @return boolean Returns the reversed.
647
     */
648
    public function getReversed() {
649
        return $this->reversed;
650
    }
651
652
    /**
653
     * Get the selected.
654
     *
655
     * @return boolean Returns the selected.
656
     */
657
    public function getSelected() {
658
        return $this->selected;
659
    }
660
661
    /**
662
     * Get the shadow.
663
     *
664
     * @return boolean|array Returns the shadow.
665
     */
666
    public function getShadow() {
667
        return $this->shadow;
668
    }
669
670
    /**
671
     * Get the show in legend.
672
     *
673
     * @return boolean Returns the show in legend.
674
     */
675
    public function getShowInLegend() {
676
        return $this->showInLegend;
677
    }
678
679
    /**
680
     * Get the skip keyboard navigation.
681
     *
682
     * @return boolean Returns the skip keyboard navigation.
683
     */
684
    public function getSkipKeyboardNavigation() {
685
        return $this->skipKeyboardNavigation;
686
    }
687
688
    /**
689
     * Get the sliced offset.
690
     *
691
     * @return integer Returns the sliced offset.
692
     */
693
    public function getSlicedOffset() {
694
        return $this->slicedOffset;
695
    }
696
697
    /**
698
     * Get the states.
699
     *
700
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Pyramid\HighchartsStates Returns the states.
701
     */
702
    public function getStates() {
703
        return $this->states;
704
    }
705
706
    /**
707
     * Get the sticky tracking.
708
     *
709
     * @return boolean Returns the sticky tracking.
710
     */
711
    public function getStickyTracking() {
712
        return $this->stickyTracking;
713
    }
714
715
    /**
716
     * Get the tooltip.
717
     *
718
     * @return array Returns the tooltip.
719
     */
720
    public function getTooltip() {
721
        return $this->tooltip;
722
    }
723
724
    /**
725
     * Get the visible.
726
     *
727
     * @return boolean Returns the visible.
728
     */
729
    public function getVisible() {
730
        return $this->visible;
731
    }
732
733
    /**
734
     * Get the width.
735
     *
736
     * @return integer|string Returns the width.
737
     */
738
    public function getWidth() {
739
        return $this->width;
740
    }
741
742
    /**
743
     * Get the zone axis.
744
     *
745
     * @return string Returns the zone axis.
746
     */
747
    public function getZoneAxis() {
748
        return $this->zoneAxis;
749
    }
750
751
    /**
752
     * Get the zones.
753
     *
754
     * @return array Returns the zones.
755
     */
756
    public function getZones() {
757
        return $this->zones;
758
    }
759
760
    /**
761
     * Serialize this instance.
762
     *
763
     * @return array Returns an array representing this instance.
764
     */
765
    public function jsonSerialize() {
766
        return $this->toArray();
767
    }
768
769
    /**
770
     * Create a new data labels.
771
     *
772
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Pyramid\HighchartsDataLabels Returns the data labels.
773
     */
774
    public function newDataLabels() {
775
        $this->dataLabels = new \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Pyramid\HighchartsDataLabels();
776
        return $this->dataLabels;
777
    }
778
779
    /**
780
     * Create a new events.
781
     *
782
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Pyramid\HighchartsEvents Returns the events.
783
     */
784
    public function newEvents() {
785
        $this->events = new \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Pyramid\HighchartsEvents();
786
        return $this->events;
787
    }
788
789
    /**
790
     * Create a new point.
791
     *
792
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Pyramid\HighchartsPoint Returns the point.
793
     */
794
    public function newPoint() {
795
        $this->point = new \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Pyramid\HighchartsPoint();
796
        return $this->point;
797
    }
798
799
    /**
800
     * Create a new states.
801
     *
802
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Pyramid\HighchartsStates Returns the states.
803
     */
804
    public function newStates() {
805
        $this->states = new \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Pyramid\HighchartsStates();
806
        return $this->states;
807
    }
808
809
    /**
810
     * Set the allow point select.
811
     *
812
     * @param boolean $allowPointSelect The allow point select.
813
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsPyramid Returns the highcharts pyramid.
814
     */
815
    public function setAllowPointSelect($allowPointSelect) {
816
        $this->allowPointSelect = $allowPointSelect;
817
        return $this;
818
    }
819
820
    /**
821
     * Set the animation limit.
822
     *
823
     * @param integer $animationLimit The animation limit.
824
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsPyramid Returns the highcharts pyramid.
825
     */
826
    public function setAnimationLimit($animationLimit) {
827
        $this->animationLimit = $animationLimit;
828
        return $this;
829
    }
830
831
    /**
832
     * Set the border color.
833
     *
834
     * @param string $borderColor The border color.
835
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsPyramid Returns the highcharts pyramid.
836
     */
837
    public function setBorderColor($borderColor) {
838
        $this->borderColor = $borderColor;
839
        return $this;
840
    }
841
842
    /**
843
     * Set the border width.
844
     *
845
     * @param integer $borderWidth The border width.
846
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsPyramid Returns the highcharts pyramid.
847
     */
848
    public function setBorderWidth($borderWidth) {
849
        $this->borderWidth = $borderWidth;
850
        return $this;
851
    }
852
853
    /**
854
     * Set the center.
855
     *
856
     * @param array $center The center.
857
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsPyramid Returns the highcharts pyramid.
858
     */
859
    public function setCenter(array $center = null) {
860
        $this->center = $center;
0 ignored issues
show
Documentation Bug introduced by
It seems like $center can be null. However, the property $center 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...
861
        return $this;
862
    }
863
864
    /**
865
     * Set the class name.
866
     *
867
     * @param string $className The class name.
868
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsPyramid Returns the highcharts pyramid.
869
     */
870
    public function setClassName($className) {
871
        $this->className = $className;
872
        return $this;
873
    }
874
875
    /**
876
     * Set the color index.
877
     *
878
     * @param integer $colorIndex The color index.
879
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsPyramid Returns the highcharts pyramid.
880
     */
881
    public function setColorIndex($colorIndex) {
882
        $this->colorIndex = $colorIndex;
883
        return $this;
884
    }
885
886
    /**
887
     * Set the colors.
888
     *
889
     * @param array $colors The colors.
890
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsPyramid Returns the highcharts pyramid.
891
     */
892
    public function setColors(array $colors = null) {
893
        $this->colors = $colors;
0 ignored issues
show
Documentation Bug introduced by
It seems like $colors can be null. However, the property $colors 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...
894
        return $this;
895
    }
896
897
    /**
898
     * Set the cursor.
899
     *
900
     * @param string $cursor The cursor.
901
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsPyramid Returns the highcharts pyramid.
902
     */
903
    public function setCursor($cursor) {
904
        switch ($cursor) {
905
            case null:
906
            case "crosshair":
907
            case "default":
908
            case "help":
909
            case "none":
910
            case "pointer":
911
            $this->cursor = $cursor;
912
            break;
913
        }
914
        return $this;
915
    }
916
917
    /**
918
     * Set the data labels.
919
     *
920
     * @param \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Pyramid\HighchartsDataLabels $dataLabels The data labels.
921
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsPyramid Returns the highcharts pyramid.
922
     */
923
    public function setDataLabels(\WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Pyramid\HighchartsDataLabels $dataLabels = null) {
924
        $this->dataLabels = $dataLabels;
925
        return $this;
926
    }
927
928
    /**
929
     * Set the depth.
930
     *
931
     * @param integer $depth The depth.
932
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsPyramid Returns the highcharts pyramid.
933
     */
934
    public function setDepth($depth) {
935
        $this->depth = $depth;
936
        return $this;
937
    }
938
939
    /**
940
     * Set the description.
941
     *
942
     * @param string $description The description.
943
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsPyramid Returns the highcharts pyramid.
944
     */
945
    public function setDescription($description) {
946
        $this->description = $description;
947
        return $this;
948
    }
949
950
    /**
951
     * Set the enable mouse tracking.
952
     *
953
     * @param boolean $enableMouseTracking The enable mouse tracking.
954
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsPyramid Returns the highcharts pyramid.
955
     */
956
    public function setEnableMouseTracking($enableMouseTracking) {
957
        $this->enableMouseTracking = $enableMouseTracking;
958
        return $this;
959
    }
960
961
    /**
962
     * Set the events.
963
     *
964
     * @param \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Pyramid\HighchartsEvents $events The events.
965
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsPyramid Returns the highcharts pyramid.
966
     */
967
    public function setEvents(\WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Pyramid\HighchartsEvents $events = null) {
968
        $this->events = $events;
969
        return $this;
970
    }
971
972
    /**
973
     * Set the expose element to a11y.
974
     *
975
     * @param boolean $exposeElementToA11y The expose element to a11y.
976
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsPyramid Returns the highcharts pyramid.
977
     */
978
    public function setExposeElementToA11y($exposeElementToA11y) {
979
        $this->exposeElementToA11y = $exposeElementToA11y;
980
        return $this;
981
    }
982
983
    /**
984
     * Set the find nearest point by.
985
     *
986
     * @param string $findNearestPointBy The find nearest point by.
987
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsPyramid Returns the highcharts pyramid.
988
     */
989
    public function setFindNearestPointBy($findNearestPointBy) {
990
        switch ($findNearestPointBy) {
991
            case "x":
992
            case "xy":
993
            $this->findNearestPointBy = $findNearestPointBy;
994
            break;
995
        }
996
        return $this;
997
    }
998
999
    /**
1000
     * Set the get extremes from all.
1001
     *
1002
     * @param boolean $getExtremesFromAll The get extremes from all.
1003
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsPyramid Returns the highcharts pyramid.
1004
     */
1005
    public function setGetExtremesFromAll($getExtremesFromAll) {
1006
        $this->getExtremesFromAll = $getExtremesFromAll;
1007
        return $this;
1008
    }
1009
1010
    /**
1011
     * Set the height.
1012
     *
1013
     * @param integer|string $height The height.
1014
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsPyramid Returns the highcharts pyramid.
1015
     */
1016
    public function setHeight($height) {
1017
        $this->height = $height;
1018
        return $this;
1019
    }
1020
1021
    /**
1022
     * Set the keys.
1023
     *
1024
     * @param array $keys The keys.
1025
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsPyramid Returns the highcharts pyramid.
1026
     */
1027
    public function setKeys(array $keys = null) {
1028
        $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...
1029
        return $this;
1030
    }
1031
1032
    /**
1033
     * Set the linked to.
1034
     *
1035
     * @param string $linkedTo The linked to.
1036
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsPyramid Returns the highcharts pyramid.
1037
     */
1038
    public function setLinkedTo($linkedTo) {
1039
        $this->linkedTo = $linkedTo;
1040
        return $this;
1041
    }
1042
1043
    /**
1044
     * Set the min size.
1045
     *
1046
     * @param integer $minSize The min size.
1047
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsPyramid Returns the highcharts pyramid.
1048
     */
1049
    public function setMinSize($minSize) {
1050
        $this->minSize = $minSize;
1051
        return $this;
1052
    }
1053
1054
    /**
1055
     * Set the point.
1056
     *
1057
     * @param \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Pyramid\HighchartsPoint $point The point.
1058
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsPyramid Returns the highcharts pyramid.
1059
     */
1060
    public function setPoint(\WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Pyramid\HighchartsPoint $point = null) {
1061
        $this->point = $point;
1062
        return $this;
1063
    }
1064
1065
    /**
1066
     * Set the point description formatter.
1067
     *
1068
     * @param string $pointDescriptionFormatter The point description formatter.
1069
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsPyramid Returns the highcharts pyramid.
1070
     */
1071
    public function setPointDescriptionFormatter($pointDescriptionFormatter) {
1072
        $this->pointDescriptionFormatter = $pointDescriptionFormatter;
1073
        return $this;
1074
    }
1075
1076
    /**
1077
     * Set the reversed.
1078
     *
1079
     * @param boolean $reversed The reversed.
1080
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsPyramid Returns the highcharts pyramid.
1081
     */
1082
    public function setReversed($reversed) {
1083
        $this->reversed = $reversed;
1084
        return $this;
1085
    }
1086
1087
    /**
1088
     * Set the selected.
1089
     *
1090
     * @param boolean $selected The selected.
1091
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsPyramid Returns the highcharts pyramid.
1092
     */
1093
    public function setSelected($selected) {
1094
        $this->selected = $selected;
1095
        return $this;
1096
    }
1097
1098
    /**
1099
     * Set the shadow.
1100
     *
1101
     * @param boolean|array $shadow The shadow.
1102
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsPyramid Returns the highcharts pyramid.
1103
     */
1104
    public function setShadow($shadow) {
1105
        $this->shadow = $shadow;
1106
        return $this;
1107
    }
1108
1109
    /**
1110
     * Set the show in legend.
1111
     *
1112
     * @param boolean $showInLegend The show in legend.
1113
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsPyramid Returns the highcharts pyramid.
1114
     */
1115
    public function setShowInLegend($showInLegend) {
1116
        $this->showInLegend = $showInLegend;
1117
        return $this;
1118
    }
1119
1120
    /**
1121
     * Set the skip keyboard navigation.
1122
     *
1123
     * @param boolean $skipKeyboardNavigation The skip keyboard navigation.
1124
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsPyramid Returns the highcharts pyramid.
1125
     */
1126
    public function setSkipKeyboardNavigation($skipKeyboardNavigation) {
1127
        $this->skipKeyboardNavigation = $skipKeyboardNavigation;
1128
        return $this;
1129
    }
1130
1131
    /**
1132
     * Set the sliced offset.
1133
     *
1134
     * @param integer $slicedOffset The sliced offset.
1135
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsPyramid Returns the highcharts pyramid.
1136
     */
1137
    public function setSlicedOffset($slicedOffset) {
1138
        $this->slicedOffset = $slicedOffset;
1139
        return $this;
1140
    }
1141
1142
    /**
1143
     * Set the states.
1144
     *
1145
     * @param \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Pyramid\HighchartsStates $states The states.
1146
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsPyramid Returns the highcharts pyramid.
1147
     */
1148
    public function setStates(\WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Pyramid\HighchartsStates $states = null) {
1149
        $this->states = $states;
1150
        return $this;
1151
    }
1152
1153
    /**
1154
     * Set the sticky tracking.
1155
     *
1156
     * @param boolean $stickyTracking The sticky tracking.
1157
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsPyramid Returns the highcharts pyramid.
1158
     */
1159
    public function setStickyTracking($stickyTracking) {
1160
        $this->stickyTracking = $stickyTracking;
1161
        return $this;
1162
    }
1163
1164
    /**
1165
     * Set the tooltip.
1166
     *
1167
     * @param array $tooltip The tooltip.
1168
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsPyramid Returns the highcharts pyramid.
1169
     */
1170
    public function setTooltip(array $tooltip = null) {
1171
        $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...
1172
        return $this;
1173
    }
1174
1175
    /**
1176
     * Set the visible.
1177
     *
1178
     * @param boolean $visible The visible.
1179
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsPyramid Returns the highcharts pyramid.
1180
     */
1181
    public function setVisible($visible) {
1182
        $this->visible = $visible;
1183
        return $this;
1184
    }
1185
1186
    /**
1187
     * Set the width.
1188
     *
1189
     * @param integer|string $width The width.
1190
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsPyramid Returns the highcharts pyramid.
1191
     */
1192
    public function setWidth($width) {
1193
        $this->width = $width;
1194
        return $this;
1195
    }
1196
1197
    /**
1198
     * Set the zone axis.
1199
     *
1200
     * @param string $zoneAxis The zone axis.
1201
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsPyramid Returns the highcharts pyramid.
1202
     */
1203
    public function setZoneAxis($zoneAxis) {
1204
        $this->zoneAxis = $zoneAxis;
1205
        return $this;
1206
    }
1207
1208
    /**
1209
     * Set the zones.
1210
     *
1211
     * @param array $zones The zones.
1212
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsPyramid Returns the highcharts pyramid.
1213
     */
1214
    public function setZones(array $zones = null) {
1215
        $this->zones = $zones;
0 ignored issues
show
Documentation Bug introduced by
It seems like $zones can be null. However, the property $zones 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...
1216
        return $this;
1217
    }
1218
1219
    /**
1220
     * Convert into an array representing this instance.
1221
     *
1222
     * @return array Returns an array representing this instance.
1223
     */
1224
    public function toArray() {
1225
1226
        // Initialize the output.
1227
        $output = [];
1228
1229
        // Set the allow point select.
1230
        ArrayUtility::set($output, "allowPointSelect", $this->allowPointSelect, [null]);
1231
1232
        // Set the animation limit.
1233
        ArrayUtility::set($output, "animationLimit", $this->animationLimit, [null]);
1234
1235
        // Set the border color.
1236
        ArrayUtility::set($output, "borderColor", $this->borderColor, [null]);
1237
1238
        // Set the border width.
1239
        ArrayUtility::set($output, "borderWidth", $this->borderWidth, [null]);
1240
1241
        // Set the center.
1242
        ArrayUtility::set($output, "center", $this->center, [null]);
1243
1244
        // Set the class name.
1245
        ArrayUtility::set($output, "className", $this->className, [null]);
1246
1247
        // Set the color index.
1248
        ArrayUtility::set($output, "colorIndex", $this->colorIndex, [null]);
1249
1250
        // Set the colors.
1251
        ArrayUtility::set($output, "colors", $this->colors, [null]);
1252
1253
        // Set the cursor.
1254
        ArrayUtility::set($output, "cursor", $this->cursor, [null]);
1255
1256
        // Set the data labels.
1257
        if (null !== $this->dataLabels) {
1258
            ArrayUtility::set($output, "dataLabels", $this->dataLabels->toArray(), []);
1259
        }
1260
1261
        // Set the depth.
1262
        ArrayUtility::set($output, "depth", $this->depth, [null]);
1263
1264
        // Set the description.
1265
        ArrayUtility::set($output, "description", $this->description, [null]);
1266
1267
        // Set the enable mouse tracking.
1268
        ArrayUtility::set($output, "enableMouseTracking", $this->enableMouseTracking, [null]);
1269
1270
        // Set the events.
1271
        if (null !== $this->events) {
1272
            ArrayUtility::set($output, "events", $this->events->toArray(), []);
1273
        }
1274
1275
        // Set the expose element to a11y.
1276
        ArrayUtility::set($output, "exposeElementToA11y", $this->exposeElementToA11y, [null]);
1277
1278
        // Set the find nearest point by.
1279
        ArrayUtility::set($output, "findNearestPointBy", $this->findNearestPointBy, [null]);
1280
1281
        // Set the get extremes from all.
1282
        ArrayUtility::set($output, "getExtremesFromAll", $this->getExtremesFromAll, [null]);
1283
1284
        // Set the height.
1285
        ArrayUtility::set($output, "height", $this->height, [null]);
1286
1287
        // Set the keys.
1288
        ArrayUtility::set($output, "keys", $this->keys, [null]);
1289
1290
        // Set the linked to.
1291
        ArrayUtility::set($output, "linkedTo", $this->linkedTo, [null]);
1292
1293
        // Set the min size.
1294
        ArrayUtility::set($output, "minSize", $this->minSize, [null]);
1295
1296
        // Set the point.
1297
        if (null !== $this->point) {
1298
            ArrayUtility::set($output, "point", $this->point->toArray(), []);
1299
        }
1300
1301
        // Set the point description formatter.
1302
        ArrayUtility::set($output, "pointDescriptionFormatter", $this->pointDescriptionFormatter, [null]);
1303
1304
        // Set the reversed.
1305
        ArrayUtility::set($output, "reversed", $this->reversed, [null]);
1306
1307
        // Set the selected.
1308
        ArrayUtility::set($output, "selected", $this->selected, [null]);
1309
1310
        // Set the shadow.
1311
        ArrayUtility::set($output, "shadow", $this->shadow, [null]);
1312
1313
        // Set the show in legend.
1314
        ArrayUtility::set($output, "showInLegend", $this->showInLegend, [null]);
1315
1316
        // Set the skip keyboard navigation.
1317
        ArrayUtility::set($output, "skipKeyboardNavigation", $this->skipKeyboardNavigation, [null]);
1318
1319
        // Set the sliced offset.
1320
        ArrayUtility::set($output, "slicedOffset", $this->slicedOffset, [null]);
1321
1322
        // Set the states.
1323
        if (null !== $this->states) {
1324
            ArrayUtility::set($output, "states", $this->states->toArray(), []);
1325
        }
1326
1327
        // Set the sticky tracking.
1328
        ArrayUtility::set($output, "stickyTracking", $this->stickyTracking, [null]);
1329
1330
        // Set the tooltip.
1331
        ArrayUtility::set($output, "tooltip", $this->tooltip, [null]);
1332
1333
        // Set the visible.
1334
        ArrayUtility::set($output, "visible", $this->visible, [null]);
1335
1336
        // Set the width.
1337
        ArrayUtility::set($output, "width", $this->width, [null]);
1338
1339
        // Set the zone axis.
1340
        ArrayUtility::set($output, "zoneAxis", $this->zoneAxis, [null]);
1341
1342
        // Set the zones.
1343
        ArrayUtility::set($output, "zones", $this->zones, [null]);
1344
1345
        // Return the output.
1346
        return $output;
1347
    }
1348
1349
}
1350