HighchartsArea::setKeys()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
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 area.
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 HighchartsArea 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.
37
     *
38
     * @var boolean
39
     */
40
    private $animation = true;
41
42
    /**
43
     * Animation limit.
44
     *
45
     * @var integer
46
     */
47
    private $animationLimit;
48
49
    /**
50
     * Class name.
51
     *
52
     * @var string
53
     * @since 5.0.0
54
     */
55
    private $className;
56
57
    /**
58
     * Color.
59
     *
60
     * @var string
61
     */
62
    private $color;
63
64
    /**
65
     * Color index.
66
     *
67
     * @var integer
68
     * @since 5.0.0
69
     */
70
    private $colorIndex;
71
72
    /**
73
     * Connect ends.
74
     *
75
     * @var boolean
76
     * @since 2.3.0
77
     */
78
    private $connectEnds = true;
79
80
    /**
81
     * Connect nulls.
82
     *
83
     * @var boolean
84
     */
85
    private $connectNulls = false;
86
87
    /**
88
     * Crop threshold.
89
     *
90
     * @var integer
91
     * @since 2.2
92
     */
93
    private $cropThreshold = 300;
94
95
    /**
96
     * Cursor.
97
     *
98
     * @var string
99
     */
100
    private $cursor;
101
102
    /**
103
     * Dash style.
104
     *
105
     * @var string
106
     * @since 2.1
107
     */
108
    private $dashStyle = "Solid";
109
110
    /**
111
     * Data labels.
112
     *
113
     * @var \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Area\HighchartsDataLabels
114
     */
115
    private $dataLabels;
116
117
    /**
118
     * Description.
119
     *
120
     * @var string
121
     * @since 5.0.0
122
     */
123
    private $description;
124
125
    /**
126
     * Enable mouse tracking.
127
     *
128
     * @var boolean
129
     */
130
    private $enableMouseTracking = true;
131
132
    /**
133
     * Events.
134
     *
135
     * @var \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Area\HighchartsEvents
136
     */
137
    private $events;
138
139
    /**
140
     * Expose element to a11y.
141
     *
142
     * @var boolean
143
     * @since 5.0.12
144
     */
145
    private $exposeElementToA11y;
146
147
    /**
148
     * Fill color.
149
     *
150
     * @var string
151
     */
152
    private $fillColor;
153
154
    /**
155
     * Fill opacity.
156
     *
157
     * @var integer
158
     */
159
    private $fillOpacity = 0.75;
160
161
    /**
162
     * Find nearest point by.
163
     *
164
     * @var string
165
     * @since 5.0.10
166
     */
167
    private $findNearestPointBy;
168
169
    /**
170
     * Get extremes from all.
171
     *
172
     * @var boolean
173
     * @since 4.1.6
174
     */
175
    private $getExtremesFromAll = false;
176
177
    /**
178
     * Keys.
179
     *
180
     * @var array
181
     * @since 4.1.6
182
     */
183
    private $keys;
184
185
    /**
186
     * Line color.
187
     *
188
     * @var string
189
     */
190
    private $lineColor;
191
192
    /**
193
     * Line width.
194
     *
195
     * @var integer
196
     */
197
    private $lineWidth = 2;
198
199
    /**
200
     * Linecap.
201
     *
202
     * @var string
203
     */
204
    private $linecap = "round";
205
206
    /**
207
     * Linked to.
208
     *
209
     * @var string
210
     * @since 3.0
211
     */
212
    private $linkedTo;
213
214
    /**
215
     * Marker.
216
     *
217
     * @var \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Area\HighchartsMarker
218
     */
219
    private $marker;
220
221
    /**
222
     * Negative color.
223
     *
224
     * @var string
225
     * @since 3.0
226
     */
227
    private $negativeColor;
228
229
    /**
230
     * Negative fill color.
231
     *
232
     * @var string
233
     * @since 3.0
234
     */
235
    private $negativeFillColor;
236
237
    /**
238
     * Point.
239
     *
240
     * @var \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Area\HighchartsPoint
241
     */
242
    private $point;
243
244
    /**
245
     * Point description formatter.
246
     *
247
     * @var string
248
     * @since 5.0.12
249
     */
250
    private $pointDescriptionFormatter;
251
252
    /**
253
     * Point interval.
254
     *
255
     * @var integer
256
     */
257
    private $pointInterval = 1;
258
259
    /**
260
     * Point interval unit.
261
     *
262
     * @var string
263
     * @since 4.1.0
264
     */
265
    private $pointIntervalUnit;
266
267
    /**
268
     * Point placement.
269
     *
270
     * @var string|integer
271
     * @since 2.3.0
272
     */
273
    private $pointPlacement;
274
275
    /**
276
     * Point start.
277
     *
278
     * @var integer
279
     */
280
    private $pointStart = 0;
281
282
    /**
283
     * Selected.
284
     *
285
     * @var boolean
286
     * @since 1.2.0
287
     */
288
    private $selected = false;
289
290
    /**
291
     * Shadow.
292
     *
293
     * @var boolean|array
294
     */
295
    private $shadow = false;
296
297
    /**
298
     * Show checkbox.
299
     *
300
     * @var boolean
301
     * @since 1.2.0
302
     */
303
    private $showCheckbox = false;
304
305
    /**
306
     * Show in legend.
307
     *
308
     * @var boolean
309
     */
310
    private $showInLegend = true;
311
312
    /**
313
     * Skip keyboard navigation.
314
     *
315
     * @var boolean
316
     * @since 5.0.12
317
     */
318
    private $skipKeyboardNavigation;
319
320
    /**
321
     * Soft threshold.
322
     *
323
     * @var boolean
324
     * @since 4.1.9
325
     */
326
    private $softThreshold = false;
327
328
    /**
329
     * Stacking.
330
     *
331
     * @var string
332
     */
333
    private $stacking;
334
335
    /**
336
     * States.
337
     *
338
     * @var \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Area\HighchartsStates
339
     */
340
    private $states;
341
342
    /**
343
     * Step.
344
     *
345
     * @var string
346
     * @since 1.2.5
347
     */
348
    private $step = "false";
349
350
    /**
351
     * Sticky tracking.
352
     *
353
     * @var boolean
354
     * @since 2.0
355
     */
356
    private $stickyTracking = true;
357
358
    /**
359
     * Threshold.
360
     *
361
     * @var integer
362
     * @since 2.0
363
     */
364
    private $threshold = 0;
365
366
    /**
367
     * Tooltip.
368
     *
369
     * @var array
370
     * @since 2.3
371
     */
372
    private $tooltip;
373
374
    /**
375
     * Track by area.
376
     *
377
     * @var boolean
378
     * @since 1.1.6
379
     */
380
    private $trackByArea = false;
381
382
    /**
383
     * Turbo threshold.
384
     *
385
     * @var integer
386
     * @since 2.2
387
     */
388
    private $turboThreshold = 1000;
389
390
    /**
391
     * Visible.
392
     *
393
     * @var boolean
394
     */
395
    private $visible = true;
396
397
    /**
398
     * Zone axis.
399
     *
400
     * @var string
401
     * @since 4.1.0
402
     */
403
    private $zoneAxis = "y";
404
405
    /**
406
     * Zones.
407
     *
408
     * @var array
409
     * @since 4.1.0
410
     */
411
    private $zones;
412
413
    /**
414
     * Constructor.
415
     *
416
     * @param boolean $ignoreDefaultValues Ignore the default values.
417
     */
418
    public function __construct($ignoreDefaultValues = true) {
419
        if (true === $ignoreDefaultValues) {
420
            $this->clear();
421
        }
422
    }
423
424
    /**
425
     * Clear.
426
     *
427
     * @return void
428
     */
429
    public function clear() {
430
431
        // Clear the allow point select.
432
        $this->allowPointSelect = null;
433
434
        // Clear the animation.
435
        $this->animation = null;
436
437
        // Clear the animation limit.
438
        $this->animationLimit = null;
439
440
        // Clear the class name.
441
        $this->className = null;
442
443
        // Clear the color.
444
        $this->color = null;
445
446
        // Clear the color index.
447
        $this->colorIndex = null;
448
449
        // Clear the connect ends.
450
        $this->connectEnds = null;
451
452
        // Clear the connect nulls.
453
        $this->connectNulls = null;
454
455
        // Clear the crop threshold.
456
        $this->cropThreshold = null;
457
458
        // Clear the cursor.
459
        $this->cursor = null;
460
461
        // Clear the dash style.
462
        $this->dashStyle = null;
463
464
        // Clear the data labels.
465
        if (null !== $this->dataLabels) {
466
            $this->dataLabels->clear();
467
        }
468
469
        // Clear the description.
470
        $this->description = null;
471
472
        // Clear the enable mouse tracking.
473
        $this->enableMouseTracking = null;
474
475
        // Clear the events.
476
        if (null !== $this->events) {
477
            $this->events->clear();
478
        }
479
480
        // Clear the expose element to a11y.
481
        $this->exposeElementToA11y = null;
482
483
        // Clear the fill color.
484
        $this->fillColor = null;
485
486
        // Clear the fill opacity.
487
        $this->fillOpacity = null;
488
489
        // Clear the find nearest point by.
490
        $this->findNearestPointBy = null;
491
492
        // Clear the get extremes from all.
493
        $this->getExtremesFromAll = null;
494
495
        // Clear the keys.
496
        $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...
497
498
        // Clear the line color.
499
        $this->lineColor = null;
500
501
        // Clear the line width.
502
        $this->lineWidth = null;
503
504
        // Clear the linecap.
505
        $this->linecap = null;
506
507
        // Clear the linked to.
508
        $this->linkedTo = null;
509
510
        // Clear the marker.
511
        if (null !== $this->marker) {
512
            $this->marker->clear();
513
        }
514
515
        // Clear the negative color.
516
        $this->negativeColor = null;
517
518
        // Clear the negative fill color.
519
        $this->negativeFillColor = null;
520
521
        // Clear the point.
522
        if (null !== $this->point) {
523
            $this->point->clear();
524
        }
525
526
        // Clear the point description formatter.
527
        $this->pointDescriptionFormatter = null;
528
529
        // Clear the point interval.
530
        $this->pointInterval = null;
531
532
        // Clear the point interval unit.
533
        $this->pointIntervalUnit = null;
534
535
        // Clear the point placement.
536
        $this->pointPlacement = null;
537
538
        // Clear the point start.
539
        $this->pointStart = null;
540
541
        // Clear the selected.
542
        $this->selected = null;
543
544
        // Clear the shadow.
545
        $this->shadow = null;
546
547
        // Clear the show checkbox.
548
        $this->showCheckbox = null;
549
550
        // Clear the show in legend.
551
        $this->showInLegend = null;
552
553
        // Clear the skip keyboard navigation.
554
        $this->skipKeyboardNavigation = null;
555
556
        // Clear the soft threshold.
557
        $this->softThreshold = null;
558
559
        // Clear the stacking.
560
        $this->stacking = null;
561
562
        // Clear the states.
563
        if (null !== $this->states) {
564
            $this->states->clear();
565
        }
566
567
        // Clear the step.
568
        $this->step = null;
569
570
        // Clear the sticky tracking.
571
        $this->stickyTracking = null;
572
573
        // Clear the threshold.
574
        $this->threshold = null;
575
576
        // Clear the tooltip.
577
        $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...
578
579
        // Clear the track by area.
580
        $this->trackByArea = null;
581
582
        // Clear the turbo threshold.
583
        $this->turboThreshold = null;
584
585
        // Clear the visible.
586
        $this->visible = null;
587
588
        // Clear the zone axis.
589
        $this->zoneAxis = null;
590
591
        // Clear the zones.
592
        $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...
593
    }
594
595
    /**
596
     * Get the allow point select.
597
     *
598
     * @return boolean Returns the allow point select.
599
     */
600
    public function getAllowPointSelect() {
601
        return $this->allowPointSelect;
602
    }
603
604
    /**
605
     * Get the animation.
606
     *
607
     * @return boolean Returns the animation.
608
     */
609
    public function getAnimation() {
610
        return $this->animation;
611
    }
612
613
    /**
614
     * Get the animation limit.
615
     *
616
     * @return integer Returns the animation limit.
617
     */
618
    public function getAnimationLimit() {
619
        return $this->animationLimit;
620
    }
621
622
    /**
623
     * Get the class name.
624
     *
625
     * @return string Returns the class name.
626
     */
627
    public function getClassName() {
628
        return $this->className;
629
    }
630
631
    /**
632
     * Get the color.
633
     *
634
     * @return string Returns the color.
635
     */
636
    public function getColor() {
637
        return $this->color;
638
    }
639
640
    /**
641
     * Get the color index.
642
     *
643
     * @return integer Returns the color index.
644
     */
645
    public function getColorIndex() {
646
        return $this->colorIndex;
647
    }
648
649
    /**
650
     * Get the connect ends.
651
     *
652
     * @return boolean Returns the connect ends.
653
     */
654
    public function getConnectEnds() {
655
        return $this->connectEnds;
656
    }
657
658
    /**
659
     * Get the connect nulls.
660
     *
661
     * @return boolean Returns the connect nulls.
662
     */
663
    public function getConnectNulls() {
664
        return $this->connectNulls;
665
    }
666
667
    /**
668
     * Get the crop threshold.
669
     *
670
     * @return integer Returns the crop threshold.
671
     */
672
    public function getCropThreshold() {
673
        return $this->cropThreshold;
674
    }
675
676
    /**
677
     * Get the cursor.
678
     *
679
     * @return string Returns the cursor.
680
     */
681
    public function getCursor() {
682
        return $this->cursor;
683
    }
684
685
    /**
686
     * Get the dash style.
687
     *
688
     * @return string Returns the dash style.
689
     */
690
    public function getDashStyle() {
691
        return $this->dashStyle;
692
    }
693
694
    /**
695
     * Get the data labels.
696
     *
697
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Area\HighchartsDataLabels Returns the data labels.
698
     */
699
    public function getDataLabels() {
700
        return $this->dataLabels;
701
    }
702
703
    /**
704
     * Get the description.
705
     *
706
     * @return string Returns the description.
707
     */
708
    public function getDescription() {
709
        return $this->description;
710
    }
711
712
    /**
713
     * Get the enable mouse tracking.
714
     *
715
     * @return boolean Returns the enable mouse tracking.
716
     */
717
    public function getEnableMouseTracking() {
718
        return $this->enableMouseTracking;
719
    }
720
721
    /**
722
     * Get the events.
723
     *
724
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Area\HighchartsEvents Returns the events.
725
     */
726
    public function getEvents() {
727
        return $this->events;
728
    }
729
730
    /**
731
     * Get the expose element to a11y.
732
     *
733
     * @return boolean Returns the expose element to a11y.
734
     */
735
    public function getExposeElementToA11y() {
736
        return $this->exposeElementToA11y;
737
    }
738
739
    /**
740
     * Get the fill color.
741
     *
742
     * @return string Returns the fill color.
743
     */
744
    public function getFillColor() {
745
        return $this->fillColor;
746
    }
747
748
    /**
749
     * Get the fill opacity.
750
     *
751
     * @return integer Returns the fill opacity.
752
     */
753
    public function getFillOpacity() {
754
        return $this->fillOpacity;
755
    }
756
757
    /**
758
     * Get the find nearest point by.
759
     *
760
     * @return string Returns the find nearest point by.
761
     */
762
    public function getFindNearestPointBy() {
763
        return $this->findNearestPointBy;
764
    }
765
766
    /**
767
     * Get the get extremes from all.
768
     *
769
     * @return boolean Returns the get extremes from all.
770
     */
771
    public function getGetExtremesFromAll() {
772
        return $this->getExtremesFromAll;
773
    }
774
775
    /**
776
     * Get the keys.
777
     *
778
     * @return array Returns the keys.
779
     */
780
    public function getKeys() {
781
        return $this->keys;
782
    }
783
784
    /**
785
     * Get the line color.
786
     *
787
     * @return string Returns the line color.
788
     */
789
    public function getLineColor() {
790
        return $this->lineColor;
791
    }
792
793
    /**
794
     * Get the line width.
795
     *
796
     * @return integer Returns the line width.
797
     */
798
    public function getLineWidth() {
799
        return $this->lineWidth;
800
    }
801
802
    /**
803
     * Get the linecap.
804
     *
805
     * @return string Returns the linecap.
806
     */
807
    public function getLinecap() {
808
        return $this->linecap;
809
    }
810
811
    /**
812
     * Get the linked to.
813
     *
814
     * @return string Returns the linked to.
815
     */
816
    public function getLinkedTo() {
817
        return $this->linkedTo;
818
    }
819
820
    /**
821
     * Get the marker.
822
     *
823
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Area\HighchartsMarker Returns the marker.
824
     */
825
    public function getMarker() {
826
        return $this->marker;
827
    }
828
829
    /**
830
     * Get the negative color.
831
     *
832
     * @return string Returns the negative color.
833
     */
834
    public function getNegativeColor() {
835
        return $this->negativeColor;
836
    }
837
838
    /**
839
     * Get the negative fill color.
840
     *
841
     * @return string Returns the negative fill color.
842
     */
843
    public function getNegativeFillColor() {
844
        return $this->negativeFillColor;
845
    }
846
847
    /**
848
     * Get the point.
849
     *
850
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Area\HighchartsPoint Returns the point.
851
     */
852
    public function getPoint() {
853
        return $this->point;
854
    }
855
856
    /**
857
     * Get the point description formatter.
858
     *
859
     * @return string Returns the point description formatter.
860
     */
861
    public function getPointDescriptionFormatter() {
862
        return $this->pointDescriptionFormatter;
863
    }
864
865
    /**
866
     * Get the point interval.
867
     *
868
     * @return integer Returns the point interval.
869
     */
870
    public function getPointInterval() {
871
        return $this->pointInterval;
872
    }
873
874
    /**
875
     * Get the point interval unit.
876
     *
877
     * @return string Returns the point interval unit.
878
     */
879
    public function getPointIntervalUnit() {
880
        return $this->pointIntervalUnit;
881
    }
882
883
    /**
884
     * Get the point placement.
885
     *
886
     * @return string|integer Returns the point placement.
887
     */
888
    public function getPointPlacement() {
889
        return $this->pointPlacement;
890
    }
891
892
    /**
893
     * Get the point start.
894
     *
895
     * @return integer Returns the point start.
896
     */
897
    public function getPointStart() {
898
        return $this->pointStart;
899
    }
900
901
    /**
902
     * Get the selected.
903
     *
904
     * @return boolean Returns the selected.
905
     */
906
    public function getSelected() {
907
        return $this->selected;
908
    }
909
910
    /**
911
     * Get the shadow.
912
     *
913
     * @return boolean|array Returns the shadow.
914
     */
915
    public function getShadow() {
916
        return $this->shadow;
917
    }
918
919
    /**
920
     * Get the show checkbox.
921
     *
922
     * @return boolean Returns the show checkbox.
923
     */
924
    public function getShowCheckbox() {
925
        return $this->showCheckbox;
926
    }
927
928
    /**
929
     * Get the show in legend.
930
     *
931
     * @return boolean Returns the show in legend.
932
     */
933
    public function getShowInLegend() {
934
        return $this->showInLegend;
935
    }
936
937
    /**
938
     * Get the skip keyboard navigation.
939
     *
940
     * @return boolean Returns the skip keyboard navigation.
941
     */
942
    public function getSkipKeyboardNavigation() {
943
        return $this->skipKeyboardNavigation;
944
    }
945
946
    /**
947
     * Get the soft threshold.
948
     *
949
     * @return boolean Returns the soft threshold.
950
     */
951
    public function getSoftThreshold() {
952
        return $this->softThreshold;
953
    }
954
955
    /**
956
     * Get the stacking.
957
     *
958
     * @return string Returns the stacking.
959
     */
960
    public function getStacking() {
961
        return $this->stacking;
962
    }
963
964
    /**
965
     * Get the states.
966
     *
967
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Area\HighchartsStates Returns the states.
968
     */
969
    public function getStates() {
970
        return $this->states;
971
    }
972
973
    /**
974
     * Get the step.
975
     *
976
     * @return string Returns the step.
977
     */
978
    public function getStep() {
979
        return $this->step;
980
    }
981
982
    /**
983
     * Get the sticky tracking.
984
     *
985
     * @return boolean Returns the sticky tracking.
986
     */
987
    public function getStickyTracking() {
988
        return $this->stickyTracking;
989
    }
990
991
    /**
992
     * Get the threshold.
993
     *
994
     * @return integer Returns the threshold.
995
     */
996
    public function getThreshold() {
997
        return $this->threshold;
998
    }
999
1000
    /**
1001
     * Get the tooltip.
1002
     *
1003
     * @return array Returns the tooltip.
1004
     */
1005
    public function getTooltip() {
1006
        return $this->tooltip;
1007
    }
1008
1009
    /**
1010
     * Get the track by area.
1011
     *
1012
     * @return boolean Returns the track by area.
1013
     */
1014
    public function getTrackByArea() {
1015
        return $this->trackByArea;
1016
    }
1017
1018
    /**
1019
     * Get the turbo threshold.
1020
     *
1021
     * @return integer Returns the turbo threshold.
1022
     */
1023
    public function getTurboThreshold() {
1024
        return $this->turboThreshold;
1025
    }
1026
1027
    /**
1028
     * Get the visible.
1029
     *
1030
     * @return boolean Returns the visible.
1031
     */
1032
    public function getVisible() {
1033
        return $this->visible;
1034
    }
1035
1036
    /**
1037
     * Get the zone axis.
1038
     *
1039
     * @return string Returns the zone axis.
1040
     */
1041
    public function getZoneAxis() {
1042
        return $this->zoneAxis;
1043
    }
1044
1045
    /**
1046
     * Get the zones.
1047
     *
1048
     * @return array Returns the zones.
1049
     */
1050
    public function getZones() {
1051
        return $this->zones;
1052
    }
1053
1054
    /**
1055
     * Serialize this instance.
1056
     *
1057
     * @return array Returns an array representing this instance.
1058
     */
1059
    public function jsonSerialize() {
1060
        return $this->toArray();
1061
    }
1062
1063
    /**
1064
     * Create a new data labels.
1065
     *
1066
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Area\HighchartsDataLabels Returns the data labels.
1067
     */
1068
    public function newDataLabels() {
1069
        $this->dataLabels = new \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Area\HighchartsDataLabels();
1070
        return $this->dataLabels;
1071
    }
1072
1073
    /**
1074
     * Create a new events.
1075
     *
1076
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Area\HighchartsEvents Returns the events.
1077
     */
1078
    public function newEvents() {
1079
        $this->events = new \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Area\HighchartsEvents();
1080
        return $this->events;
1081
    }
1082
1083
    /**
1084
     * Create a new marker.
1085
     *
1086
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Area\HighchartsMarker Returns the marker.
1087
     */
1088
    public function newMarker() {
1089
        $this->marker = new \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Area\HighchartsMarker();
1090
        return $this->marker;
1091
    }
1092
1093
    /**
1094
     * Create a new point.
1095
     *
1096
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Area\HighchartsPoint Returns the point.
1097
     */
1098
    public function newPoint() {
1099
        $this->point = new \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Area\HighchartsPoint();
1100
        return $this->point;
1101
    }
1102
1103
    /**
1104
     * Create a new states.
1105
     *
1106
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Area\HighchartsStates Returns the states.
1107
     */
1108
    public function newStates() {
1109
        $this->states = new \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Area\HighchartsStates();
1110
        return $this->states;
1111
    }
1112
1113
    /**
1114
     * Set the allow point select.
1115
     *
1116
     * @param boolean $allowPointSelect The allow point select.
1117
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsArea Returns the highcharts area.
1118
     */
1119
    public function setAllowPointSelect($allowPointSelect) {
1120
        $this->allowPointSelect = $allowPointSelect;
1121
        return $this;
1122
    }
1123
1124
    /**
1125
     * Set the animation.
1126
     *
1127
     * @param boolean $animation The animation.
1128
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsArea Returns the highcharts area.
1129
     */
1130
    public function setAnimation($animation) {
1131
        $this->animation = $animation;
1132
        return $this;
1133
    }
1134
1135
    /**
1136
     * Set the animation limit.
1137
     *
1138
     * @param integer $animationLimit The animation limit.
1139
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsArea Returns the highcharts area.
1140
     */
1141
    public function setAnimationLimit($animationLimit) {
1142
        $this->animationLimit = $animationLimit;
1143
        return $this;
1144
    }
1145
1146
    /**
1147
     * Set the class name.
1148
     *
1149
     * @param string $className The class name.
1150
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsArea Returns the highcharts area.
1151
     */
1152
    public function setClassName($className) {
1153
        $this->className = $className;
1154
        return $this;
1155
    }
1156
1157
    /**
1158
     * Set the color.
1159
     *
1160
     * @param string $color The color.
1161
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsArea Returns the highcharts area.
1162
     */
1163
    public function setColor($color) {
1164
        $this->color = $color;
1165
        return $this;
1166
    }
1167
1168
    /**
1169
     * Set the color index.
1170
     *
1171
     * @param integer $colorIndex The color index.
1172
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsArea Returns the highcharts area.
1173
     */
1174
    public function setColorIndex($colorIndex) {
1175
        $this->colorIndex = $colorIndex;
1176
        return $this;
1177
    }
1178
1179
    /**
1180
     * Set the connect ends.
1181
     *
1182
     * @param boolean $connectEnds The connect ends.
1183
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsArea Returns the highcharts area.
1184
     */
1185
    public function setConnectEnds($connectEnds) {
1186
        $this->connectEnds = $connectEnds;
1187
        return $this;
1188
    }
1189
1190
    /**
1191
     * Set the connect nulls.
1192
     *
1193
     * @param boolean $connectNulls The connect nulls.
1194
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsArea Returns the highcharts area.
1195
     */
1196
    public function setConnectNulls($connectNulls) {
1197
        $this->connectNulls = $connectNulls;
1198
        return $this;
1199
    }
1200
1201
    /**
1202
     * Set the crop threshold.
1203
     *
1204
     * @param integer $cropThreshold The crop threshold.
1205
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsArea Returns the highcharts area.
1206
     */
1207
    public function setCropThreshold($cropThreshold) {
1208
        $this->cropThreshold = $cropThreshold;
1209
        return $this;
1210
    }
1211
1212
    /**
1213
     * Set the cursor.
1214
     *
1215
     * @param string $cursor The cursor.
1216
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsArea Returns the highcharts area.
1217
     */
1218
    public function setCursor($cursor) {
1219
        switch ($cursor) {
1220
            case null:
1221
            case "crosshair":
1222
            case "default":
1223
            case "help":
1224
            case "none":
1225
            case "pointer":
1226
            $this->cursor = $cursor;
1227
            break;
1228
        }
1229
        return $this;
1230
    }
1231
1232
    /**
1233
     * Set the dash style.
1234
     *
1235
     * @param string $dashStyle The dash style.
1236
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsArea Returns the highcharts area.
1237
     */
1238
    public function setDashStyle($dashStyle) {
1239
        switch ($dashStyle) {
1240
            case "Dash":
1241
            case "DashDot":
1242
            case "Dot":
1243
            case "LongDash":
1244
            case "LongDashDot":
1245
            case "LongDashDotDot":
1246
            case "ShortDash":
1247
            case "ShortDashDot":
1248
            case "ShortDashDotDot":
1249
            case "ShortDot":
1250
            case "Solid":
1251
            $this->dashStyle = $dashStyle;
1252
            break;
1253
        }
1254
        return $this;
1255
    }
1256
1257
    /**
1258
     * Set the data labels.
1259
     *
1260
     * @param \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Area\HighchartsDataLabels $dataLabels The data labels.
1261
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsArea Returns the highcharts area.
1262
     */
1263
    public function setDataLabels(\WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Area\HighchartsDataLabels $dataLabels = null) {
1264
        $this->dataLabels = $dataLabels;
1265
        return $this;
1266
    }
1267
1268
    /**
1269
     * Set the description.
1270
     *
1271
     * @param string $description The description.
1272
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsArea Returns the highcharts area.
1273
     */
1274
    public function setDescription($description) {
1275
        $this->description = $description;
1276
        return $this;
1277
    }
1278
1279
    /**
1280
     * Set the enable mouse tracking.
1281
     *
1282
     * @param boolean $enableMouseTracking The enable mouse tracking.
1283
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsArea Returns the highcharts area.
1284
     */
1285
    public function setEnableMouseTracking($enableMouseTracking) {
1286
        $this->enableMouseTracking = $enableMouseTracking;
1287
        return $this;
1288
    }
1289
1290
    /**
1291
     * Set the events.
1292
     *
1293
     * @param \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Area\HighchartsEvents $events The events.
1294
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsArea Returns the highcharts area.
1295
     */
1296
    public function setEvents(\WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Area\HighchartsEvents $events = null) {
1297
        $this->events = $events;
1298
        return $this;
1299
    }
1300
1301
    /**
1302
     * Set the expose element to a11y.
1303
     *
1304
     * @param boolean $exposeElementToA11y The expose element to a11y.
1305
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsArea Returns the highcharts area.
1306
     */
1307
    public function setExposeElementToA11y($exposeElementToA11y) {
1308
        $this->exposeElementToA11y = $exposeElementToA11y;
1309
        return $this;
1310
    }
1311
1312
    /**
1313
     * Set the fill color.
1314
     *
1315
     * @param string $fillColor The fill color.
1316
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsArea Returns the highcharts area.
1317
     */
1318
    public function setFillColor($fillColor) {
1319
        $this->fillColor = $fillColor;
1320
        return $this;
1321
    }
1322
1323
    /**
1324
     * Set the fill opacity.
1325
     *
1326
     * @param integer $fillOpacity The fill opacity.
1327
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsArea Returns the highcharts area.
1328
     */
1329
    public function setFillOpacity($fillOpacity) {
1330
        $this->fillOpacity = $fillOpacity;
1331
        return $this;
1332
    }
1333
1334
    /**
1335
     * Set the find nearest point by.
1336
     *
1337
     * @param string $findNearestPointBy The find nearest point by.
1338
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsArea Returns the highcharts area.
1339
     */
1340
    public function setFindNearestPointBy($findNearestPointBy) {
1341
        switch ($findNearestPointBy) {
1342
            case "x":
1343
            case "xy":
1344
            $this->findNearestPointBy = $findNearestPointBy;
1345
            break;
1346
        }
1347
        return $this;
1348
    }
1349
1350
    /**
1351
     * Set the get extremes from all.
1352
     *
1353
     * @param boolean $getExtremesFromAll The get extremes from all.
1354
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsArea Returns the highcharts area.
1355
     */
1356
    public function setGetExtremesFromAll($getExtremesFromAll) {
1357
        $this->getExtremesFromAll = $getExtremesFromAll;
1358
        return $this;
1359
    }
1360
1361
    /**
1362
     * Set the keys.
1363
     *
1364
     * @param array $keys The keys.
1365
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsArea Returns the highcharts area.
1366
     */
1367
    public function setKeys(array $keys = null) {
1368
        $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...
1369
        return $this;
1370
    }
1371
1372
    /**
1373
     * Set the line color.
1374
     *
1375
     * @param string $lineColor The line color.
1376
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsArea Returns the highcharts area.
1377
     */
1378
    public function setLineColor($lineColor) {
1379
        $this->lineColor = $lineColor;
1380
        return $this;
1381
    }
1382
1383
    /**
1384
     * Set the line width.
1385
     *
1386
     * @param integer $lineWidth The line width.
1387
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsArea Returns the highcharts area.
1388
     */
1389
    public function setLineWidth($lineWidth) {
1390
        $this->lineWidth = $lineWidth;
1391
        return $this;
1392
    }
1393
1394
    /**
1395
     * Set the linecap.
1396
     *
1397
     * @param string $linecap The linecap.
1398
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsArea Returns the highcharts area.
1399
     */
1400
    public function setLinecap($linecap) {
1401
        switch ($linecap) {
1402
            case "round":
1403
            case "square":
1404
            $this->linecap = $linecap;
1405
            break;
1406
        }
1407
        return $this;
1408
    }
1409
1410
    /**
1411
     * Set the linked to.
1412
     *
1413
     * @param string $linkedTo The linked to.
1414
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsArea Returns the highcharts area.
1415
     */
1416
    public function setLinkedTo($linkedTo) {
1417
        $this->linkedTo = $linkedTo;
1418
        return $this;
1419
    }
1420
1421
    /**
1422
     * Set the marker.
1423
     *
1424
     * @param \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Area\HighchartsMarker $marker The marker.
1425
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsArea Returns the highcharts area.
1426
     */
1427
    public function setMarker(\WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Area\HighchartsMarker $marker = null) {
1428
        $this->marker = $marker;
1429
        return $this;
1430
    }
1431
1432
    /**
1433
     * Set the negative color.
1434
     *
1435
     * @param string $negativeColor The negative color.
1436
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsArea Returns the highcharts area.
1437
     */
1438
    public function setNegativeColor($negativeColor) {
1439
        $this->negativeColor = $negativeColor;
1440
        return $this;
1441
    }
1442
1443
    /**
1444
     * Set the negative fill color.
1445
     *
1446
     * @param string $negativeFillColor The negative fill color.
1447
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsArea Returns the highcharts area.
1448
     */
1449
    public function setNegativeFillColor($negativeFillColor) {
1450
        $this->negativeFillColor = $negativeFillColor;
1451
        return $this;
1452
    }
1453
1454
    /**
1455
     * Set the point.
1456
     *
1457
     * @param \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Area\HighchartsPoint $point The point.
1458
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsArea Returns the highcharts area.
1459
     */
1460
    public function setPoint(\WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Area\HighchartsPoint $point = null) {
1461
        $this->point = $point;
1462
        return $this;
1463
    }
1464
1465
    /**
1466
     * Set the point description formatter.
1467
     *
1468
     * @param string $pointDescriptionFormatter The point description formatter.
1469
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsArea Returns the highcharts area.
1470
     */
1471
    public function setPointDescriptionFormatter($pointDescriptionFormatter) {
1472
        $this->pointDescriptionFormatter = $pointDescriptionFormatter;
1473
        return $this;
1474
    }
1475
1476
    /**
1477
     * Set the point interval.
1478
     *
1479
     * @param integer $pointInterval The point interval.
1480
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsArea Returns the highcharts area.
1481
     */
1482
    public function setPointInterval($pointInterval) {
1483
        $this->pointInterval = $pointInterval;
1484
        return $this;
1485
    }
1486
1487
    /**
1488
     * Set the point interval unit.
1489
     *
1490
     * @param string $pointIntervalUnit The point interval unit.
1491
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsArea Returns the highcharts area.
1492
     */
1493
    public function setPointIntervalUnit($pointIntervalUnit) {
1494
        switch ($pointIntervalUnit) {
1495
            case null:
1496
            case "day":
1497
            case "month":
1498
            case "year":
1499
            $this->pointIntervalUnit = $pointIntervalUnit;
1500
            break;
1501
        }
1502
        return $this;
1503
    }
1504
1505
    /**
1506
     * Set the point placement.
1507
     *
1508
     * @param string|integer $pointPlacement The point placement.
1509
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsArea Returns the highcharts area.
1510
     */
1511
    public function setPointPlacement($pointPlacement) {
1512
        switch ($pointPlacement) {
1513
            case null:
1514
            case "between":
1515
            case "on":
1516
            $this->pointPlacement = $pointPlacement;
1517
            break;
1518
        }
1519
        return $this;
1520
    }
1521
1522
    /**
1523
     * Set the point start.
1524
     *
1525
     * @param integer $pointStart The point start.
1526
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsArea Returns the highcharts area.
1527
     */
1528
    public function setPointStart($pointStart) {
1529
        $this->pointStart = $pointStart;
1530
        return $this;
1531
    }
1532
1533
    /**
1534
     * Set the selected.
1535
     *
1536
     * @param boolean $selected The selected.
1537
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsArea Returns the highcharts area.
1538
     */
1539
    public function setSelected($selected) {
1540
        $this->selected = $selected;
1541
        return $this;
1542
    }
1543
1544
    /**
1545
     * Set the shadow.
1546
     *
1547
     * @param boolean|array $shadow The shadow.
1548
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsArea Returns the highcharts area.
1549
     */
1550
    public function setShadow($shadow) {
1551
        $this->shadow = $shadow;
1552
        return $this;
1553
    }
1554
1555
    /**
1556
     * Set the show checkbox.
1557
     *
1558
     * @param boolean $showCheckbox The show checkbox.
1559
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsArea Returns the highcharts area.
1560
     */
1561
    public function setShowCheckbox($showCheckbox) {
1562
        $this->showCheckbox = $showCheckbox;
1563
        return $this;
1564
    }
1565
1566
    /**
1567
     * Set the show in legend.
1568
     *
1569
     * @param boolean $showInLegend The show in legend.
1570
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsArea Returns the highcharts area.
1571
     */
1572
    public function setShowInLegend($showInLegend) {
1573
        $this->showInLegend = $showInLegend;
1574
        return $this;
1575
    }
1576
1577
    /**
1578
     * Set the skip keyboard navigation.
1579
     *
1580
     * @param boolean $skipKeyboardNavigation The skip keyboard navigation.
1581
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsArea Returns the highcharts area.
1582
     */
1583
    public function setSkipKeyboardNavigation($skipKeyboardNavigation) {
1584
        $this->skipKeyboardNavigation = $skipKeyboardNavigation;
1585
        return $this;
1586
    }
1587
1588
    /**
1589
     * Set the soft threshold.
1590
     *
1591
     * @param boolean $softThreshold The soft threshold.
1592
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsArea Returns the highcharts area.
1593
     */
1594
    public function setSoftThreshold($softThreshold) {
1595
        $this->softThreshold = $softThreshold;
1596
        return $this;
1597
    }
1598
1599
    /**
1600
     * Set the stacking.
1601
     *
1602
     * @param string $stacking The stacking.
1603
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsArea Returns the highcharts area.
1604
     */
1605
    public function setStacking($stacking) {
1606
        switch ($stacking) {
1607
            case null:
1608
            case "normal":
1609
            case "percent":
1610
            $this->stacking = $stacking;
1611
            break;
1612
        }
1613
        return $this;
1614
    }
1615
1616
    /**
1617
     * Set the states.
1618
     *
1619
     * @param \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Area\HighchartsStates $states The states.
1620
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsArea Returns the highcharts area.
1621
     */
1622
    public function setStates(\WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Area\HighchartsStates $states = null) {
1623
        $this->states = $states;
1624
        return $this;
1625
    }
1626
1627
    /**
1628
     * Set the step.
1629
     *
1630
     * @param string $step The step.
1631
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsArea Returns the highcharts area.
1632
     */
1633
    public function setStep($step) {
1634
        switch ($step) {
1635
            case "center":
1636
            case "left":
1637
            case "right":
1638
            $this->step = $step;
1639
            break;
1640
        }
1641
        return $this;
1642
    }
1643
1644
    /**
1645
     * Set the sticky tracking.
1646
     *
1647
     * @param boolean $stickyTracking The sticky tracking.
1648
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsArea Returns the highcharts area.
1649
     */
1650
    public function setStickyTracking($stickyTracking) {
1651
        $this->stickyTracking = $stickyTracking;
1652
        return $this;
1653
    }
1654
1655
    /**
1656
     * Set the threshold.
1657
     *
1658
     * @param integer $threshold The threshold.
1659
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsArea Returns the highcharts area.
1660
     */
1661
    public function setThreshold($threshold) {
1662
        $this->threshold = $threshold;
1663
        return $this;
1664
    }
1665
1666
    /**
1667
     * Set the tooltip.
1668
     *
1669
     * @param array $tooltip The tooltip.
1670
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsArea Returns the highcharts area.
1671
     */
1672
    public function setTooltip(array $tooltip = null) {
1673
        $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...
1674
        return $this;
1675
    }
1676
1677
    /**
1678
     * Set the track by area.
1679
     *
1680
     * @param boolean $trackByArea The track by area.
1681
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsArea Returns the highcharts area.
1682
     */
1683
    public function setTrackByArea($trackByArea) {
1684
        $this->trackByArea = $trackByArea;
1685
        return $this;
1686
    }
1687
1688
    /**
1689
     * Set the turbo threshold.
1690
     *
1691
     * @param integer $turboThreshold The turbo threshold.
1692
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsArea Returns the highcharts area.
1693
     */
1694
    public function setTurboThreshold($turboThreshold) {
1695
        $this->turboThreshold = $turboThreshold;
1696
        return $this;
1697
    }
1698
1699
    /**
1700
     * Set the visible.
1701
     *
1702
     * @param boolean $visible The visible.
1703
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsArea Returns the highcharts area.
1704
     */
1705
    public function setVisible($visible) {
1706
        $this->visible = $visible;
1707
        return $this;
1708
    }
1709
1710
    /**
1711
     * Set the zone axis.
1712
     *
1713
     * @param string $zoneAxis The zone axis.
1714
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsArea Returns the highcharts area.
1715
     */
1716
    public function setZoneAxis($zoneAxis) {
1717
        $this->zoneAxis = $zoneAxis;
1718
        return $this;
1719
    }
1720
1721
    /**
1722
     * Set the zones.
1723
     *
1724
     * @param array $zones The zones.
1725
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsArea Returns the highcharts area.
1726
     */
1727
    public function setZones(array $zones = null) {
1728
        $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...
1729
        return $this;
1730
    }
1731
1732
    /**
1733
     * Convert into an array representing this instance.
1734
     *
1735
     * @return array Returns an array representing this instance.
1736
     */
1737
    public function toArray() {
1738
1739
        // Initialize the output.
1740
        $output = [];
1741
1742
        // Set the allow point select.
1743
        ArrayUtility::set($output, "allowPointSelect", $this->allowPointSelect, [null]);
1744
1745
        // Set the animation.
1746
        ArrayUtility::set($output, "animation", $this->animation, [null]);
1747
1748
        // Set the animation limit.
1749
        ArrayUtility::set($output, "animationLimit", $this->animationLimit, [null]);
1750
1751
        // Set the class name.
1752
        ArrayUtility::set($output, "className", $this->className, [null]);
1753
1754
        // Set the color.
1755
        ArrayUtility::set($output, "color", $this->color, [null]);
1756
1757
        // Set the color index.
1758
        ArrayUtility::set($output, "colorIndex", $this->colorIndex, [null]);
1759
1760
        // Set the connect ends.
1761
        ArrayUtility::set($output, "connectEnds", $this->connectEnds, [null]);
1762
1763
        // Set the connect nulls.
1764
        ArrayUtility::set($output, "connectNulls", $this->connectNulls, [null]);
1765
1766
        // Set the crop threshold.
1767
        ArrayUtility::set($output, "cropThreshold", $this->cropThreshold, [null]);
1768
1769
        // Set the cursor.
1770
        ArrayUtility::set($output, "cursor", $this->cursor, [null]);
1771
1772
        // Set the dash style.
1773
        ArrayUtility::set($output, "dashStyle", $this->dashStyle, [null]);
1774
1775
        // Set the data labels.
1776
        if (null !== $this->dataLabels) {
1777
            ArrayUtility::set($output, "dataLabels", $this->dataLabels->toArray(), []);
1778
        }
1779
1780
        // Set the description.
1781
        ArrayUtility::set($output, "description", $this->description, [null]);
1782
1783
        // Set the enable mouse tracking.
1784
        ArrayUtility::set($output, "enableMouseTracking", $this->enableMouseTracking, [null]);
1785
1786
        // Set the events.
1787
        if (null !== $this->events) {
1788
            ArrayUtility::set($output, "events", $this->events->toArray(), []);
1789
        }
1790
1791
        // Set the expose element to a11y.
1792
        ArrayUtility::set($output, "exposeElementToA11y", $this->exposeElementToA11y, [null]);
1793
1794
        // Set the fill color.
1795
        ArrayUtility::set($output, "fillColor", $this->fillColor, [null]);
1796
1797
        // Set the fill opacity.
1798
        ArrayUtility::set($output, "fillOpacity", $this->fillOpacity, [null]);
1799
1800
        // Set the find nearest point by.
1801
        ArrayUtility::set($output, "findNearestPointBy", $this->findNearestPointBy, [null]);
1802
1803
        // Set the get extremes from all.
1804
        ArrayUtility::set($output, "getExtremesFromAll", $this->getExtremesFromAll, [null]);
1805
1806
        // Set the keys.
1807
        ArrayUtility::set($output, "keys", $this->keys, [null]);
1808
1809
        // Set the line color.
1810
        ArrayUtility::set($output, "lineColor", $this->lineColor, [null]);
1811
1812
        // Set the line width.
1813
        ArrayUtility::set($output, "lineWidth", $this->lineWidth, [null]);
1814
1815
        // Set the linecap.
1816
        ArrayUtility::set($output, "linecap", $this->linecap, [null]);
1817
1818
        // Set the linked to.
1819
        ArrayUtility::set($output, "linkedTo", $this->linkedTo, [null]);
1820
1821
        // Set the marker.
1822
        if (null !== $this->marker) {
1823
            ArrayUtility::set($output, "marker", $this->marker->toArray(), []);
1824
        }
1825
1826
        // Set the negative color.
1827
        ArrayUtility::set($output, "negativeColor", $this->negativeColor, [null]);
1828
1829
        // Set the negative fill color.
1830
        ArrayUtility::set($output, "negativeFillColor", $this->negativeFillColor, [null]);
1831
1832
        // Set the point.
1833
        if (null !== $this->point) {
1834
            ArrayUtility::set($output, "point", $this->point->toArray(), []);
1835
        }
1836
1837
        // Set the point description formatter.
1838
        ArrayUtility::set($output, "pointDescriptionFormatter", $this->pointDescriptionFormatter, [null]);
1839
1840
        // Set the point interval.
1841
        ArrayUtility::set($output, "pointInterval", $this->pointInterval, [null]);
1842
1843
        // Set the point interval unit.
1844
        ArrayUtility::set($output, "pointIntervalUnit", $this->pointIntervalUnit, [null]);
1845
1846
        // Set the point placement.
1847
        ArrayUtility::set($output, "pointPlacement", $this->pointPlacement, [null]);
1848
1849
        // Set the point start.
1850
        ArrayUtility::set($output, "pointStart", $this->pointStart, [null]);
1851
1852
        // Set the selected.
1853
        ArrayUtility::set($output, "selected", $this->selected, [null]);
1854
1855
        // Set the shadow.
1856
        ArrayUtility::set($output, "shadow", $this->shadow, [null]);
1857
1858
        // Set the show checkbox.
1859
        ArrayUtility::set($output, "showCheckbox", $this->showCheckbox, [null]);
1860
1861
        // Set the show in legend.
1862
        ArrayUtility::set($output, "showInLegend", $this->showInLegend, [null]);
1863
1864
        // Set the skip keyboard navigation.
1865
        ArrayUtility::set($output, "skipKeyboardNavigation", $this->skipKeyboardNavigation, [null]);
1866
1867
        // Set the soft threshold.
1868
        ArrayUtility::set($output, "softThreshold", $this->softThreshold, [null]);
1869
1870
        // Set the stacking.
1871
        ArrayUtility::set($output, "stacking", $this->stacking, [null]);
1872
1873
        // Set the states.
1874
        if (null !== $this->states) {
1875
            ArrayUtility::set($output, "states", $this->states->toArray(), []);
1876
        }
1877
1878
        // Set the step.
1879
        ArrayUtility::set($output, "step", $this->step, [null]);
1880
1881
        // Set the sticky tracking.
1882
        ArrayUtility::set($output, "stickyTracking", $this->stickyTracking, [null]);
1883
1884
        // Set the threshold.
1885
        ArrayUtility::set($output, "threshold", $this->threshold, [null]);
1886
1887
        // Set the tooltip.
1888
        ArrayUtility::set($output, "tooltip", $this->tooltip, [null]);
1889
1890
        // Set the track by area.
1891
        ArrayUtility::set($output, "trackByArea", $this->trackByArea, [null]);
1892
1893
        // Set the turbo threshold.
1894
        ArrayUtility::set($output, "turboThreshold", $this->turboThreshold, [null]);
1895
1896
        // Set the visible.
1897
        ArrayUtility::set($output, "visible", $this->visible, [null]);
1898
1899
        // Set the zone axis.
1900
        ArrayUtility::set($output, "zoneAxis", $this->zoneAxis, [null]);
1901
1902
        // Set the zones.
1903
        ArrayUtility::set($output, "zones", $this->zones, [null]);
1904
1905
        // Return the output.
1906
        return $output;
1907
    }
1908
1909
}
1910