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