HighchartsScatter::setLineWidth()   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 scatter.
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 HighchartsScatter 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
     * Crop threshold.
74
     *
75
     * @var integer
76
     * @since 2.2
77
     */
78
    private $cropThreshold = 300;
79
80
    /**
81
     * Cursor.
82
     *
83
     * @var string
84
     */
85
    private $cursor;
86
87
    /**
88
     * Dash style.
89
     *
90
     * @var string
91
     * @since 2.1
92
     */
93
    private $dashStyle = "Solid";
94
95
    /**
96
     * Data labels.
97
     *
98
     * @var \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Scatter\HighchartsDataLabels
99
     */
100
    private $dataLabels;
101
102
    /**
103
     * Description.
104
     *
105
     * @var string
106
     * @since 5.0.0
107
     */
108
    private $description;
109
110
    /**
111
     * Enable mouse tracking.
112
     *
113
     * @var boolean
114
     */
115
    private $enableMouseTracking = true;
116
117
    /**
118
     * Events.
119
     *
120
     * @var \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Scatter\HighchartsEvents
121
     */
122
    private $events;
123
124
    /**
125
     * Expose element to a11y.
126
     *
127
     * @var boolean
128
     * @since 5.0.12
129
     */
130
    private $exposeElementToA11y;
131
132
    /**
133
     * Find nearest point by.
134
     *
135
     * @var string
136
     * @since 5.0.10
137
     */
138
    private $findNearestPointBy;
139
140
    /**
141
     * Get extremes from all.
142
     *
143
     * @var boolean
144
     * @since 4.1.6
145
     */
146
    private $getExtremesFromAll = false;
147
148
    /**
149
     * Keys.
150
     *
151
     * @var array
152
     * @since 4.1.6
153
     */
154
    private $keys;
155
156
    /**
157
     * Line width.
158
     *
159
     * @var integer
160
     */
161
    private $lineWidth = 0;
162
163
    /**
164
     * Linked to.
165
     *
166
     * @var string
167
     * @since 3.0
168
     */
169
    private $linkedTo;
170
171
    /**
172
     * Marker.
173
     *
174
     * @var \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Scatter\HighchartsMarker
175
     */
176
    private $marker;
177
178
    /**
179
     * Negative color.
180
     *
181
     * @var string
182
     * @since 3.0
183
     */
184
    private $negativeColor;
185
186
    /**
187
     * Point.
188
     *
189
     * @var \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Scatter\HighchartsPoint
190
     */
191
    private $point;
192
193
    /**
194
     * Point description formatter.
195
     *
196
     * @var string
197
     * @since 5.0.12
198
     */
199
    private $pointDescriptionFormatter;
200
201
    /**
202
     * Point interval.
203
     *
204
     * @var integer
205
     */
206
    private $pointInterval = 1;
207
208
    /**
209
     * Point interval unit.
210
     *
211
     * @var string
212
     * @since 4.1.0
213
     */
214
    private $pointIntervalUnit;
215
216
    /**
217
     * Point start.
218
     *
219
     * @var integer
220
     */
221
    private $pointStart = 0;
222
223
    /**
224
     * Selected.
225
     *
226
     * @var boolean
227
     * @since 1.2.0
228
     */
229
    private $selected = false;
230
231
    /**
232
     * Shadow.
233
     *
234
     * @var boolean|array
235
     */
236
    private $shadow = false;
237
238
    /**
239
     * Show checkbox.
240
     *
241
     * @var boolean
242
     * @since 1.2.0
243
     */
244
    private $showCheckbox = false;
245
246
    /**
247
     * Show in legend.
248
     *
249
     * @var boolean
250
     */
251
    private $showInLegend = true;
252
253
    /**
254
     * Skip keyboard navigation.
255
     *
256
     * @var boolean
257
     * @since 5.0.12
258
     */
259
    private $skipKeyboardNavigation;
260
261
    /**
262
     * Soft threshold.
263
     *
264
     * @var boolean
265
     * @since 4.1.9
266
     */
267
    private $softThreshold = true;
268
269
    /**
270
     * States.
271
     *
272
     * @var \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Scatter\HighchartsStates
273
     */
274
    private $states;
275
276
    /**
277
     * Sticky tracking.
278
     *
279
     * @var boolean
280
     */
281
    private $stickyTracking = false;
282
283
    /**
284
     * Threshold.
285
     *
286
     * @var integer
287
     * @since 3.0
288
     */
289
    private $threshold = 0;
290
291
    /**
292
     * Tooltip.
293
     *
294
     * @var array
295
     * @since 2.3
296
     */
297
    private $tooltip;
298
299
    /**
300
     * Turbo threshold.
301
     *
302
     * @var integer
303
     * @since 2.2
304
     */
305
    private $turboThreshold = 1000;
306
307
    /**
308
     * Visible.
309
     *
310
     * @var boolean
311
     */
312
    private $visible = true;
313
314
    /**
315
     * Zone axis.
316
     *
317
     * @var string
318
     * @since 4.1.0
319
     */
320
    private $zoneAxis = "y";
321
322
    /**
323
     * Zones.
324
     *
325
     * @var array
326
     * @since 4.1.0
327
     */
328
    private $zones;
329
330
    /**
331
     * Constructor.
332
     *
333
     * @param boolean $ignoreDefaultValues Ignore the default values.
334
     */
335
    public function __construct($ignoreDefaultValues = true) {
336
        if (true === $ignoreDefaultValues) {
337
            $this->clear();
338
        }
339
    }
340
341
    /**
342
     * Clear.
343
     *
344
     * @return void
345
     */
346
    public function clear() {
347
348
        // Clear the allow point select.
349
        $this->allowPointSelect = null;
350
351
        // Clear the animation.
352
        $this->animation = null;
353
354
        // Clear the animation limit.
355
        $this->animationLimit = null;
356
357
        // Clear the class name.
358
        $this->className = null;
359
360
        // Clear the color.
361
        $this->color = null;
362
363
        // Clear the color index.
364
        $this->colorIndex = null;
365
366
        // Clear the crop threshold.
367
        $this->cropThreshold = null;
368
369
        // Clear the cursor.
370
        $this->cursor = null;
371
372
        // Clear the dash style.
373
        $this->dashStyle = null;
374
375
        // Clear the data labels.
376
        if (null !== $this->dataLabels) {
377
            $this->dataLabels->clear();
378
        }
379
380
        // Clear the description.
381
        $this->description = null;
382
383
        // Clear the enable mouse tracking.
384
        $this->enableMouseTracking = null;
385
386
        // Clear the events.
387
        if (null !== $this->events) {
388
            $this->events->clear();
389
        }
390
391
        // Clear the expose element to a11y.
392
        $this->exposeElementToA11y = null;
393
394
        // Clear the find nearest point by.
395
        $this->findNearestPointBy = null;
396
397
        // Clear the get extremes from all.
398
        $this->getExtremesFromAll = null;
399
400
        // Clear the keys.
401
        $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...
402
403
        // Clear the line width.
404
        $this->lineWidth = null;
405
406
        // Clear the linked to.
407
        $this->linkedTo = null;
408
409
        // Clear the marker.
410
        if (null !== $this->marker) {
411
            $this->marker->clear();
412
        }
413
414
        // Clear the negative color.
415
        $this->negativeColor = null;
416
417
        // Clear the point.
418
        if (null !== $this->point) {
419
            $this->point->clear();
420
        }
421
422
        // Clear the point description formatter.
423
        $this->pointDescriptionFormatter = null;
424
425
        // Clear the point interval.
426
        $this->pointInterval = null;
427
428
        // Clear the point interval unit.
429
        $this->pointIntervalUnit = null;
430
431
        // Clear the point start.
432
        $this->pointStart = null;
433
434
        // Clear the selected.
435
        $this->selected = null;
436
437
        // Clear the shadow.
438
        $this->shadow = null;
439
440
        // Clear the show checkbox.
441
        $this->showCheckbox = null;
442
443
        // Clear the show in legend.
444
        $this->showInLegend = null;
445
446
        // Clear the skip keyboard navigation.
447
        $this->skipKeyboardNavigation = null;
448
449
        // Clear the soft threshold.
450
        $this->softThreshold = null;
451
452
        // Clear the states.
453
        if (null !== $this->states) {
454
            $this->states->clear();
455
        }
456
457
        // Clear the sticky tracking.
458
        $this->stickyTracking = null;
459
460
        // Clear the threshold.
461
        $this->threshold = null;
462
463
        // Clear the tooltip.
464
        $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...
465
466
        // Clear the turbo threshold.
467
        $this->turboThreshold = null;
468
469
        // Clear the visible.
470
        $this->visible = null;
471
472
        // Clear the zone axis.
473
        $this->zoneAxis = null;
474
475
        // Clear the zones.
476
        $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...
477
    }
478
479
    /**
480
     * Get the allow point select.
481
     *
482
     * @return boolean Returns the allow point select.
483
     */
484
    public function getAllowPointSelect() {
485
        return $this->allowPointSelect;
486
    }
487
488
    /**
489
     * Get the animation.
490
     *
491
     * @return boolean Returns the animation.
492
     */
493
    public function getAnimation() {
494
        return $this->animation;
495
    }
496
497
    /**
498
     * Get the animation limit.
499
     *
500
     * @return integer Returns the animation limit.
501
     */
502
    public function getAnimationLimit() {
503
        return $this->animationLimit;
504
    }
505
506
    /**
507
     * Get the class name.
508
     *
509
     * @return string Returns the class name.
510
     */
511
    public function getClassName() {
512
        return $this->className;
513
    }
514
515
    /**
516
     * Get the color.
517
     *
518
     * @return string Returns the color.
519
     */
520
    public function getColor() {
521
        return $this->color;
522
    }
523
524
    /**
525
     * Get the color index.
526
     *
527
     * @return integer Returns the color index.
528
     */
529
    public function getColorIndex() {
530
        return $this->colorIndex;
531
    }
532
533
    /**
534
     * Get the crop threshold.
535
     *
536
     * @return integer Returns the crop threshold.
537
     */
538
    public function getCropThreshold() {
539
        return $this->cropThreshold;
540
    }
541
542
    /**
543
     * Get the cursor.
544
     *
545
     * @return string Returns the cursor.
546
     */
547
    public function getCursor() {
548
        return $this->cursor;
549
    }
550
551
    /**
552
     * Get the dash style.
553
     *
554
     * @return string Returns the dash style.
555
     */
556
    public function getDashStyle() {
557
        return $this->dashStyle;
558
    }
559
560
    /**
561
     * Get the data labels.
562
     *
563
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Scatter\HighchartsDataLabels Returns the data labels.
564
     */
565
    public function getDataLabels() {
566
        return $this->dataLabels;
567
    }
568
569
    /**
570
     * Get the description.
571
     *
572
     * @return string Returns the description.
573
     */
574
    public function getDescription() {
575
        return $this->description;
576
    }
577
578
    /**
579
     * Get the enable mouse tracking.
580
     *
581
     * @return boolean Returns the enable mouse tracking.
582
     */
583
    public function getEnableMouseTracking() {
584
        return $this->enableMouseTracking;
585
    }
586
587
    /**
588
     * Get the events.
589
     *
590
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Scatter\HighchartsEvents Returns the events.
591
     */
592
    public function getEvents() {
593
        return $this->events;
594
    }
595
596
    /**
597
     * Get the expose element to a11y.
598
     *
599
     * @return boolean Returns the expose element to a11y.
600
     */
601
    public function getExposeElementToA11y() {
602
        return $this->exposeElementToA11y;
603
    }
604
605
    /**
606
     * Get the find nearest point by.
607
     *
608
     * @return string Returns the find nearest point by.
609
     */
610
    public function getFindNearestPointBy() {
611
        return $this->findNearestPointBy;
612
    }
613
614
    /**
615
     * Get the get extremes from all.
616
     *
617
     * @return boolean Returns the get extremes from all.
618
     */
619
    public function getGetExtremesFromAll() {
620
        return $this->getExtremesFromAll;
621
    }
622
623
    /**
624
     * Get the keys.
625
     *
626
     * @return array Returns the keys.
627
     */
628
    public function getKeys() {
629
        return $this->keys;
630
    }
631
632
    /**
633
     * Get the line width.
634
     *
635
     * @return integer Returns the line width.
636
     */
637
    public function getLineWidth() {
638
        return $this->lineWidth;
639
    }
640
641
    /**
642
     * Get the linked to.
643
     *
644
     * @return string Returns the linked to.
645
     */
646
    public function getLinkedTo() {
647
        return $this->linkedTo;
648
    }
649
650
    /**
651
     * Get the marker.
652
     *
653
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Scatter\HighchartsMarker Returns the marker.
654
     */
655
    public function getMarker() {
656
        return $this->marker;
657
    }
658
659
    /**
660
     * Get the negative color.
661
     *
662
     * @return string Returns the negative color.
663
     */
664
    public function getNegativeColor() {
665
        return $this->negativeColor;
666
    }
667
668
    /**
669
     * Get the point.
670
     *
671
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Scatter\HighchartsPoint Returns the point.
672
     */
673
    public function getPoint() {
674
        return $this->point;
675
    }
676
677
    /**
678
     * Get the point description formatter.
679
     *
680
     * @return string Returns the point description formatter.
681
     */
682
    public function getPointDescriptionFormatter() {
683
        return $this->pointDescriptionFormatter;
684
    }
685
686
    /**
687
     * Get the point interval.
688
     *
689
     * @return integer Returns the point interval.
690
     */
691
    public function getPointInterval() {
692
        return $this->pointInterval;
693
    }
694
695
    /**
696
     * Get the point interval unit.
697
     *
698
     * @return string Returns the point interval unit.
699
     */
700
    public function getPointIntervalUnit() {
701
        return $this->pointIntervalUnit;
702
    }
703
704
    /**
705
     * Get the point start.
706
     *
707
     * @return integer Returns the point start.
708
     */
709
    public function getPointStart() {
710
        return $this->pointStart;
711
    }
712
713
    /**
714
     * Get the selected.
715
     *
716
     * @return boolean Returns the selected.
717
     */
718
    public function getSelected() {
719
        return $this->selected;
720
    }
721
722
    /**
723
     * Get the shadow.
724
     *
725
     * @return boolean|array Returns the shadow.
726
     */
727
    public function getShadow() {
728
        return $this->shadow;
729
    }
730
731
    /**
732
     * Get the show checkbox.
733
     *
734
     * @return boolean Returns the show checkbox.
735
     */
736
    public function getShowCheckbox() {
737
        return $this->showCheckbox;
738
    }
739
740
    /**
741
     * Get the show in legend.
742
     *
743
     * @return boolean Returns the show in legend.
744
     */
745
    public function getShowInLegend() {
746
        return $this->showInLegend;
747
    }
748
749
    /**
750
     * Get the skip keyboard navigation.
751
     *
752
     * @return boolean Returns the skip keyboard navigation.
753
     */
754
    public function getSkipKeyboardNavigation() {
755
        return $this->skipKeyboardNavigation;
756
    }
757
758
    /**
759
     * Get the soft threshold.
760
     *
761
     * @return boolean Returns the soft threshold.
762
     */
763
    public function getSoftThreshold() {
764
        return $this->softThreshold;
765
    }
766
767
    /**
768
     * Get the states.
769
     *
770
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Scatter\HighchartsStates Returns the states.
771
     */
772
    public function getStates() {
773
        return $this->states;
774
    }
775
776
    /**
777
     * Get the sticky tracking.
778
     *
779
     * @return boolean Returns the sticky tracking.
780
     */
781
    public function getStickyTracking() {
782
        return $this->stickyTracking;
783
    }
784
785
    /**
786
     * Get the threshold.
787
     *
788
     * @return integer Returns the threshold.
789
     */
790
    public function getThreshold() {
791
        return $this->threshold;
792
    }
793
794
    /**
795
     * Get the tooltip.
796
     *
797
     * @return array Returns the tooltip.
798
     */
799
    public function getTooltip() {
800
        return $this->tooltip;
801
    }
802
803
    /**
804
     * Get the turbo threshold.
805
     *
806
     * @return integer Returns the turbo threshold.
807
     */
808
    public function getTurboThreshold() {
809
        return $this->turboThreshold;
810
    }
811
812
    /**
813
     * Get the visible.
814
     *
815
     * @return boolean Returns the visible.
816
     */
817
    public function getVisible() {
818
        return $this->visible;
819
    }
820
821
    /**
822
     * Get the zone axis.
823
     *
824
     * @return string Returns the zone axis.
825
     */
826
    public function getZoneAxis() {
827
        return $this->zoneAxis;
828
    }
829
830
    /**
831
     * Get the zones.
832
     *
833
     * @return array Returns the zones.
834
     */
835
    public function getZones() {
836
        return $this->zones;
837
    }
838
839
    /**
840
     * Serialize this instance.
841
     *
842
     * @return array Returns an array representing this instance.
843
     */
844
    public function jsonSerialize() {
845
        return $this->toArray();
846
    }
847
848
    /**
849
     * Create a new data labels.
850
     *
851
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Scatter\HighchartsDataLabels Returns the data labels.
852
     */
853
    public function newDataLabels() {
854
        $this->dataLabels = new \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Scatter\HighchartsDataLabels();
855
        return $this->dataLabels;
856
    }
857
858
    /**
859
     * Create a new events.
860
     *
861
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Scatter\HighchartsEvents Returns the events.
862
     */
863
    public function newEvents() {
864
        $this->events = new \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Scatter\HighchartsEvents();
865
        return $this->events;
866
    }
867
868
    /**
869
     * Create a new marker.
870
     *
871
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Scatter\HighchartsMarker Returns the marker.
872
     */
873
    public function newMarker() {
874
        $this->marker = new \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Scatter\HighchartsMarker();
875
        return $this->marker;
876
    }
877
878
    /**
879
     * Create a new point.
880
     *
881
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Scatter\HighchartsPoint Returns the point.
882
     */
883
    public function newPoint() {
884
        $this->point = new \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Scatter\HighchartsPoint();
885
        return $this->point;
886
    }
887
888
    /**
889
     * Create a new states.
890
     *
891
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Scatter\HighchartsStates Returns the states.
892
     */
893
    public function newStates() {
894
        $this->states = new \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Scatter\HighchartsStates();
895
        return $this->states;
896
    }
897
898
    /**
899
     * Set the allow point select.
900
     *
901
     * @param boolean $allowPointSelect The allow point select.
902
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsScatter Returns the highcharts scatter.
903
     */
904
    public function setAllowPointSelect($allowPointSelect) {
905
        $this->allowPointSelect = $allowPointSelect;
906
        return $this;
907
    }
908
909
    /**
910
     * Set the animation.
911
     *
912
     * @param boolean $animation The animation.
913
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsScatter Returns the highcharts scatter.
914
     */
915
    public function setAnimation($animation) {
916
        $this->animation = $animation;
917
        return $this;
918
    }
919
920
    /**
921
     * Set the animation limit.
922
     *
923
     * @param integer $animationLimit The animation limit.
924
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsScatter Returns the highcharts scatter.
925
     */
926
    public function setAnimationLimit($animationLimit) {
927
        $this->animationLimit = $animationLimit;
928
        return $this;
929
    }
930
931
    /**
932
     * Set the class name.
933
     *
934
     * @param string $className The class name.
935
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsScatter Returns the highcharts scatter.
936
     */
937
    public function setClassName($className) {
938
        $this->className = $className;
939
        return $this;
940
    }
941
942
    /**
943
     * Set the color.
944
     *
945
     * @param string $color The color.
946
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsScatter Returns the highcharts scatter.
947
     */
948
    public function setColor($color) {
949
        $this->color = $color;
950
        return $this;
951
    }
952
953
    /**
954
     * Set the color index.
955
     *
956
     * @param integer $colorIndex The color index.
957
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsScatter Returns the highcharts scatter.
958
     */
959
    public function setColorIndex($colorIndex) {
960
        $this->colorIndex = $colorIndex;
961
        return $this;
962
    }
963
964
    /**
965
     * Set the crop threshold.
966
     *
967
     * @param integer $cropThreshold The crop threshold.
968
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsScatter Returns the highcharts scatter.
969
     */
970
    public function setCropThreshold($cropThreshold) {
971
        $this->cropThreshold = $cropThreshold;
972
        return $this;
973
    }
974
975
    /**
976
     * Set the cursor.
977
     *
978
     * @param string $cursor The cursor.
979
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsScatter Returns the highcharts scatter.
980
     */
981
    public function setCursor($cursor) {
982
        switch ($cursor) {
983
            case null:
984
            case "crosshair":
985
            case "default":
986
            case "help":
987
            case "none":
988
            case "pointer":
989
            $this->cursor = $cursor;
990
            break;
991
        }
992
        return $this;
993
    }
994
995
    /**
996
     * Set the dash style.
997
     *
998
     * @param string $dashStyle The dash style.
999
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsScatter Returns the highcharts scatter.
1000
     */
1001
    public function setDashStyle($dashStyle) {
1002
        switch ($dashStyle) {
1003
            case "Dash":
1004
            case "DashDot":
1005
            case "Dot":
1006
            case "LongDash":
1007
            case "LongDashDot":
1008
            case "LongDashDotDot":
1009
            case "ShortDash":
1010
            case "ShortDashDot":
1011
            case "ShortDashDotDot":
1012
            case "ShortDot":
1013
            case "Solid":
1014
            $this->dashStyle = $dashStyle;
1015
            break;
1016
        }
1017
        return $this;
1018
    }
1019
1020
    /**
1021
     * Set the data labels.
1022
     *
1023
     * @param \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Scatter\HighchartsDataLabels $dataLabels The data labels.
1024
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsScatter Returns the highcharts scatter.
1025
     */
1026
    public function setDataLabels(\WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Scatter\HighchartsDataLabels $dataLabels = null) {
1027
        $this->dataLabels = $dataLabels;
1028
        return $this;
1029
    }
1030
1031
    /**
1032
     * Set the description.
1033
     *
1034
     * @param string $description The description.
1035
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsScatter Returns the highcharts scatter.
1036
     */
1037
    public function setDescription($description) {
1038
        $this->description = $description;
1039
        return $this;
1040
    }
1041
1042
    /**
1043
     * Set the enable mouse tracking.
1044
     *
1045
     * @param boolean $enableMouseTracking The enable mouse tracking.
1046
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsScatter Returns the highcharts scatter.
1047
     */
1048
    public function setEnableMouseTracking($enableMouseTracking) {
1049
        $this->enableMouseTracking = $enableMouseTracking;
1050
        return $this;
1051
    }
1052
1053
    /**
1054
     * Set the events.
1055
     *
1056
     * @param \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Scatter\HighchartsEvents $events The events.
1057
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsScatter Returns the highcharts scatter.
1058
     */
1059
    public function setEvents(\WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Scatter\HighchartsEvents $events = null) {
1060
        $this->events = $events;
1061
        return $this;
1062
    }
1063
1064
    /**
1065
     * Set the expose element to a11y.
1066
     *
1067
     * @param boolean $exposeElementToA11y The expose element to a11y.
1068
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsScatter Returns the highcharts scatter.
1069
     */
1070
    public function setExposeElementToA11y($exposeElementToA11y) {
1071
        $this->exposeElementToA11y = $exposeElementToA11y;
1072
        return $this;
1073
    }
1074
1075
    /**
1076
     * Set the find nearest point by.
1077
     *
1078
     * @param string $findNearestPointBy The find nearest point by.
1079
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsScatter Returns the highcharts scatter.
1080
     */
1081
    public function setFindNearestPointBy($findNearestPointBy) {
1082
        switch ($findNearestPointBy) {
1083
            case "x":
1084
            case "xy":
1085
            $this->findNearestPointBy = $findNearestPointBy;
1086
            break;
1087
        }
1088
        return $this;
1089
    }
1090
1091
    /**
1092
     * Set the get extremes from all.
1093
     *
1094
     * @param boolean $getExtremesFromAll The get extremes from all.
1095
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsScatter Returns the highcharts scatter.
1096
     */
1097
    public function setGetExtremesFromAll($getExtremesFromAll) {
1098
        $this->getExtremesFromAll = $getExtremesFromAll;
1099
        return $this;
1100
    }
1101
1102
    /**
1103
     * Set the keys.
1104
     *
1105
     * @param array $keys The keys.
1106
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsScatter Returns the highcharts scatter.
1107
     */
1108
    public function setKeys(array $keys = null) {
1109
        $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...
1110
        return $this;
1111
    }
1112
1113
    /**
1114
     * Set the line width.
1115
     *
1116
     * @param integer $lineWidth The line width.
1117
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsScatter Returns the highcharts scatter.
1118
     */
1119
    public function setLineWidth($lineWidth) {
1120
        $this->lineWidth = $lineWidth;
1121
        return $this;
1122
    }
1123
1124
    /**
1125
     * Set the linked to.
1126
     *
1127
     * @param string $linkedTo The linked to.
1128
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsScatter Returns the highcharts scatter.
1129
     */
1130
    public function setLinkedTo($linkedTo) {
1131
        $this->linkedTo = $linkedTo;
1132
        return $this;
1133
    }
1134
1135
    /**
1136
     * Set the marker.
1137
     *
1138
     * @param \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Scatter\HighchartsMarker $marker The marker.
1139
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsScatter Returns the highcharts scatter.
1140
     */
1141
    public function setMarker(\WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Scatter\HighchartsMarker $marker = null) {
1142
        $this->marker = $marker;
1143
        return $this;
1144
    }
1145
1146
    /**
1147
     * Set the negative color.
1148
     *
1149
     * @param string $negativeColor The negative color.
1150
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsScatter Returns the highcharts scatter.
1151
     */
1152
    public function setNegativeColor($negativeColor) {
1153
        $this->negativeColor = $negativeColor;
1154
        return $this;
1155
    }
1156
1157
    /**
1158
     * Set the point.
1159
     *
1160
     * @param \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Scatter\HighchartsPoint $point The point.
1161
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsScatter Returns the highcharts scatter.
1162
     */
1163
    public function setPoint(\WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Scatter\HighchartsPoint $point = null) {
1164
        $this->point = $point;
1165
        return $this;
1166
    }
1167
1168
    /**
1169
     * Set the point description formatter.
1170
     *
1171
     * @param string $pointDescriptionFormatter The point description formatter.
1172
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsScatter Returns the highcharts scatter.
1173
     */
1174
    public function setPointDescriptionFormatter($pointDescriptionFormatter) {
1175
        $this->pointDescriptionFormatter = $pointDescriptionFormatter;
1176
        return $this;
1177
    }
1178
1179
    /**
1180
     * Set the point interval.
1181
     *
1182
     * @param integer $pointInterval The point interval.
1183
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsScatter Returns the highcharts scatter.
1184
     */
1185
    public function setPointInterval($pointInterval) {
1186
        $this->pointInterval = $pointInterval;
1187
        return $this;
1188
    }
1189
1190
    /**
1191
     * Set the point interval unit.
1192
     *
1193
     * @param string $pointIntervalUnit The point interval unit.
1194
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsScatter Returns the highcharts scatter.
1195
     */
1196
    public function setPointIntervalUnit($pointIntervalUnit) {
1197
        switch ($pointIntervalUnit) {
1198
            case null:
1199
            case "day":
1200
            case "month":
1201
            case "year":
1202
            $this->pointIntervalUnit = $pointIntervalUnit;
1203
            break;
1204
        }
1205
        return $this;
1206
    }
1207
1208
    /**
1209
     * Set the point start.
1210
     *
1211
     * @param integer $pointStart The point start.
1212
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsScatter Returns the highcharts scatter.
1213
     */
1214
    public function setPointStart($pointStart) {
1215
        $this->pointStart = $pointStart;
1216
        return $this;
1217
    }
1218
1219
    /**
1220
     * Set the selected.
1221
     *
1222
     * @param boolean $selected The selected.
1223
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsScatter Returns the highcharts scatter.
1224
     */
1225
    public function setSelected($selected) {
1226
        $this->selected = $selected;
1227
        return $this;
1228
    }
1229
1230
    /**
1231
     * Set the shadow.
1232
     *
1233
     * @param boolean|array $shadow The shadow.
1234
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsScatter Returns the highcharts scatter.
1235
     */
1236
    public function setShadow($shadow) {
1237
        $this->shadow = $shadow;
1238
        return $this;
1239
    }
1240
1241
    /**
1242
     * Set the show checkbox.
1243
     *
1244
     * @param boolean $showCheckbox The show checkbox.
1245
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsScatter Returns the highcharts scatter.
1246
     */
1247
    public function setShowCheckbox($showCheckbox) {
1248
        $this->showCheckbox = $showCheckbox;
1249
        return $this;
1250
    }
1251
1252
    /**
1253
     * Set the show in legend.
1254
     *
1255
     * @param boolean $showInLegend The show in legend.
1256
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsScatter Returns the highcharts scatter.
1257
     */
1258
    public function setShowInLegend($showInLegend) {
1259
        $this->showInLegend = $showInLegend;
1260
        return $this;
1261
    }
1262
1263
    /**
1264
     * Set the skip keyboard navigation.
1265
     *
1266
     * @param boolean $skipKeyboardNavigation The skip keyboard navigation.
1267
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsScatter Returns the highcharts scatter.
1268
     */
1269
    public function setSkipKeyboardNavigation($skipKeyboardNavigation) {
1270
        $this->skipKeyboardNavigation = $skipKeyboardNavigation;
1271
        return $this;
1272
    }
1273
1274
    /**
1275
     * Set the soft threshold.
1276
     *
1277
     * @param boolean $softThreshold The soft threshold.
1278
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsScatter Returns the highcharts scatter.
1279
     */
1280
    public function setSoftThreshold($softThreshold) {
1281
        $this->softThreshold = $softThreshold;
1282
        return $this;
1283
    }
1284
1285
    /**
1286
     * Set the states.
1287
     *
1288
     * @param \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Scatter\HighchartsStates $states The states.
1289
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsScatter Returns the highcharts scatter.
1290
     */
1291
    public function setStates(\WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\Scatter\HighchartsStates $states = null) {
1292
        $this->states = $states;
1293
        return $this;
1294
    }
1295
1296
    /**
1297
     * Set the sticky tracking.
1298
     *
1299
     * @param boolean $stickyTracking The sticky tracking.
1300
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsScatter Returns the highcharts scatter.
1301
     */
1302
    public function setStickyTracking($stickyTracking) {
1303
        $this->stickyTracking = $stickyTracking;
1304
        return $this;
1305
    }
1306
1307
    /**
1308
     * Set the threshold.
1309
     *
1310
     * @param integer $threshold The threshold.
1311
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsScatter Returns the highcharts scatter.
1312
     */
1313
    public function setThreshold($threshold) {
1314
        $this->threshold = $threshold;
1315
        return $this;
1316
    }
1317
1318
    /**
1319
     * Set the tooltip.
1320
     *
1321
     * @param array $tooltip The tooltip.
1322
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsScatter Returns the highcharts scatter.
1323
     */
1324
    public function setTooltip(array $tooltip = null) {
1325
        $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...
1326
        return $this;
1327
    }
1328
1329
    /**
1330
     * Set the turbo threshold.
1331
     *
1332
     * @param integer $turboThreshold The turbo threshold.
1333
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsScatter Returns the highcharts scatter.
1334
     */
1335
    public function setTurboThreshold($turboThreshold) {
1336
        $this->turboThreshold = $turboThreshold;
1337
        return $this;
1338
    }
1339
1340
    /**
1341
     * Set the visible.
1342
     *
1343
     * @param boolean $visible The visible.
1344
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsScatter Returns the highcharts scatter.
1345
     */
1346
    public function setVisible($visible) {
1347
        $this->visible = $visible;
1348
        return $this;
1349
    }
1350
1351
    /**
1352
     * Set the zone axis.
1353
     *
1354
     * @param string $zoneAxis The zone axis.
1355
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsScatter Returns the highcharts scatter.
1356
     */
1357
    public function setZoneAxis($zoneAxis) {
1358
        $this->zoneAxis = $zoneAxis;
1359
        return $this;
1360
    }
1361
1362
    /**
1363
     * Set the zones.
1364
     *
1365
     * @param array $zones The zones.
1366
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\PlotOptions\HighchartsScatter Returns the highcharts scatter.
1367
     */
1368
    public function setZones(array $zones = null) {
1369
        $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...
1370
        return $this;
1371
    }
1372
1373
    /**
1374
     * Convert into an array representing this instance.
1375
     *
1376
     * @return array Returns an array representing this instance.
1377
     */
1378
    public function toArray() {
1379
1380
        // Initialize the output.
1381
        $output = [];
1382
1383
        // Set the allow point select.
1384
        ArrayUtility::set($output, "allowPointSelect", $this->allowPointSelect, [null]);
1385
1386
        // Set the animation.
1387
        ArrayUtility::set($output, "animation", $this->animation, [null]);
1388
1389
        // Set the animation limit.
1390
        ArrayUtility::set($output, "animationLimit", $this->animationLimit, [null]);
1391
1392
        // Set the class name.
1393
        ArrayUtility::set($output, "className", $this->className, [null]);
1394
1395
        // Set the color.
1396
        ArrayUtility::set($output, "color", $this->color, [null]);
1397
1398
        // Set the color index.
1399
        ArrayUtility::set($output, "colorIndex", $this->colorIndex, [null]);
1400
1401
        // Set the crop threshold.
1402
        ArrayUtility::set($output, "cropThreshold", $this->cropThreshold, [null]);
1403
1404
        // Set the cursor.
1405
        ArrayUtility::set($output, "cursor", $this->cursor, [null]);
1406
1407
        // Set the dash style.
1408
        ArrayUtility::set($output, "dashStyle", $this->dashStyle, [null]);
1409
1410
        // Set the data labels.
1411
        if (null !== $this->dataLabels) {
1412
            ArrayUtility::set($output, "dataLabels", $this->dataLabels->toArray(), []);
1413
        }
1414
1415
        // Set the description.
1416
        ArrayUtility::set($output, "description", $this->description, [null]);
1417
1418
        // Set the enable mouse tracking.
1419
        ArrayUtility::set($output, "enableMouseTracking", $this->enableMouseTracking, [null]);
1420
1421
        // Set the events.
1422
        if (null !== $this->events) {
1423
            ArrayUtility::set($output, "events", $this->events->toArray(), []);
1424
        }
1425
1426
        // Set the expose element to a11y.
1427
        ArrayUtility::set($output, "exposeElementToA11y", $this->exposeElementToA11y, [null]);
1428
1429
        // Set the find nearest point by.
1430
        ArrayUtility::set($output, "findNearestPointBy", $this->findNearestPointBy, [null]);
1431
1432
        // Set the get extremes from all.
1433
        ArrayUtility::set($output, "getExtremesFromAll", $this->getExtremesFromAll, [null]);
1434
1435
        // Set the keys.
1436
        ArrayUtility::set($output, "keys", $this->keys, [null]);
1437
1438
        // Set the line width.
1439
        ArrayUtility::set($output, "lineWidth", $this->lineWidth, [null]);
1440
1441
        // Set the linked to.
1442
        ArrayUtility::set($output, "linkedTo", $this->linkedTo, [null]);
1443
1444
        // Set the marker.
1445
        if (null !== $this->marker) {
1446
            ArrayUtility::set($output, "marker", $this->marker->toArray(), []);
1447
        }
1448
1449
        // Set the negative color.
1450
        ArrayUtility::set($output, "negativeColor", $this->negativeColor, [null]);
1451
1452
        // Set the point.
1453
        if (null !== $this->point) {
1454
            ArrayUtility::set($output, "point", $this->point->toArray(), []);
1455
        }
1456
1457
        // Set the point description formatter.
1458
        ArrayUtility::set($output, "pointDescriptionFormatter", $this->pointDescriptionFormatter, [null]);
1459
1460
        // Set the point interval.
1461
        ArrayUtility::set($output, "pointInterval", $this->pointInterval, [null]);
1462
1463
        // Set the point interval unit.
1464
        ArrayUtility::set($output, "pointIntervalUnit", $this->pointIntervalUnit, [null]);
1465
1466
        // Set the point start.
1467
        ArrayUtility::set($output, "pointStart", $this->pointStart, [null]);
1468
1469
        // Set the selected.
1470
        ArrayUtility::set($output, "selected", $this->selected, [null]);
1471
1472
        // Set the shadow.
1473
        ArrayUtility::set($output, "shadow", $this->shadow, [null]);
1474
1475
        // Set the show checkbox.
1476
        ArrayUtility::set($output, "showCheckbox", $this->showCheckbox, [null]);
1477
1478
        // Set the show in legend.
1479
        ArrayUtility::set($output, "showInLegend", $this->showInLegend, [null]);
1480
1481
        // Set the skip keyboard navigation.
1482
        ArrayUtility::set($output, "skipKeyboardNavigation", $this->skipKeyboardNavigation, [null]);
1483
1484
        // Set the soft threshold.
1485
        ArrayUtility::set($output, "softThreshold", $this->softThreshold, [null]);
1486
1487
        // Set the states.
1488
        if (null !== $this->states) {
1489
            ArrayUtility::set($output, "states", $this->states->toArray(), []);
1490
        }
1491
1492
        // Set the sticky tracking.
1493
        ArrayUtility::set($output, "stickyTracking", $this->stickyTracking, [null]);
1494
1495
        // Set the threshold.
1496
        ArrayUtility::set($output, "threshold", $this->threshold, [null]);
1497
1498
        // Set the tooltip.
1499
        ArrayUtility::set($output, "tooltip", $this->tooltip, [null]);
1500
1501
        // Set the turbo threshold.
1502
        ArrayUtility::set($output, "turboThreshold", $this->turboThreshold, [null]);
1503
1504
        // Set the visible.
1505
        ArrayUtility::set($output, "visible", $this->visible, [null]);
1506
1507
        // Set the zone axis.
1508
        ArrayUtility::set($output, "zoneAxis", $this->zoneAxis, [null]);
1509
1510
        // Set the zones.
1511
        ArrayUtility::set($output, "zones", $this->zones, [null]);
1512
1513
        // Return the output.
1514
        return $output;
1515
    }
1516
1517
}
1518