HighchartsTreemap   F
last analyzed

Complexity

Total Complexity 134

Size/Duplication

Total Lines 1742
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 6

Importance

Changes 0
Metric Value
wmc 134
lcom 1
cbo 6
dl 0
loc 1742
rs 0.8
c 0
b 0
f 0

103 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 2
B clear() 0 153 6
A getAllowDrillToNode() 0 3 1
A getAllowPointSelect() 0 3 1
A getAlternateStartingDirection() 0 3 1
A getAnimation() 0 3 1
A getAnimationLimit() 0 3 1
A getBorderColor() 0 3 1
A getBorderWidth() 0 3 1
A getClassName() 0 3 1
A getColor() 0 3 1
A getColorByPoint() 0 3 1
A getColorIndex() 0 3 1
A getColors() 0 3 1
A getCrisp() 0 3 1
A getCropThreshold() 0 3 1
A getCursor() 0 3 1
A getDataLabels() 0 3 1
A getDescription() 0 3 1
A getEnableMouseTracking() 0 3 1
A getEvents() 0 3 1
A getExposeElementToA11y() 0 3 1
A getFindNearestPointBy() 0 3 1
A getGetExtremesFromAll() 0 3 1
A getIgnoreHiddenPoint() 0 3 1
A getInteractByLeaf() 0 3 1
A getKeys() 0 3 1
A getLayoutAlgorithm() 0 3 1
A getLayoutStartingDirection() 0 3 1
A getLevelIsConstant() 0 3 1
A getLevels() 0 3 1
A getLinkedTo() 0 3 1
A getMaxPointWidth() 0 3 1
A getOpacity() 0 3 1
A getPoint() 0 3 1
A getPointDescriptionFormatter() 0 3 1
A getSelected() 0 3 1
A getShadow() 0 3 1
A getShowCheckbox() 0 3 1
A getShowInLegend() 0 3 1
A getSkipKeyboardNavigation() 0 3 1
A getSortIndex() 0 3 1
A getStates() 0 3 1
A getStickyTracking() 0 3 1
A getTooltip() 0 3 1
A getTurboThreshold() 0 3 1
A getVisible() 0 3 1
A getZoneAxis() 0 3 1
A getZones() 0 3 1
A jsonSerialize() 0 3 1
A newDataLabels() 0 4 1
A newEvents() 0 4 1
A newPoint() 0 4 1
A newStates() 0 4 1
A newTooltip() 0 4 1
A setAllowDrillToNode() 0 9 3
A setAllowPointSelect() 0 4 1
A setAlternateStartingDirection() 0 4 1
A setAnimation() 0 4 1
A setAnimationLimit() 0 4 1
A setBorderColor() 0 4 1
A setBorderWidth() 0 4 1
A setClassName() 0 4 1
A setColor() 0 4 1
A setColorByPoint() 0 4 1
A setColorIndex() 0 4 1
A setColors() 0 4 1
A setCrisp() 0 4 1
A setCropThreshold() 0 4 1
B setCursor() 0 13 7
A setDataLabels() 0 4 1
A setDescription() 0 4 1
A setEnableMouseTracking() 0 4 1
A setEvents() 0 4 1
A setExposeElementToA11y() 0 4 1
A setFindNearestPointBy() 0 9 3
A setGetExtremesFromAll() 0 4 1
A setIgnoreHiddenPoint() 0 4 1
A setInteractByLeaf() 0 9 3
A setKeys() 0 4 1
A setLayoutAlgorithm() 0 11 5
A setLayoutStartingDirection() 0 9 3
A setLevelIsConstant() 0 9 3
A setLevels() 0 4 1
A setLinkedTo() 0 4 1
A setMaxPointWidth() 0 4 1
A setOpacity() 0 4 1
A setPoint() 0 4 1
A setPointDescriptionFormatter() 0 4 1
A setSelected() 0 4 1
A setShadow() 0 4 1
A setShowCheckbox() 0 4 1
A setShowInLegend() 0 4 1
A setSkipKeyboardNavigation() 0 4 1
A setSortIndex() 0 4 1
A setStates() 0 4 1
A setStickyTracking() 0 4 1
A setTooltip() 0 4 1
A setTurboThreshold() 0 4 1
A setVisible() 0 4 1
A setZoneAxis() 0 4 1
A setZones() 0 4 1
B toArray() 0 159 6

How to fix   Complexity   

Complex Class

Complex classes like HighchartsTreemap often do a lot of different things. To break such a class down, we need to identify a cohesive component within that class. A common approach to find such a component is to look for fields/methods that share the same prefixes, or suffixes. You can also have a look at the cohesion graph to spot any un-connected, or weakly-connected components.

Once you have determined the fields that belong together, you can apply the Extract Class refactoring. If the component makes sense as a sub-class, Extract Subclass is also a candidate, and is often faster.

While breaking up the class, it is a good idea to analyze how other classes use HighchartsTreemap, and based on these observations, apply Extract Interface, too.

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 treemap.
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 HighchartsTreemap implements JsonSerializable {
26
27
    /**
28
     * Allow drill to node.
29
     *
30
     * @var boolean
31
     * @since 4.1.0
32
     */
33
    private $allowDrillToNode = false;
34
35
    /**
36
     * Allow point select.
37
     *
38
     * @var boolean
39
     * @since 1.2.0
40
     */
41
    private $allowPointSelect = false;
42
43
    /**
44
     * Alternate starting direction.
45
     *
46
     * @var boolean
47
     * @since 4.1.0
48
     */
49
    private $alternateStartingDirection = false;
50
51
    /**
52
     * Animation.
53
     *
54
     * @var boolean
55
     */
56
    private $animation = true;
57
58
    /**
59
     * Animation limit.
60
     *
61
     * @var integer
62
     */
63
    private $animationLimit;
64
65
    /**
66
     * Border color.
67
     *
68
     * @var string
69
     */
70
    private $borderColor = "#e6e6e6";
71
72
    /**
73
     * Border width.
74
     *
75
     * @var integer
76
     */
77
    private $borderWidth = 1;
78
79
    /**
80
     * Class name.
81
     *
82
     * @var string
83
     * @since 5.0.0
84
     */
85
    private $className;
86
87
    /**
88
     * Color.
89
     *
90
     * @var string
91
     * @since 4.0
92
     */
93
    private $color;
94
95
    /**
96
     * Color by point.
97
     *
98
     * @var boolean
99
     * @since 2.0
100
     */
101
    private $colorByPoint = false;
102
103
    /**
104
     * Color index.
105
     *
106
     * @var integer
107
     * @since 5.0.0
108
     */
109
    private $colorIndex;
110
111
    /**
112
     * Colors.
113
     *
114
     * @var array
115
     * @since 3.0
116
     */
117
    private $colors;
118
119
    /**
120
     * Crisp.
121
     *
122
     * @var boolean
123
     * @since 5.0.10
124
     */
125
    private $crisp = true;
126
127
    /**
128
     * Crop threshold.
129
     *
130
     * @var integer
131
     * @since 4.1.0
132
     */
133
    private $cropThreshold = 300;
134
135
    /**
136
     * Cursor.
137
     *
138
     * @var string
139
     */
140
    private $cursor;
141
142
    /**
143
     * Data labels.
144
     *
145
     * @var \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Treemap\HighchartsDataLabels
146
     * @since 4.1.0
147
     */
148
    private $dataLabels;
149
150
    /**
151
     * Description.
152
     *
153
     * @var string
154
     * @since 5.0.0
155
     */
156
    private $description;
157
158
    /**
159
     * Enable mouse tracking.
160
     *
161
     * @var boolean
162
     */
163
    private $enableMouseTracking = true;
164
165
    /**
166
     * Events.
167
     *
168
     * @var \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Treemap\HighchartsEvents
169
     */
170
    private $events;
171
172
    /**
173
     * Expose element to a11y.
174
     *
175
     * @var boolean
176
     * @since 5.0.12
177
     */
178
    private $exposeElementToA11y;
179
180
    /**
181
     * Find nearest point by.
182
     *
183
     * @var string
184
     * @since 5.0.10
185
     */
186
    private $findNearestPointBy;
187
188
    /**
189
     * Get extremes from all.
190
     *
191
     * @var boolean
192
     * @since 4.1.6
193
     */
194
    private $getExtremesFromAll = false;
195
196
    /**
197
     * Ignore hidden point.
198
     *
199
     * @var boolean
200
     * @since 5.0.8
201
     */
202
    private $ignoreHiddenPoint = true;
203
204
    /**
205
     * Interact by leaf.
206
     *
207
     * @var boolean
208
     * @since 4.1.2
209
     */
210
    private $interactByLeaf;
211
212
    /**
213
     * Keys.
214
     *
215
     * @var array
216
     * @since 4.1.6
217
     */
218
    private $keys;
219
220
    /**
221
     * Layout algorithm.
222
     *
223
     * @var string
224
     * @since 4.1.0
225
     */
226
    private $layoutAlgorithm = "sliceAndDice";
227
228
    /**
229
     * Layout starting direction.
230
     *
231
     * @var string
232
     * @since 4.1.0
233
     */
234
    private $layoutStartingDirection = "vertical";
235
236
    /**
237
     * Level is constant.
238
     *
239
     * @var boolean
240
     * @since 4.1.0
241
     */
242
    private $levelIsConstant = true;
243
244
    /**
245
     * Levels.
246
     *
247
     * @var array
248
     * @since 4.1.0
249
     */
250
    private $levels;
251
252
    /**
253
     * Linked to.
254
     *
255
     * @var string
256
     * @since 3.0
257
     */
258
    private $linkedTo;
259
260
    /**
261
     * Max point width.
262
     *
263
     * @var integer
264
     * @since 4.1.8
265
     */
266
    private $maxPointWidth;
267
268
    /**
269
     * Opacity.
270
     *
271
     * @var integer
272
     * @since 4.2.4
273
     */
274
    private $opacity = 0.15;
275
276
    /**
277
     * Point.
278
     *
279
     * @var \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Treemap\HighchartsPoint
280
     */
281
    private $point;
282
283
    /**
284
     * Point description formatter.
285
     *
286
     * @var string
287
     * @since 5.0.12
288
     */
289
    private $pointDescriptionFormatter;
290
291
    /**
292
     * Selected.
293
     *
294
     * @var boolean
295
     * @since 1.2.0
296
     */
297
    private $selected = false;
298
299
    /**
300
     * Shadow.
301
     *
302
     * @var boolean|array
303
     */
304
    private $shadow = false;
305
306
    /**
307
     * Show checkbox.
308
     *
309
     * @var boolean
310
     * @since 1.2.0
311
     */
312
    private $showCheckbox = false;
313
314
    /**
315
     * Show in legend.
316
     *
317
     * @var boolean
318
     */
319
    private $showInLegend = false;
320
321
    /**
322
     * Skip keyboard navigation.
323
     *
324
     * @var boolean
325
     * @since 5.0.12
326
     */
327
    private $skipKeyboardNavigation;
328
329
    /**
330
     * Sort index.
331
     *
332
     * @var integer
333
     * @since 4.1.10
334
     */
335
    private $sortIndex;
336
337
    /**
338
     * States.
339
     *
340
     * @var \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Treemap\HighchartsStates
341
     */
342
    private $states;
343
344
    /**
345
     * Sticky tracking.
346
     *
347
     * @var boolean
348
     * @since 2.0
349
     */
350
    private $stickyTracking = true;
351
352
    /**
353
     * Tooltip.
354
     *
355
     * @var \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Treemap\HighchartsTooltip
356
     * @since 4.1.0
357
     */
358
    private $tooltip;
359
360
    /**
361
     * Turbo threshold.
362
     *
363
     * @var integer
364
     * @since 2.2
365
     */
366
    private $turboThreshold = 1000;
367
368
    /**
369
     * Visible.
370
     *
371
     * @var boolean
372
     */
373
    private $visible = true;
374
375
    /**
376
     * Zone axis.
377
     *
378
     * @var string
379
     * @since 4.1.0
380
     */
381
    private $zoneAxis = "y";
382
383
    /**
384
     * Zones.
385
     *
386
     * @var array
387
     * @since 4.1.0
388
     */
389
    private $zones;
390
391
    /**
392
     * Constructor.
393
     *
394
     * @param boolean $ignoreDefaultValues Ignore the default values.
395
     */
396
    public function __construct($ignoreDefaultValues = true) {
397
        if (true === $ignoreDefaultValues) {
398
            $this->clear();
399
        }
400
    }
401
402
    /**
403
     * Clear.
404
     *
405
     * @return void
406
     */
407
    public function clear() {
408
409
        // Clear the allow drill to node.
410
        $this->allowDrillToNode = null;
411
412
        // Clear the allow point select.
413
        $this->allowPointSelect = null;
414
415
        // Clear the alternate starting direction.
416
        $this->alternateStartingDirection = null;
417
418
        // Clear the animation.
419
        $this->animation = null;
420
421
        // Clear the animation limit.
422
        $this->animationLimit = null;
423
424
        // Clear the border color.
425
        $this->borderColor = null;
426
427
        // Clear the border width.
428
        $this->borderWidth = null;
429
430
        // Clear the class name.
431
        $this->className = null;
432
433
        // Clear the color.
434
        $this->color = null;
435
436
        // Clear the color by point.
437
        $this->colorByPoint = null;
438
439
        // Clear the color index.
440
        $this->colorIndex = null;
441
442
        // Clear the colors.
443
        $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...
444
445
        // Clear the crisp.
446
        $this->crisp = null;
447
448
        // Clear the crop threshold.
449
        $this->cropThreshold = null;
450
451
        // Clear the cursor.
452
        $this->cursor = null;
453
454
        // Clear the data labels.
455
        if (null !== $this->dataLabels) {
456
            $this->dataLabels->clear();
457
        }
458
459
        // Clear the description.
460
        $this->description = null;
461
462
        // Clear the enable mouse tracking.
463
        $this->enableMouseTracking = null;
464
465
        // Clear the events.
466
        if (null !== $this->events) {
467
            $this->events->clear();
468
        }
469
470
        // Clear the expose element to a11y.
471
        $this->exposeElementToA11y = null;
472
473
        // Clear the find nearest point by.
474
        $this->findNearestPointBy = null;
475
476
        // Clear the get extremes from all.
477
        $this->getExtremesFromAll = null;
478
479
        // Clear the ignore hidden point.
480
        $this->ignoreHiddenPoint = null;
481
482
        // Clear the interact by leaf.
483
        $this->interactByLeaf = null;
484
485
        // Clear the keys.
486
        $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...
487
488
        // Clear the layout algorithm.
489
        $this->layoutAlgorithm = null;
490
491
        // Clear the layout starting direction.
492
        $this->layoutStartingDirection = null;
493
494
        // Clear the level is constant.
495
        $this->levelIsConstant = null;
496
497
        // Clear the levels.
498
        $this->levels = 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 $levels.

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...
499
500
        // Clear the linked to.
501
        $this->linkedTo = null;
502
503
        // Clear the max point width.
504
        $this->maxPointWidth = null;
505
506
        // Clear the opacity.
507
        $this->opacity = null;
508
509
        // Clear the point.
510
        if (null !== $this->point) {
511
            $this->point->clear();
512
        }
513
514
        // Clear the point description formatter.
515
        $this->pointDescriptionFormatter = null;
516
517
        // Clear the selected.
518
        $this->selected = null;
519
520
        // Clear the shadow.
521
        $this->shadow = null;
522
523
        // Clear the show checkbox.
524
        $this->showCheckbox = null;
525
526
        // Clear the show in legend.
527
        $this->showInLegend = null;
528
529
        // Clear the skip keyboard navigation.
530
        $this->skipKeyboardNavigation = null;
531
532
        // Clear the sort index.
533
        $this->sortIndex = null;
534
535
        // Clear the states.
536
        if (null !== $this->states) {
537
            $this->states->clear();
538
        }
539
540
        // Clear the sticky tracking.
541
        $this->stickyTracking = null;
542
543
        // Clear the tooltip.
544
        if (null !== $this->tooltip) {
545
            $this->tooltip->clear();
546
        }
547
548
        // Clear the turbo threshold.
549
        $this->turboThreshold = null;
550
551
        // Clear the visible.
552
        $this->visible = null;
553
554
        // Clear the zone axis.
555
        $this->zoneAxis = null;
556
557
        // Clear the zones.
558
        $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...
559
    }
560
561
    /**
562
     * Get the allow drill to node.
563
     *
564
     * @return boolean Returns the allow drill to node.
565
     */
566
    public function getAllowDrillToNode() {
567
        return $this->allowDrillToNode;
568
    }
569
570
    /**
571
     * Get the allow point select.
572
     *
573
     * @return boolean Returns the allow point select.
574
     */
575
    public function getAllowPointSelect() {
576
        return $this->allowPointSelect;
577
    }
578
579
    /**
580
     * Get the alternate starting direction.
581
     *
582
     * @return boolean Returns the alternate starting direction.
583
     */
584
    public function getAlternateStartingDirection() {
585
        return $this->alternateStartingDirection;
586
    }
587
588
    /**
589
     * Get the animation.
590
     *
591
     * @return boolean Returns the animation.
592
     */
593
    public function getAnimation() {
594
        return $this->animation;
595
    }
596
597
    /**
598
     * Get the animation limit.
599
     *
600
     * @return integer Returns the animation limit.
601
     */
602
    public function getAnimationLimit() {
603
        return $this->animationLimit;
604
    }
605
606
    /**
607
     * Get the border color.
608
     *
609
     * @return string Returns the border color.
610
     */
611
    public function getBorderColor() {
612
        return $this->borderColor;
613
    }
614
615
    /**
616
     * Get the border width.
617
     *
618
     * @return integer Returns the border width.
619
     */
620
    public function getBorderWidth() {
621
        return $this->borderWidth;
622
    }
623
624
    /**
625
     * Get the class name.
626
     *
627
     * @return string Returns the class name.
628
     */
629
    public function getClassName() {
630
        return $this->className;
631
    }
632
633
    /**
634
     * Get the color.
635
     *
636
     * @return string Returns the color.
637
     */
638
    public function getColor() {
639
        return $this->color;
640
    }
641
642
    /**
643
     * Get the color by point.
644
     *
645
     * @return boolean Returns the color by point.
646
     */
647
    public function getColorByPoint() {
648
        return $this->colorByPoint;
649
    }
650
651
    /**
652
     * Get the color index.
653
     *
654
     * @return integer Returns the color index.
655
     */
656
    public function getColorIndex() {
657
        return $this->colorIndex;
658
    }
659
660
    /**
661
     * Get the colors.
662
     *
663
     * @return array Returns the colors.
664
     */
665
    public function getColors() {
666
        return $this->colors;
667
    }
668
669
    /**
670
     * Get the crisp.
671
     *
672
     * @return boolean Returns the crisp.
673
     */
674
    public function getCrisp() {
675
        return $this->crisp;
676
    }
677
678
    /**
679
     * Get the crop threshold.
680
     *
681
     * @return integer Returns the crop threshold.
682
     */
683
    public function getCropThreshold() {
684
        return $this->cropThreshold;
685
    }
686
687
    /**
688
     * Get the cursor.
689
     *
690
     * @return string Returns the cursor.
691
     */
692
    public function getCursor() {
693
        return $this->cursor;
694
    }
695
696
    /**
697
     * Get the data labels.
698
     *
699
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Treemap\HighchartsDataLabels Returns the data labels.
700
     */
701
    public function getDataLabels() {
702
        return $this->dataLabels;
703
    }
704
705
    /**
706
     * Get the description.
707
     *
708
     * @return string Returns the description.
709
     */
710
    public function getDescription() {
711
        return $this->description;
712
    }
713
714
    /**
715
     * Get the enable mouse tracking.
716
     *
717
     * @return boolean Returns the enable mouse tracking.
718
     */
719
    public function getEnableMouseTracking() {
720
        return $this->enableMouseTracking;
721
    }
722
723
    /**
724
     * Get the events.
725
     *
726
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Treemap\HighchartsEvents Returns the events.
727
     */
728
    public function getEvents() {
729
        return $this->events;
730
    }
731
732
    /**
733
     * Get the expose element to a11y.
734
     *
735
     * @return boolean Returns the expose element to a11y.
736
     */
737
    public function getExposeElementToA11y() {
738
        return $this->exposeElementToA11y;
739
    }
740
741
    /**
742
     * Get the find nearest point by.
743
     *
744
     * @return string Returns the find nearest point by.
745
     */
746
    public function getFindNearestPointBy() {
747
        return $this->findNearestPointBy;
748
    }
749
750
    /**
751
     * Get the get extremes from all.
752
     *
753
     * @return boolean Returns the get extremes from all.
754
     */
755
    public function getGetExtremesFromAll() {
756
        return $this->getExtremesFromAll;
757
    }
758
759
    /**
760
     * Get the ignore hidden point.
761
     *
762
     * @return boolean Returns the ignore hidden point.
763
     */
764
    public function getIgnoreHiddenPoint() {
765
        return $this->ignoreHiddenPoint;
766
    }
767
768
    /**
769
     * Get the interact by leaf.
770
     *
771
     * @return boolean Returns the interact by leaf.
772
     */
773
    public function getInteractByLeaf() {
774
        return $this->interactByLeaf;
775
    }
776
777
    /**
778
     * Get the keys.
779
     *
780
     * @return array Returns the keys.
781
     */
782
    public function getKeys() {
783
        return $this->keys;
784
    }
785
786
    /**
787
     * Get the layout algorithm.
788
     *
789
     * @return string Returns the layout algorithm.
790
     */
791
    public function getLayoutAlgorithm() {
792
        return $this->layoutAlgorithm;
793
    }
794
795
    /**
796
     * Get the layout starting direction.
797
     *
798
     * @return string Returns the layout starting direction.
799
     */
800
    public function getLayoutStartingDirection() {
801
        return $this->layoutStartingDirection;
802
    }
803
804
    /**
805
     * Get the level is constant.
806
     *
807
     * @return boolean Returns the level is constant.
808
     */
809
    public function getLevelIsConstant() {
810
        return $this->levelIsConstant;
811
    }
812
813
    /**
814
     * Get the levels.
815
     *
816
     * @return array Returns the levels.
817
     */
818
    public function getLevels() {
819
        return $this->levels;
820
    }
821
822
    /**
823
     * Get the linked to.
824
     *
825
     * @return string Returns the linked to.
826
     */
827
    public function getLinkedTo() {
828
        return $this->linkedTo;
829
    }
830
831
    /**
832
     * Get the max point width.
833
     *
834
     * @return integer Returns the max point width.
835
     */
836
    public function getMaxPointWidth() {
837
        return $this->maxPointWidth;
838
    }
839
840
    /**
841
     * Get the opacity.
842
     *
843
     * @return integer Returns the opacity.
844
     */
845
    public function getOpacity() {
846
        return $this->opacity;
847
    }
848
849
    /**
850
     * Get the point.
851
     *
852
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Treemap\HighchartsPoint Returns the point.
853
     */
854
    public function getPoint() {
855
        return $this->point;
856
    }
857
858
    /**
859
     * Get the point description formatter.
860
     *
861
     * @return string Returns the point description formatter.
862
     */
863
    public function getPointDescriptionFormatter() {
864
        return $this->pointDescriptionFormatter;
865
    }
866
867
    /**
868
     * Get the selected.
869
     *
870
     * @return boolean Returns the selected.
871
     */
872
    public function getSelected() {
873
        return $this->selected;
874
    }
875
876
    /**
877
     * Get the shadow.
878
     *
879
     * @return boolean|array Returns the shadow.
880
     */
881
    public function getShadow() {
882
        return $this->shadow;
883
    }
884
885
    /**
886
     * Get the show checkbox.
887
     *
888
     * @return boolean Returns the show checkbox.
889
     */
890
    public function getShowCheckbox() {
891
        return $this->showCheckbox;
892
    }
893
894
    /**
895
     * Get the show in legend.
896
     *
897
     * @return boolean Returns the show in legend.
898
     */
899
    public function getShowInLegend() {
900
        return $this->showInLegend;
901
    }
902
903
    /**
904
     * Get the skip keyboard navigation.
905
     *
906
     * @return boolean Returns the skip keyboard navigation.
907
     */
908
    public function getSkipKeyboardNavigation() {
909
        return $this->skipKeyboardNavigation;
910
    }
911
912
    /**
913
     * Get the sort index.
914
     *
915
     * @return integer Returns the sort index.
916
     */
917
    public function getSortIndex() {
918
        return $this->sortIndex;
919
    }
920
921
    /**
922
     * Get the states.
923
     *
924
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Treemap\HighchartsStates Returns the states.
925
     */
926
    public function getStates() {
927
        return $this->states;
928
    }
929
930
    /**
931
     * Get the sticky tracking.
932
     *
933
     * @return boolean Returns the sticky tracking.
934
     */
935
    public function getStickyTracking() {
936
        return $this->stickyTracking;
937
    }
938
939
    /**
940
     * Get the tooltip.
941
     *
942
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Treemap\HighchartsTooltip Returns the tooltip.
943
     */
944
    public function getTooltip() {
945
        return $this->tooltip;
946
    }
947
948
    /**
949
     * Get the turbo threshold.
950
     *
951
     * @return integer Returns the turbo threshold.
952
     */
953
    public function getTurboThreshold() {
954
        return $this->turboThreshold;
955
    }
956
957
    /**
958
     * Get the visible.
959
     *
960
     * @return boolean Returns the visible.
961
     */
962
    public function getVisible() {
963
        return $this->visible;
964
    }
965
966
    /**
967
     * Get the zone axis.
968
     *
969
     * @return string Returns the zone axis.
970
     */
971
    public function getZoneAxis() {
972
        return $this->zoneAxis;
973
    }
974
975
    /**
976
     * Get the zones.
977
     *
978
     * @return array Returns the zones.
979
     */
980
    public function getZones() {
981
        return $this->zones;
982
    }
983
984
    /**
985
     * Serialize this instance.
986
     *
987
     * @return array Returns an array representing this instance.
988
     */
989
    public function jsonSerialize() {
990
        return $this->toArray();
991
    }
992
993
    /**
994
     * Create a new data labels.
995
     *
996
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Treemap\HighchartsDataLabels Returns the data labels.
997
     */
998
    public function newDataLabels() {
999
        $this->dataLabels = new \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Treemap\HighchartsDataLabels();
1000
        return $this->dataLabels;
1001
    }
1002
1003
    /**
1004
     * Create a new events.
1005
     *
1006
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Treemap\HighchartsEvents Returns the events.
1007
     */
1008
    public function newEvents() {
1009
        $this->events = new \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Treemap\HighchartsEvents();
1010
        return $this->events;
1011
    }
1012
1013
    /**
1014
     * Create a new point.
1015
     *
1016
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Treemap\HighchartsPoint Returns the point.
1017
     */
1018
    public function newPoint() {
1019
        $this->point = new \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Treemap\HighchartsPoint();
1020
        return $this->point;
1021
    }
1022
1023
    /**
1024
     * Create a new states.
1025
     *
1026
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Treemap\HighchartsStates Returns the states.
1027
     */
1028
    public function newStates() {
1029
        $this->states = new \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Treemap\HighchartsStates();
1030
        return $this->states;
1031
    }
1032
1033
    /**
1034
     * Create a new tooltip.
1035
     *
1036
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Treemap\HighchartsTooltip Returns the tooltip.
1037
     */
1038
    public function newTooltip() {
1039
        $this->tooltip = new \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Treemap\HighchartsTooltip();
1040
        return $this->tooltip;
1041
    }
1042
1043
    /**
1044
     * Set the allow drill to node.
1045
     *
1046
     * @param boolean $allowDrillToNode The allow drill to node.
1047
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsTreemap Returns the highcharts treemap.
1048
     */
1049
    public function setAllowDrillToNode($allowDrillToNode) {
1050
        switch ($allowDrillToNode) {
1051
            case "false":
1052
            case "true":
1053
            $this->allowDrillToNode = $allowDrillToNode;
1054
            break;
1055
        }
1056
        return $this;
1057
    }
1058
1059
    /**
1060
     * Set the allow point select.
1061
     *
1062
     * @param boolean $allowPointSelect The allow point select.
1063
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsTreemap Returns the highcharts treemap.
1064
     */
1065
    public function setAllowPointSelect($allowPointSelect) {
1066
        $this->allowPointSelect = $allowPointSelect;
1067
        return $this;
1068
    }
1069
1070
    /**
1071
     * Set the alternate starting direction.
1072
     *
1073
     * @param boolean $alternateStartingDirection The alternate starting direction.
1074
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsTreemap Returns the highcharts treemap.
1075
     */
1076
    public function setAlternateStartingDirection($alternateStartingDirection) {
1077
        $this->alternateStartingDirection = $alternateStartingDirection;
1078
        return $this;
1079
    }
1080
1081
    /**
1082
     * Set the animation.
1083
     *
1084
     * @param boolean $animation The animation.
1085
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsTreemap Returns the highcharts treemap.
1086
     */
1087
    public function setAnimation($animation) {
1088
        $this->animation = $animation;
1089
        return $this;
1090
    }
1091
1092
    /**
1093
     * Set the animation limit.
1094
     *
1095
     * @param integer $animationLimit The animation limit.
1096
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsTreemap Returns the highcharts treemap.
1097
     */
1098
    public function setAnimationLimit($animationLimit) {
1099
        $this->animationLimit = $animationLimit;
1100
        return $this;
1101
    }
1102
1103
    /**
1104
     * Set the border color.
1105
     *
1106
     * @param string $borderColor The border color.
1107
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsTreemap Returns the highcharts treemap.
1108
     */
1109
    public function setBorderColor($borderColor) {
1110
        $this->borderColor = $borderColor;
1111
        return $this;
1112
    }
1113
1114
    /**
1115
     * Set the border width.
1116
     *
1117
     * @param integer $borderWidth The border width.
1118
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsTreemap Returns the highcharts treemap.
1119
     */
1120
    public function setBorderWidth($borderWidth) {
1121
        $this->borderWidth = $borderWidth;
1122
        return $this;
1123
    }
1124
1125
    /**
1126
     * Set the class name.
1127
     *
1128
     * @param string $className The class name.
1129
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsTreemap Returns the highcharts treemap.
1130
     */
1131
    public function setClassName($className) {
1132
        $this->className = $className;
1133
        return $this;
1134
    }
1135
1136
    /**
1137
     * Set the color.
1138
     *
1139
     * @param string $color The color.
1140
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsTreemap Returns the highcharts treemap.
1141
     */
1142
    public function setColor($color) {
1143
        $this->color = $color;
1144
        return $this;
1145
    }
1146
1147
    /**
1148
     * Set the color by point.
1149
     *
1150
     * @param boolean $colorByPoint The color by point.
1151
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsTreemap Returns the highcharts treemap.
1152
     */
1153
    public function setColorByPoint($colorByPoint) {
1154
        $this->colorByPoint = $colorByPoint;
1155
        return $this;
1156
    }
1157
1158
    /**
1159
     * Set the color index.
1160
     *
1161
     * @param integer $colorIndex The color index.
1162
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsTreemap Returns the highcharts treemap.
1163
     */
1164
    public function setColorIndex($colorIndex) {
1165
        $this->colorIndex = $colorIndex;
1166
        return $this;
1167
    }
1168
1169
    /**
1170
     * Set the colors.
1171
     *
1172
     * @param array $colors The colors.
1173
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsTreemap Returns the highcharts treemap.
1174
     */
1175
    public function setColors(array $colors = null) {
1176
        $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...
1177
        return $this;
1178
    }
1179
1180
    /**
1181
     * Set the crisp.
1182
     *
1183
     * @param boolean $crisp The crisp.
1184
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsTreemap Returns the highcharts treemap.
1185
     */
1186
    public function setCrisp($crisp) {
1187
        $this->crisp = $crisp;
1188
        return $this;
1189
    }
1190
1191
    /**
1192
     * Set the crop threshold.
1193
     *
1194
     * @param integer $cropThreshold The crop threshold.
1195
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsTreemap Returns the highcharts treemap.
1196
     */
1197
    public function setCropThreshold($cropThreshold) {
1198
        $this->cropThreshold = $cropThreshold;
1199
        return $this;
1200
    }
1201
1202
    /**
1203
     * Set the cursor.
1204
     *
1205
     * @param string $cursor The cursor.
1206
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsTreemap Returns the highcharts treemap.
1207
     */
1208
    public function setCursor($cursor) {
1209
        switch ($cursor) {
1210
            case null:
1211
            case "crosshair":
1212
            case "default":
1213
            case "help":
1214
            case "none":
1215
            case "pointer":
1216
            $this->cursor = $cursor;
1217
            break;
1218
        }
1219
        return $this;
1220
    }
1221
1222
    /**
1223
     * Set the data labels.
1224
     *
1225
     * @param \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Treemap\HighchartsDataLabels $dataLabels The data labels.
1226
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsTreemap Returns the highcharts treemap.
1227
     */
1228
    public function setDataLabels(\WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Treemap\HighchartsDataLabels $dataLabels = null) {
1229
        $this->dataLabels = $dataLabels;
1230
        return $this;
1231
    }
1232
1233
    /**
1234
     * Set the description.
1235
     *
1236
     * @param string $description The description.
1237
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsTreemap Returns the highcharts treemap.
1238
     */
1239
    public function setDescription($description) {
1240
        $this->description = $description;
1241
        return $this;
1242
    }
1243
1244
    /**
1245
     * Set the enable mouse tracking.
1246
     *
1247
     * @param boolean $enableMouseTracking The enable mouse tracking.
1248
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsTreemap Returns the highcharts treemap.
1249
     */
1250
    public function setEnableMouseTracking($enableMouseTracking) {
1251
        $this->enableMouseTracking = $enableMouseTracking;
1252
        return $this;
1253
    }
1254
1255
    /**
1256
     * Set the events.
1257
     *
1258
     * @param \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Treemap\HighchartsEvents $events The events.
1259
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsTreemap Returns the highcharts treemap.
1260
     */
1261
    public function setEvents(\WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Treemap\HighchartsEvents $events = null) {
1262
        $this->events = $events;
1263
        return $this;
1264
    }
1265
1266
    /**
1267
     * Set the expose element to a11y.
1268
     *
1269
     * @param boolean $exposeElementToA11y The expose element to a11y.
1270
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsTreemap Returns the highcharts treemap.
1271
     */
1272
    public function setExposeElementToA11y($exposeElementToA11y) {
1273
        $this->exposeElementToA11y = $exposeElementToA11y;
1274
        return $this;
1275
    }
1276
1277
    /**
1278
     * Set the find nearest point by.
1279
     *
1280
     * @param string $findNearestPointBy The find nearest point by.
1281
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsTreemap Returns the highcharts treemap.
1282
     */
1283
    public function setFindNearestPointBy($findNearestPointBy) {
1284
        switch ($findNearestPointBy) {
1285
            case "x":
1286
            case "xy":
1287
            $this->findNearestPointBy = $findNearestPointBy;
1288
            break;
1289
        }
1290
        return $this;
1291
    }
1292
1293
    /**
1294
     * Set the get extremes from all.
1295
     *
1296
     * @param boolean $getExtremesFromAll The get extremes from all.
1297
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsTreemap Returns the highcharts treemap.
1298
     */
1299
    public function setGetExtremesFromAll($getExtremesFromAll) {
1300
        $this->getExtremesFromAll = $getExtremesFromAll;
1301
        return $this;
1302
    }
1303
1304
    /**
1305
     * Set the ignore hidden point.
1306
     *
1307
     * @param boolean $ignoreHiddenPoint The ignore hidden point.
1308
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsTreemap Returns the highcharts treemap.
1309
     */
1310
    public function setIgnoreHiddenPoint($ignoreHiddenPoint) {
1311
        $this->ignoreHiddenPoint = $ignoreHiddenPoint;
1312
        return $this;
1313
    }
1314
1315
    /**
1316
     * Set the interact by leaf.
1317
     *
1318
     * @param boolean $interactByLeaf The interact by leaf.
1319
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsTreemap Returns the highcharts treemap.
1320
     */
1321
    public function setInteractByLeaf($interactByLeaf) {
1322
        switch ($interactByLeaf) {
1323
            case false:
1324
            case true:
1325
            $this->interactByLeaf = $interactByLeaf;
1326
            break;
1327
        }
1328
        return $this;
1329
    }
1330
1331
    /**
1332
     * Set the keys.
1333
     *
1334
     * @param array $keys The keys.
1335
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsTreemap Returns the highcharts treemap.
1336
     */
1337
    public function setKeys(array $keys = null) {
1338
        $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...
1339
        return $this;
1340
    }
1341
1342
    /**
1343
     * Set the layout algorithm.
1344
     *
1345
     * @param string $layoutAlgorithm The layout algorithm.
1346
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsTreemap Returns the highcharts treemap.
1347
     */
1348
    public function setLayoutAlgorithm($layoutAlgorithm) {
1349
        switch ($layoutAlgorithm) {
1350
            case "sliceAndDice":
1351
            case "squarified":
1352
            case "strip":
1353
            case "stripes":
1354
            $this->layoutAlgorithm = $layoutAlgorithm;
1355
            break;
1356
        }
1357
        return $this;
1358
    }
1359
1360
    /**
1361
     * Set the layout starting direction.
1362
     *
1363
     * @param string $layoutStartingDirection The layout starting direction.
1364
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsTreemap Returns the highcharts treemap.
1365
     */
1366
    public function setLayoutStartingDirection($layoutStartingDirection) {
1367
        switch ($layoutStartingDirection) {
1368
            case "horizontal":
1369
            case "vertical":
1370
            $this->layoutStartingDirection = $layoutStartingDirection;
1371
            break;
1372
        }
1373
        return $this;
1374
    }
1375
1376
    /**
1377
     * Set the level is constant.
1378
     *
1379
     * @param boolean $levelIsConstant The level is constant.
1380
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsTreemap Returns the highcharts treemap.
1381
     */
1382
    public function setLevelIsConstant($levelIsConstant) {
1383
        switch ($levelIsConstant) {
1384
            case "false":
1385
            case "true":
1386
            $this->levelIsConstant = $levelIsConstant;
1387
            break;
1388
        }
1389
        return $this;
1390
    }
1391
1392
    /**
1393
     * Set the levels.
1394
     *
1395
     * @param array $levels The levels.
1396
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsTreemap Returns the highcharts treemap.
1397
     */
1398
    public function setLevels(array $levels = null) {
1399
        $this->levels = $levels;
0 ignored issues
show
Documentation Bug introduced by
It seems like $levels can be null. However, the property $levels 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...
1400
        return $this;
1401
    }
1402
1403
    /**
1404
     * Set the linked to.
1405
     *
1406
     * @param string $linkedTo The linked to.
1407
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsTreemap Returns the highcharts treemap.
1408
     */
1409
    public function setLinkedTo($linkedTo) {
1410
        $this->linkedTo = $linkedTo;
1411
        return $this;
1412
    }
1413
1414
    /**
1415
     * Set the max point width.
1416
     *
1417
     * @param integer $maxPointWidth The max point width.
1418
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsTreemap Returns the highcharts treemap.
1419
     */
1420
    public function setMaxPointWidth($maxPointWidth) {
1421
        $this->maxPointWidth = $maxPointWidth;
1422
        return $this;
1423
    }
1424
1425
    /**
1426
     * Set the opacity.
1427
     *
1428
     * @param integer $opacity The opacity.
1429
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsTreemap Returns the highcharts treemap.
1430
     */
1431
    public function setOpacity($opacity) {
1432
        $this->opacity = $opacity;
1433
        return $this;
1434
    }
1435
1436
    /**
1437
     * Set the point.
1438
     *
1439
     * @param \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Treemap\HighchartsPoint $point The point.
1440
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsTreemap Returns the highcharts treemap.
1441
     */
1442
    public function setPoint(\WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Treemap\HighchartsPoint $point = null) {
1443
        $this->point = $point;
1444
        return $this;
1445
    }
1446
1447
    /**
1448
     * Set the point description formatter.
1449
     *
1450
     * @param string $pointDescriptionFormatter The point description formatter.
1451
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsTreemap Returns the highcharts treemap.
1452
     */
1453
    public function setPointDescriptionFormatter($pointDescriptionFormatter) {
1454
        $this->pointDescriptionFormatter = $pointDescriptionFormatter;
1455
        return $this;
1456
    }
1457
1458
    /**
1459
     * Set the selected.
1460
     *
1461
     * @param boolean $selected The selected.
1462
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsTreemap Returns the highcharts treemap.
1463
     */
1464
    public function setSelected($selected) {
1465
        $this->selected = $selected;
1466
        return $this;
1467
    }
1468
1469
    /**
1470
     * Set the shadow.
1471
     *
1472
     * @param boolean|array $shadow The shadow.
1473
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsTreemap Returns the highcharts treemap.
1474
     */
1475
    public function setShadow($shadow) {
1476
        $this->shadow = $shadow;
1477
        return $this;
1478
    }
1479
1480
    /**
1481
     * Set the show checkbox.
1482
     *
1483
     * @param boolean $showCheckbox The show checkbox.
1484
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsTreemap Returns the highcharts treemap.
1485
     */
1486
    public function setShowCheckbox($showCheckbox) {
1487
        $this->showCheckbox = $showCheckbox;
1488
        return $this;
1489
    }
1490
1491
    /**
1492
     * Set the show in legend.
1493
     *
1494
     * @param boolean $showInLegend The show in legend.
1495
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsTreemap Returns the highcharts treemap.
1496
     */
1497
    public function setShowInLegend($showInLegend) {
1498
        $this->showInLegend = $showInLegend;
1499
        return $this;
1500
    }
1501
1502
    /**
1503
     * Set the skip keyboard navigation.
1504
     *
1505
     * @param boolean $skipKeyboardNavigation The skip keyboard navigation.
1506
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsTreemap Returns the highcharts treemap.
1507
     */
1508
    public function setSkipKeyboardNavigation($skipKeyboardNavigation) {
1509
        $this->skipKeyboardNavigation = $skipKeyboardNavigation;
1510
        return $this;
1511
    }
1512
1513
    /**
1514
     * Set the sort index.
1515
     *
1516
     * @param integer $sortIndex The sort index.
1517
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsTreemap Returns the highcharts treemap.
1518
     */
1519
    public function setSortIndex($sortIndex) {
1520
        $this->sortIndex = $sortIndex;
1521
        return $this;
1522
    }
1523
1524
    /**
1525
     * Set the states.
1526
     *
1527
     * @param \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Treemap\HighchartsStates $states The states.
1528
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsTreemap Returns the highcharts treemap.
1529
     */
1530
    public function setStates(\WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Treemap\HighchartsStates $states = null) {
1531
        $this->states = $states;
1532
        return $this;
1533
    }
1534
1535
    /**
1536
     * Set the sticky tracking.
1537
     *
1538
     * @param boolean $stickyTracking The sticky tracking.
1539
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsTreemap Returns the highcharts treemap.
1540
     */
1541
    public function setStickyTracking($stickyTracking) {
1542
        $this->stickyTracking = $stickyTracking;
1543
        return $this;
1544
    }
1545
1546
    /**
1547
     * Set the tooltip.
1548
     *
1549
     * @param \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Treemap\HighchartsTooltip $tooltip The tooltip.
1550
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsTreemap Returns the highcharts treemap.
1551
     */
1552
    public function setTooltip(\WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Treemap\HighchartsTooltip $tooltip = null) {
1553
        $this->tooltip = $tooltip;
1554
        return $this;
1555
    }
1556
1557
    /**
1558
     * Set the turbo threshold.
1559
     *
1560
     * @param integer $turboThreshold The turbo threshold.
1561
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsTreemap Returns the highcharts treemap.
1562
     */
1563
    public function setTurboThreshold($turboThreshold) {
1564
        $this->turboThreshold = $turboThreshold;
1565
        return $this;
1566
    }
1567
1568
    /**
1569
     * Set the visible.
1570
     *
1571
     * @param boolean $visible The visible.
1572
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsTreemap Returns the highcharts treemap.
1573
     */
1574
    public function setVisible($visible) {
1575
        $this->visible = $visible;
1576
        return $this;
1577
    }
1578
1579
    /**
1580
     * Set the zone axis.
1581
     *
1582
     * @param string $zoneAxis The zone axis.
1583
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsTreemap Returns the highcharts treemap.
1584
     */
1585
    public function setZoneAxis($zoneAxis) {
1586
        $this->zoneAxis = $zoneAxis;
1587
        return $this;
1588
    }
1589
1590
    /**
1591
     * Set the zones.
1592
     *
1593
     * @param array $zones The zones.
1594
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsTreemap Returns the highcharts treemap.
1595
     */
1596
    public function setZones(array $zones = null) {
1597
        $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...
1598
        return $this;
1599
    }
1600
1601
    /**
1602
     * Convert into an array representing this instance.
1603
     *
1604
     * @return array Returns an array representing this instance.
1605
     */
1606
    public function toArray() {
1607
1608
        // Initialize the output.
1609
        $output = [];
1610
1611
        // Set the allow drill to node.
1612
        ArrayUtility::set($output, "allowDrillToNode", $this->allowDrillToNode, [null]);
1613
1614
        // Set the allow point select.
1615
        ArrayUtility::set($output, "allowPointSelect", $this->allowPointSelect, [null]);
1616
1617
        // Set the alternate starting direction.
1618
        ArrayUtility::set($output, "alternateStartingDirection", $this->alternateStartingDirection, [null]);
1619
1620
        // Set the animation.
1621
        ArrayUtility::set($output, "animation", $this->animation, [null]);
1622
1623
        // Set the animation limit.
1624
        ArrayUtility::set($output, "animationLimit", $this->animationLimit, [null]);
1625
1626
        // Set the border color.
1627
        ArrayUtility::set($output, "borderColor", $this->borderColor, [null]);
1628
1629
        // Set the border width.
1630
        ArrayUtility::set($output, "borderWidth", $this->borderWidth, [null]);
1631
1632
        // Set the class name.
1633
        ArrayUtility::set($output, "className", $this->className, [null]);
1634
1635
        // Set the color.
1636
        ArrayUtility::set($output, "color", $this->color, [null]);
1637
1638
        // Set the color by point.
1639
        ArrayUtility::set($output, "colorByPoint", $this->colorByPoint, [null]);
1640
1641
        // Set the color index.
1642
        ArrayUtility::set($output, "colorIndex", $this->colorIndex, [null]);
1643
1644
        // Set the colors.
1645
        ArrayUtility::set($output, "colors", $this->colors, [null]);
1646
1647
        // Set the crisp.
1648
        ArrayUtility::set($output, "crisp", $this->crisp, [null]);
1649
1650
        // Set the crop threshold.
1651
        ArrayUtility::set($output, "cropThreshold", $this->cropThreshold, [null]);
1652
1653
        // Set the cursor.
1654
        ArrayUtility::set($output, "cursor", $this->cursor, [null]);
1655
1656
        // Set the data labels.
1657
        if (null !== $this->dataLabels) {
1658
            ArrayUtility::set($output, "dataLabels", $this->dataLabels->toArray(), []);
1659
        }
1660
1661
        // Set the description.
1662
        ArrayUtility::set($output, "description", $this->description, [null]);
1663
1664
        // Set the enable mouse tracking.
1665
        ArrayUtility::set($output, "enableMouseTracking", $this->enableMouseTracking, [null]);
1666
1667
        // Set the events.
1668
        if (null !== $this->events) {
1669
            ArrayUtility::set($output, "events", $this->events->toArray(), []);
1670
        }
1671
1672
        // Set the expose element to a11y.
1673
        ArrayUtility::set($output, "exposeElementToA11y", $this->exposeElementToA11y, [null]);
1674
1675
        // Set the find nearest point by.
1676
        ArrayUtility::set($output, "findNearestPointBy", $this->findNearestPointBy, [null]);
1677
1678
        // Set the get extremes from all.
1679
        ArrayUtility::set($output, "getExtremesFromAll", $this->getExtremesFromAll, [null]);
1680
1681
        // Set the ignore hidden point.
1682
        ArrayUtility::set($output, "ignoreHiddenPoint", $this->ignoreHiddenPoint, [null]);
1683
1684
        // Set the interact by leaf.
1685
        ArrayUtility::set($output, "interactByLeaf", $this->interactByLeaf, [null]);
1686
1687
        // Set the keys.
1688
        ArrayUtility::set($output, "keys", $this->keys, [null]);
1689
1690
        // Set the layout algorithm.
1691
        ArrayUtility::set($output, "layoutAlgorithm", $this->layoutAlgorithm, [null]);
1692
1693
        // Set the layout starting direction.
1694
        ArrayUtility::set($output, "layoutStartingDirection", $this->layoutStartingDirection, [null]);
1695
1696
        // Set the level is constant.
1697
        ArrayUtility::set($output, "levelIsConstant", $this->levelIsConstant, [null]);
1698
1699
        // Set the levels.
1700
        ArrayUtility::set($output, "levels", $this->levels, [null]);
1701
1702
        // Set the linked to.
1703
        ArrayUtility::set($output, "linkedTo", $this->linkedTo, [null]);
1704
1705
        // Set the max point width.
1706
        ArrayUtility::set($output, "maxPointWidth", $this->maxPointWidth, [null]);
1707
1708
        // Set the opacity.
1709
        ArrayUtility::set($output, "opacity", $this->opacity, [null]);
1710
1711
        // Set the point.
1712
        if (null !== $this->point) {
1713
            ArrayUtility::set($output, "point", $this->point->toArray(), []);
1714
        }
1715
1716
        // Set the point description formatter.
1717
        ArrayUtility::set($output, "pointDescriptionFormatter", $this->pointDescriptionFormatter, [null]);
1718
1719
        // Set the selected.
1720
        ArrayUtility::set($output, "selected", $this->selected, [null]);
1721
1722
        // Set the shadow.
1723
        ArrayUtility::set($output, "shadow", $this->shadow, [null]);
1724
1725
        // Set the show checkbox.
1726
        ArrayUtility::set($output, "showCheckbox", $this->showCheckbox, [null]);
1727
1728
        // Set the show in legend.
1729
        ArrayUtility::set($output, "showInLegend", $this->showInLegend, [null]);
1730
1731
        // Set the skip keyboard navigation.
1732
        ArrayUtility::set($output, "skipKeyboardNavigation", $this->skipKeyboardNavigation, [null]);
1733
1734
        // Set the sort index.
1735
        ArrayUtility::set($output, "sortIndex", $this->sortIndex, [null]);
1736
1737
        // Set the states.
1738
        if (null !== $this->states) {
1739
            ArrayUtility::set($output, "states", $this->states->toArray(), []);
1740
        }
1741
1742
        // Set the sticky tracking.
1743
        ArrayUtility::set($output, "stickyTracking", $this->stickyTracking, [null]);
1744
1745
        // Set the tooltip.
1746
        if (null !== $this->tooltip) {
1747
            ArrayUtility::set($output, "tooltip", $this->tooltip->toArray(), []);
1748
        }
1749
1750
        // Set the turbo threshold.
1751
        ArrayUtility::set($output, "turboThreshold", $this->turboThreshold, [null]);
1752
1753
        // Set the visible.
1754
        ArrayUtility::set($output, "visible", $this->visible, [null]);
1755
1756
        // Set the zone axis.
1757
        ArrayUtility::set($output, "zoneAxis", $this->zoneAxis, [null]);
1758
1759
        // Set the zones.
1760
        ArrayUtility::set($output, "zones", $this->zones, [null]);
1761
1762
        // Return the output.
1763
        return $output;
1764
    }
1765
1766
}
1767