Issues (1377)

Security Analysis    no request data  

This project does not seem to handle request data directly as such no vulnerable execution paths were found.

  Cross-Site Scripting
Cross-Site Scripting enables an attacker to inject code into the response of a web-request that is viewed by other users. It can for example be used to bypass access controls, or even to take over other users' accounts.
  File Exposure
File Exposure allows an attacker to gain access to local files that he should not be able to access. These files can for example include database credentials, or other configuration files.
  File Manipulation
File Manipulation enables an attacker to write custom data to files. This potentially leads to injection of arbitrary code on the server.
  Object Injection
Object Injection enables an attacker to inject an object into PHP code, and can lead to arbitrary code execution, file exposure, or file manipulation attacks.
  Code Injection
Code Injection enables an attacker to execute arbitrary code on the server.
  Response Splitting
Response Splitting can be used to send arbitrary responses.
  File Inclusion
File Inclusion enables an attacker to inject custom files into PHP's file loading mechanism, either explicitly passed to include, or for example via PHP's auto-loading mechanism.
  Command Injection
Command Injection enables an attacker to inject a shell command that is execute with the privileges of the web-server. This can be used to expose sensitive data, or gain access of your server.
  SQL Injection
SQL Injection enables an attacker to execute arbitrary SQL code on your database server gaining access to user data, or manipulating user data.
  XPath Injection
XPath Injection enables an attacker to modify the parts of XML document that are read. If that XML document is for example used for authentication, this can lead to further vulnerabilities similar to SQL Injection.
  LDAP Injection
LDAP Injection enables an attacker to inject LDAP statements potentially granting permission to run unauthorized queries, or modify content inside the LDAP tree.
  Header Injection
  Other Vulnerability
This category comprises other attack vectors such as manipulating the PHP runtime, loading custom extensions, freezing the runtime, or similar.
  Regex Injection
Regex Injection enables an attacker to execute arbitrary code in your PHP process.
  XML Injection
XML Injection enables an attacker to read files on your local filesystem including configuration files, or can be abused to freeze your web-server process.
  Variable Injection
Variable Injection enables an attacker to overwrite program variables with custom data, and can lead to further vulnerabilities.
Unfortunately, the security analysis is currently not available for your project. If you are a non-commercial open-source project, please contact support to gain access.

API/Chart/Series/HighchartsPie.php (12 issues)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
3
/**
4
 * This file is part of the highcharts-bundle package.
5
 *
6
 * (c) 2017 WEBEWEB
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace WBW\Bundle\HighchartsBundle\API\Chart\Series;
13
14
use JsonSerializable;
15
use WBW\Library\Core\Utility\Argument\ArrayUtility;
16
17
/**
18
 * Highcharts pie.
19
 *
20
 * @author webeweb <https://github.com/webeweb/>
21
 * @package WBW\Bundle\HighchartsBundle\API\Chart\Series
22
 * @version 5.0.14
23
 * @final
24
 */
25
final class HighchartsPie 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
     * Border color.
51
     *
52
     * @var string
53
     */
54
    private $borderColor = "#ffffff";
55
56
    /**
57
     * Border width.
58
     *
59
     * @var integer
60
     */
61
    private $borderWidth = 1;
62
63
    /**
64
     * Center.
65
     *
66
     * @var array
67
     */
68
    private $center = [null, null];
69
70
    /**
71
     * Class name.
72
     *
73
     * @var string
74
     * @since 5.0.0
75
     */
76
    private $className;
77
78
    /**
79
     * Color index.
80
     *
81
     * @var integer
82
     * @since 5.0.0
83
     */
84
    private $colorIndex;
85
86
    /**
87
     * Colors.
88
     *
89
     * @var array
90
     * @since 3.0
91
     */
92
    private $colors;
93
94
    /**
95
     * Cursor.
96
     *
97
     * @var string
98
     */
99
    private $cursor;
100
101
    /**
102
     * Data.
103
     *
104
     * @var array
105
     */
106
    private $data;
107
108
    /**
109
     * Data labels.
110
     *
111
     * @var \WBW\Bundle\HighchartsBundle\API\Chart\Series\Pie\HighchartsDataLabels
112
     */
113
    private $dataLabels;
114
115
    /**
116
     * Depth.
117
     *
118
     * @var integer
119
     * @since 4.0
120
     */
121
    private $depth = 0;
122
123
    /**
124
     * Description.
125
     *
126
     * @var string
127
     * @since 5.0.0
128
     */
129
    private $description;
130
131
    /**
132
     * Enable mouse tracking.
133
     *
134
     * @var boolean
135
     */
136
    private $enableMouseTracking = true;
137
138
    /**
139
     * End angle.
140
     *
141
     * @var integer
142
     * @since 1.3.6
143
     */
144
    private $endAngle;
145
146
    /**
147
     * Events.
148
     *
149
     * @var \WBW\Bundle\HighchartsBundle\API\Chart\Series\Pie\HighchartsEvents
150
     */
151
    private $events;
152
153
    /**
154
     * Expose element to a11y.
155
     *
156
     * @var boolean
157
     * @since 5.0.12
158
     */
159
    private $exposeElementToA11y;
160
161
    /**
162
     * Find nearest point by.
163
     *
164
     * @var string
165
     * @since 5.0.10
166
     */
167
    private $findNearestPointBy;
168
169
    /**
170
     * Get extremes from all.
171
     *
172
     * @var boolean
173
     * @since 4.1.6
174
     */
175
    private $getExtremesFromAll = false;
176
177
    /**
178
     * Id.
179
     *
180
     * @var string
181
     * @since 1.2.0
182
     */
183
    private $id;
184
185
    /**
186
     * Ignore hidden point.
187
     *
188
     * @var boolean
189
     * @since 2.3.0
190
     */
191
    private $ignoreHiddenPoint = true;
192
193
    /**
194
     * Index.
195
     *
196
     * @var integer
197
     * @since 2.3.0
198
     */
199
    private $index;
200
201
    /**
202
     * Inner size.
203
     *
204
     * @var string|integer
205
     * @since 2.0
206
     */
207
    private $innerSize = "0";
208
209
    /**
210
     * Keys.
211
     *
212
     * @var array
213
     * @since 4.1.6
214
     */
215
    private $keys;
216
217
    /**
218
     * Legend index.
219
     *
220
     * @var integer
221
     */
222
    private $legendIndex;
223
224
    /**
225
     * Linked to.
226
     *
227
     * @var string
228
     * @since 3.0
229
     */
230
    private $linkedTo;
231
232
    /**
233
     * Min size.
234
     *
235
     * @var integer
236
     * @since 3.0
237
     */
238
    private $minSize = 80;
239
240
    /**
241
     * Name.
242
     *
243
     * @var string
244
     */
245
    private $name;
246
247
    /**
248
     * Point.
249
     *
250
     * @var \WBW\Bundle\HighchartsBundle\API\Chart\Series\Pie\HighchartsPoint
251
     */
252
    private $point;
253
254
    /**
255
     * Point description formatter.
256
     *
257
     * @var string
258
     * @since 5.0.12
259
     */
260
    private $pointDescriptionFormatter;
261
262
    /**
263
     * Selected.
264
     *
265
     * @var boolean
266
     * @since 1.2.0
267
     */
268
    private $selected = false;
269
270
    /**
271
     * Shadow.
272
     *
273
     * @var boolean|array
274
     */
275
    private $shadow = false;
276
277
    /**
278
     * Show in legend.
279
     *
280
     * @var boolean
281
     */
282
    private $showInLegend = false;
283
284
    /**
285
     * Size.
286
     *
287
     * @var string|integer
288
     */
289
    private $size;
290
291
    /**
292
     * Skip keyboard navigation.
293
     *
294
     * @var boolean
295
     * @since 5.0.12
296
     */
297
    private $skipKeyboardNavigation;
298
299
    /**
300
     * Sliced offset.
301
     *
302
     * @var integer
303
     */
304
    private $slicedOffset = 10;
305
306
    /**
307
     * Start angle.
308
     *
309
     * @var integer
310
     * @since 2.3.4
311
     */
312
    private $startAngle = 0;
313
314
    /**
315
     * States.
316
     *
317
     * @var \WBW\Bundle\HighchartsBundle\API\Chart\Series\Pie\HighchartsStates
318
     */
319
    private $states;
320
321
    /**
322
     * Sticky tracking.
323
     *
324
     * @var boolean
325
     */
326
    private $stickyTracking = false;
327
328
    /**
329
     * Tooltip.
330
     *
331
     * @var array
332
     * @since 2.3
333
     */
334
    private $tooltip;
335
336
    /**
337
     * Type.
338
     *
339
     * @var string
340
     */
341
    private $type;
342
343
    /**
344
     * Visible.
345
     *
346
     * @var boolean
347
     */
348
    private $visible = true;
349
350
    /**
351
     * Z index.
352
     *
353
     * @var integer
354
     */
355
    private $zIndex;
356
357
    /**
358
     * Zone axis.
359
     *
360
     * @var string
361
     * @since 4.1.0
362
     */
363
    private $zoneAxis = "y";
364
365
    /**
366
     * Zones.
367
     *
368
     * @var array
369
     * @since 4.1.0
370
     */
371
    private $zones;
372
373
    /**
374
     * Constructor.
375
     *
376
     * @param boolean $ignoreDefaultValues Ignore the default values.
377
     */
378
    public function __construct($ignoreDefaultValues = true) {
379
        if (true === $ignoreDefaultValues) {
380
            $this->clear();
381
        }
382
    }
383
384
    /**
385
     * Clear.
386
     *
387
     * @return void
388
     */
389
    public function clear() {
390
391
        // Clear the allow point select.
392
        $this->allowPointSelect = null;
393
394
        // Clear the animation.
395
        $this->animation = null;
396
397
        // Clear the animation limit.
398
        $this->animationLimit = null;
399
400
        // Clear the border color.
401
        $this->borderColor = null;
402
403
        // Clear the border width.
404
        $this->borderWidth = null;
405
406
        // Clear the center.
407
        $this->center = null;
0 ignored issues
show
Documentation Bug introduced by
It seems like null of type null is incompatible with the declared type array of property $center.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
408
409
        // Clear the class name.
410
        $this->className = null;
411
412
        // Clear the color index.
413
        $this->colorIndex = null;
414
415
        // Clear the colors.
416
        $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...
417
418
        // Clear the cursor.
419
        $this->cursor = null;
420
421
        // Clear the data.
422
        $this->data = 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 $data.

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...
423
424
        // Clear the data labels.
425
        if (null !== $this->dataLabels) {
426
            $this->dataLabels->clear();
427
        }
428
429
        // Clear the depth.
430
        $this->depth = null;
431
432
        // Clear the description.
433
        $this->description = null;
434
435
        // Clear the enable mouse tracking.
436
        $this->enableMouseTracking = null;
437
438
        // Clear the end angle.
439
        $this->endAngle = null;
440
441
        // Clear the events.
442
        if (null !== $this->events) {
443
            $this->events->clear();
444
        }
445
446
        // Clear the expose element to a11y.
447
        $this->exposeElementToA11y = null;
448
449
        // Clear the find nearest point by.
450
        $this->findNearestPointBy = null;
451
452
        // Clear the get extremes from all.
453
        $this->getExtremesFromAll = null;
454
455
        // Clear the id.
456
        $this->id = null;
457
458
        // Clear the ignore hidden point.
459
        $this->ignoreHiddenPoint = null;
460
461
        // Clear the index.
462
        $this->index = null;
463
464
        // Clear the inner size.
465
        $this->innerSize = null;
466
467
        // Clear the keys.
468
        $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...
469
470
        // Clear the legend index.
471
        $this->legendIndex = null;
472
473
        // Clear the linked to.
474
        $this->linkedTo = null;
475
476
        // Clear the min size.
477
        $this->minSize = null;
478
479
        // Clear the name.
480
        $this->name = null;
481
482
        // Clear the point.
483
        if (null !== $this->point) {
484
            $this->point->clear();
485
        }
486
487
        // Clear the point description formatter.
488
        $this->pointDescriptionFormatter = null;
489
490
        // Clear the selected.
491
        $this->selected = null;
492
493
        // Clear the shadow.
494
        $this->shadow = null;
495
496
        // Clear the show in legend.
497
        $this->showInLegend = null;
498
499
        // Clear the size.
500
        $this->size = null;
501
502
        // Clear the skip keyboard navigation.
503
        $this->skipKeyboardNavigation = null;
504
505
        // Clear the sliced offset.
506
        $this->slicedOffset = null;
507
508
        // Clear the start angle.
509
        $this->startAngle = null;
510
511
        // Clear the states.
512
        if (null !== $this->states) {
513
            $this->states->clear();
514
        }
515
516
        // Clear the sticky tracking.
517
        $this->stickyTracking = null;
518
519
        // Clear the tooltip.
520
        $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...
521
522
        // Clear the type.
523
        $this->type = null;
524
525
        // Clear the visible.
526
        $this->visible = null;
527
528
        // Clear the z index.
529
        $this->zIndex = null;
530
531
        // Clear the zone axis.
532
        $this->zoneAxis = null;
533
534
        // Clear the zones.
535
        $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...
536
    }
537
538
    /**
539
     * Get the allow point select.
540
     *
541
     * @return boolean Returns the allow point select.
542
     */
543
    public function getAllowPointSelect() {
544
        return $this->allowPointSelect;
545
    }
546
547
    /**
548
     * Get the animation.
549
     *
550
     * @return boolean Returns the animation.
551
     */
552
    public function getAnimation() {
553
        return $this->animation;
554
    }
555
556
    /**
557
     * Get the animation limit.
558
     *
559
     * @return integer Returns the animation limit.
560
     */
561
    public function getAnimationLimit() {
562
        return $this->animationLimit;
563
    }
564
565
    /**
566
     * Get the border color.
567
     *
568
     * @return string Returns the border color.
569
     */
570
    public function getBorderColor() {
571
        return $this->borderColor;
572
    }
573
574
    /**
575
     * Get the border width.
576
     *
577
     * @return integer Returns the border width.
578
     */
579
    public function getBorderWidth() {
580
        return $this->borderWidth;
581
    }
582
583
    /**
584
     * Get the center.
585
     *
586
     * @return array Returns the center.
587
     */
588
    public function getCenter() {
589
        return $this->center;
590
    }
591
592
    /**
593
     * Get the class name.
594
     *
595
     * @return string Returns the class name.
596
     */
597
    public function getClassName() {
598
        return $this->className;
599
    }
600
601
    /**
602
     * Get the color index.
603
     *
604
     * @return integer Returns the color index.
605
     */
606
    public function getColorIndex() {
607
        return $this->colorIndex;
608
    }
609
610
    /**
611
     * Get the colors.
612
     *
613
     * @return array Returns the colors.
614
     */
615
    public function getColors() {
616
        return $this->colors;
617
    }
618
619
    /**
620
     * Get the cursor.
621
     *
622
     * @return string Returns the cursor.
623
     */
624
    public function getCursor() {
625
        return $this->cursor;
626
    }
627
628
    /**
629
     * Get the data.
630
     *
631
     * @return array Returns the data.
632
     */
633
    public function getData() {
634
        return $this->data;
635
    }
636
637
    /**
638
     * Get the data labels.
639
     *
640
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\Series\Pie\HighchartsDataLabels Returns the data labels.
641
     */
642
    public function getDataLabels() {
643
        return $this->dataLabels;
644
    }
645
646
    /**
647
     * Get the depth.
648
     *
649
     * @return integer Returns the depth.
650
     */
651
    public function getDepth() {
652
        return $this->depth;
653
    }
654
655
    /**
656
     * Get the description.
657
     *
658
     * @return string Returns the description.
659
     */
660
    public function getDescription() {
661
        return $this->description;
662
    }
663
664
    /**
665
     * Get the enable mouse tracking.
666
     *
667
     * @return boolean Returns the enable mouse tracking.
668
     */
669
    public function getEnableMouseTracking() {
670
        return $this->enableMouseTracking;
671
    }
672
673
    /**
674
     * Get the end angle.
675
     *
676
     * @return integer Returns the end angle.
677
     */
678
    public function getEndAngle() {
679
        return $this->endAngle;
680
    }
681
682
    /**
683
     * Get the events.
684
     *
685
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\Series\Pie\HighchartsEvents Returns the events.
686
     */
687
    public function getEvents() {
688
        return $this->events;
689
    }
690
691
    /**
692
     * Get the expose element to a11y.
693
     *
694
     * @return boolean Returns the expose element to a11y.
695
     */
696
    public function getExposeElementToA11y() {
697
        return $this->exposeElementToA11y;
698
    }
699
700
    /**
701
     * Get the find nearest point by.
702
     *
703
     * @return string Returns the find nearest point by.
704
     */
705
    public function getFindNearestPointBy() {
706
        return $this->findNearestPointBy;
707
    }
708
709
    /**
710
     * Get the get extremes from all.
711
     *
712
     * @return boolean Returns the get extremes from all.
713
     */
714
    public function getGetExtremesFromAll() {
715
        return $this->getExtremesFromAll;
716
    }
717
718
    /**
719
     * Get the id.
720
     *
721
     * @return string Returns the id.
722
     */
723
    public function getId() {
724
        return $this->id;
725
    }
726
727
    /**
728
     * Get the ignore hidden point.
729
     *
730
     * @return boolean Returns the ignore hidden point.
731
     */
732
    public function getIgnoreHiddenPoint() {
733
        return $this->ignoreHiddenPoint;
734
    }
735
736
    /**
737
     * Get the index.
738
     *
739
     * @return integer Returns the index.
740
     */
741
    public function getIndex() {
742
        return $this->index;
743
    }
744
745
    /**
746
     * Get the inner size.
747
     *
748
     * @return string|integer Returns the inner size.
749
     */
750
    public function getInnerSize() {
751
        return $this->innerSize;
752
    }
753
754
    /**
755
     * Get the keys.
756
     *
757
     * @return array Returns the keys.
758
     */
759
    public function getKeys() {
760
        return $this->keys;
761
    }
762
763
    /**
764
     * Get the legend index.
765
     *
766
     * @return integer Returns the legend index.
767
     */
768
    public function getLegendIndex() {
769
        return $this->legendIndex;
770
    }
771
772
    /**
773
     * Get the linked to.
774
     *
775
     * @return string Returns the linked to.
776
     */
777
    public function getLinkedTo() {
778
        return $this->linkedTo;
779
    }
780
781
    /**
782
     * Get the min size.
783
     *
784
     * @return integer Returns the min size.
785
     */
786
    public function getMinSize() {
787
        return $this->minSize;
788
    }
789
790
    /**
791
     * Get the name.
792
     *
793
     * @return string Returns the name.
794
     */
795
    public function getName() {
796
        return $this->name;
797
    }
798
799
    /**
800
     * Get the point.
801
     *
802
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\Series\Pie\HighchartsPoint Returns the point.
803
     */
804
    public function getPoint() {
805
        return $this->point;
806
    }
807
808
    /**
809
     * Get the point description formatter.
810
     *
811
     * @return string Returns the point description formatter.
812
     */
813
    public function getPointDescriptionFormatter() {
814
        return $this->pointDescriptionFormatter;
815
    }
816
817
    /**
818
     * Get the selected.
819
     *
820
     * @return boolean Returns the selected.
821
     */
822
    public function getSelected() {
823
        return $this->selected;
824
    }
825
826
    /**
827
     * Get the shadow.
828
     *
829
     * @return boolean|array Returns the shadow.
830
     */
831
    public function getShadow() {
832
        return $this->shadow;
833
    }
834
835
    /**
836
     * Get the show in legend.
837
     *
838
     * @return boolean Returns the show in legend.
839
     */
840
    public function getShowInLegend() {
841
        return $this->showInLegend;
842
    }
843
844
    /**
845
     * Get the size.
846
     *
847
     * @return string|integer Returns the size.
848
     */
849
    public function getSize() {
850
        return $this->size;
851
    }
852
853
    /**
854
     * Get the skip keyboard navigation.
855
     *
856
     * @return boolean Returns the skip keyboard navigation.
857
     */
858
    public function getSkipKeyboardNavigation() {
859
        return $this->skipKeyboardNavigation;
860
    }
861
862
    /**
863
     * Get the sliced offset.
864
     *
865
     * @return integer Returns the sliced offset.
866
     */
867
    public function getSlicedOffset() {
868
        return $this->slicedOffset;
869
    }
870
871
    /**
872
     * Get the start angle.
873
     *
874
     * @return integer Returns the start angle.
875
     */
876
    public function getStartAngle() {
877
        return $this->startAngle;
878
    }
879
880
    /**
881
     * Get the states.
882
     *
883
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\Series\Pie\HighchartsStates Returns the states.
884
     */
885
    public function getStates() {
886
        return $this->states;
887
    }
888
889
    /**
890
     * Get the sticky tracking.
891
     *
892
     * @return boolean Returns the sticky tracking.
893
     */
894
    public function getStickyTracking() {
895
        return $this->stickyTracking;
896
    }
897
898
    /**
899
     * Get the tooltip.
900
     *
901
     * @return array Returns the tooltip.
902
     */
903
    public function getTooltip() {
904
        return $this->tooltip;
905
    }
906
907
    /**
908
     * Get the type.
909
     *
910
     * @return string Returns the type.
911
     */
912
    public function getType() {
913
        return $this->type;
914
    }
915
916
    /**
917
     * Get the visible.
918
     *
919
     * @return boolean Returns the visible.
920
     */
921
    public function getVisible() {
922
        return $this->visible;
923
    }
924
925
    /**
926
     * Get the z index.
927
     *
928
     * @return integer Returns the z index.
929
     */
930
    public function getZIndex() {
931
        return $this->zIndex;
932
    }
933
934
    /**
935
     * Get the zone axis.
936
     *
937
     * @return string Returns the zone axis.
938
     */
939
    public function getZoneAxis() {
940
        return $this->zoneAxis;
941
    }
942
943
    /**
944
     * Get the zones.
945
     *
946
     * @return array Returns the zones.
947
     */
948
    public function getZones() {
949
        return $this->zones;
950
    }
951
952
    /**
953
     * Serialize this instance.
954
     *
955
     * @return array Returns an array representing this instance.
956
     */
957
    public function jsonSerialize() {
958
        return $this->toArray();
959
    }
960
961
    /**
962
     * Create a new data labels.
963
     *
964
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\Series\Pie\HighchartsDataLabels Returns the data labels.
965
     */
966
    public function newDataLabels() {
967
        $this->dataLabels = new \WBW\Bundle\HighchartsBundle\API\Chart\Series\Pie\HighchartsDataLabels();
968
        return $this->dataLabels;
969
    }
970
971
    /**
972
     * Create a new events.
973
     *
974
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\Series\Pie\HighchartsEvents Returns the events.
975
     */
976
    public function newEvents() {
977
        $this->events = new \WBW\Bundle\HighchartsBundle\API\Chart\Series\Pie\HighchartsEvents();
978
        return $this->events;
979
    }
980
981
    /**
982
     * Create a new point.
983
     *
984
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\Series\Pie\HighchartsPoint Returns the point.
985
     */
986
    public function newPoint() {
987
        $this->point = new \WBW\Bundle\HighchartsBundle\API\Chart\Series\Pie\HighchartsPoint();
988
        return $this->point;
989
    }
990
991
    /**
992
     * Create a new states.
993
     *
994
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\Series\Pie\HighchartsStates Returns the states.
995
     */
996
    public function newStates() {
997
        $this->states = new \WBW\Bundle\HighchartsBundle\API\Chart\Series\Pie\HighchartsStates();
998
        return $this->states;
999
    }
1000
1001
    /**
1002
     * Set the allow point select.
1003
     *
1004
     * @param boolean $allowPointSelect The allow point select.
1005
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\Series\HighchartsPie Returns the highcharts pie.
1006
     */
1007
    public function setAllowPointSelect($allowPointSelect) {
1008
        $this->allowPointSelect = $allowPointSelect;
1009
        return $this;
1010
    }
1011
1012
    /**
1013
     * Set the animation.
1014
     *
1015
     * @param boolean $animation The animation.
1016
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\Series\HighchartsPie Returns the highcharts pie.
1017
     */
1018
    public function setAnimation($animation) {
1019
        $this->animation = $animation;
1020
        return $this;
1021
    }
1022
1023
    /**
1024
     * Set the animation limit.
1025
     *
1026
     * @param integer $animationLimit The animation limit.
1027
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\Series\HighchartsPie Returns the highcharts pie.
1028
     */
1029
    public function setAnimationLimit($animationLimit) {
1030
        $this->animationLimit = $animationLimit;
1031
        return $this;
1032
    }
1033
1034
    /**
1035
     * Set the border color.
1036
     *
1037
     * @param string $borderColor The border color.
1038
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\Series\HighchartsPie Returns the highcharts pie.
1039
     */
1040
    public function setBorderColor($borderColor) {
1041
        $this->borderColor = $borderColor;
1042
        return $this;
1043
    }
1044
1045
    /**
1046
     * Set the border width.
1047
     *
1048
     * @param integer $borderWidth The border width.
1049
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\Series\HighchartsPie Returns the highcharts pie.
1050
     */
1051
    public function setBorderWidth($borderWidth) {
1052
        $this->borderWidth = $borderWidth;
1053
        return $this;
1054
    }
1055
1056
    /**
1057
     * Set the center.
1058
     *
1059
     * @param array $center The center.
1060
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\Series\HighchartsPie Returns the highcharts pie.
1061
     */
1062
    public function setCenter(array $center = null) {
1063
        $this->center = $center;
0 ignored issues
show
Documentation Bug introduced by
It seems like $center can be null. However, the property $center is declared as array. Maybe change the type of the property to array|null or add a type check?

Our type inference engine has found an assignment of a scalar value (like a string, an integer or null) to a property which is an array.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property.

To type hint that a parameter can be either an array or null, you can set a type hint of array and a default value of null. The PHP interpreter will then accept both an array or null for that parameter.

function aContainsB(array $needle = null, array  $haystack) {
    if (!$needle) {
        return false;
    }

    return array_intersect($haystack, $needle) == $haystack;
}

The function can be called with either null or an array for the parameter $needle but will only accept an array as $haystack.

Loading history...
1064
        return $this;
1065
    }
1066
1067
    /**
1068
     * Set the class name.
1069
     *
1070
     * @param string $className The class name.
1071
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\Series\HighchartsPie Returns the highcharts pie.
1072
     */
1073
    public function setClassName($className) {
1074
        $this->className = $className;
1075
        return $this;
1076
    }
1077
1078
    /**
1079
     * Set the color index.
1080
     *
1081
     * @param integer $colorIndex The color index.
1082
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\Series\HighchartsPie Returns the highcharts pie.
1083
     */
1084
    public function setColorIndex($colorIndex) {
1085
        $this->colorIndex = $colorIndex;
1086
        return $this;
1087
    }
1088
1089
    /**
1090
     * Set the colors.
1091
     *
1092
     * @param array $colors The colors.
1093
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\Series\HighchartsPie Returns the highcharts pie.
1094
     */
1095
    public function setColors(array $colors = null) {
1096
        $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...
1097
        return $this;
1098
    }
1099
1100
    /**
1101
     * Set the cursor.
1102
     *
1103
     * @param string $cursor The cursor.
1104
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\Series\HighchartsPie Returns the highcharts pie.
1105
     */
1106
    public function setCursor($cursor) {
1107
        switch ($cursor) {
1108
            case null:
1109
            case "crosshair":
1110
            case "default":
1111
            case "help":
1112
            case "none":
1113
            case "pointer":
1114
            $this->cursor = $cursor;
1115
            break;
1116
        }
1117
        return $this;
1118
    }
1119
1120
    /**
1121
     * Set the data.
1122
     *
1123
     * @param array $data The data.
1124
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\Series\HighchartsPie Returns the highcharts pie.
1125
     */
1126
    public function setData(array $data = null) {
1127
        $this->data = $data;
0 ignored issues
show
Documentation Bug introduced by
It seems like $data can be null. However, the property $data 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...
1128
        return $this;
1129
    }
1130
1131
    /**
1132
     * Set the data labels.
1133
     *
1134
     * @param \WBW\Bundle\HighchartsBundle\API\Chart\Series\Pie\HighchartsDataLabels $dataLabels The data labels.
1135
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\Series\HighchartsPie Returns the highcharts pie.
1136
     */
1137
    public function setDataLabels(\WBW\Bundle\HighchartsBundle\API\Chart\Series\Pie\HighchartsDataLabels $dataLabels = null) {
1138
        $this->dataLabels = $dataLabels;
1139
        return $this;
1140
    }
1141
1142
    /**
1143
     * Set the depth.
1144
     *
1145
     * @param integer $depth The depth.
1146
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\Series\HighchartsPie Returns the highcharts pie.
1147
     */
1148
    public function setDepth($depth) {
1149
        $this->depth = $depth;
1150
        return $this;
1151
    }
1152
1153
    /**
1154
     * Set the description.
1155
     *
1156
     * @param string $description The description.
1157
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\Series\HighchartsPie Returns the highcharts pie.
1158
     */
1159
    public function setDescription($description) {
1160
        $this->description = $description;
1161
        return $this;
1162
    }
1163
1164
    /**
1165
     * Set the enable mouse tracking.
1166
     *
1167
     * @param boolean $enableMouseTracking The enable mouse tracking.
1168
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\Series\HighchartsPie Returns the highcharts pie.
1169
     */
1170
    public function setEnableMouseTracking($enableMouseTracking) {
1171
        $this->enableMouseTracking = $enableMouseTracking;
1172
        return $this;
1173
    }
1174
1175
    /**
1176
     * Set the end angle.
1177
     *
1178
     * @param integer $endAngle The end angle.
1179
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\Series\HighchartsPie Returns the highcharts pie.
1180
     */
1181
    public function setEndAngle($endAngle) {
1182
        $this->endAngle = $endAngle;
1183
        return $this;
1184
    }
1185
1186
    /**
1187
     * Set the events.
1188
     *
1189
     * @param \WBW\Bundle\HighchartsBundle\API\Chart\Series\Pie\HighchartsEvents $events The events.
1190
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\Series\HighchartsPie Returns the highcharts pie.
1191
     */
1192
    public function setEvents(\WBW\Bundle\HighchartsBundle\API\Chart\Series\Pie\HighchartsEvents $events = null) {
1193
        $this->events = $events;
1194
        return $this;
1195
    }
1196
1197
    /**
1198
     * Set the expose element to a11y.
1199
     *
1200
     * @param boolean $exposeElementToA11y The expose element to a11y.
1201
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\Series\HighchartsPie Returns the highcharts pie.
1202
     */
1203
    public function setExposeElementToA11y($exposeElementToA11y) {
1204
        $this->exposeElementToA11y = $exposeElementToA11y;
1205
        return $this;
1206
    }
1207
1208
    /**
1209
     * Set the find nearest point by.
1210
     *
1211
     * @param string $findNearestPointBy The find nearest point by.
1212
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\Series\HighchartsPie Returns the highcharts pie.
1213
     */
1214
    public function setFindNearestPointBy($findNearestPointBy) {
1215
        switch ($findNearestPointBy) {
1216
            case "x":
1217
            case "xy":
1218
            $this->findNearestPointBy = $findNearestPointBy;
1219
            break;
1220
        }
1221
        return $this;
1222
    }
1223
1224
    /**
1225
     * Set the get extremes from all.
1226
     *
1227
     * @param boolean $getExtremesFromAll The get extremes from all.
1228
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\Series\HighchartsPie Returns the highcharts pie.
1229
     */
1230
    public function setGetExtremesFromAll($getExtremesFromAll) {
1231
        $this->getExtremesFromAll = $getExtremesFromAll;
1232
        return $this;
1233
    }
1234
1235
    /**
1236
     * Set the id.
1237
     *
1238
     * @param string $id The id.
1239
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\Series\HighchartsPie Returns the highcharts pie.
1240
     */
1241
    public function setId($id) {
1242
        $this->id = $id;
1243
        return $this;
1244
    }
1245
1246
    /**
1247
     * Set the ignore hidden point.
1248
     *
1249
     * @param boolean $ignoreHiddenPoint The ignore hidden point.
1250
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\Series\HighchartsPie Returns the highcharts pie.
1251
     */
1252
    public function setIgnoreHiddenPoint($ignoreHiddenPoint) {
1253
        $this->ignoreHiddenPoint = $ignoreHiddenPoint;
1254
        return $this;
1255
    }
1256
1257
    /**
1258
     * Set the index.
1259
     *
1260
     * @param integer $index The index.
1261
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\Series\HighchartsPie Returns the highcharts pie.
1262
     */
1263
    public function setIndex($index) {
1264
        $this->index = $index;
1265
        return $this;
1266
    }
1267
1268
    /**
1269
     * Set the inner size.
1270
     *
1271
     * @param string|integer $innerSize The inner size.
1272
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\Series\HighchartsPie Returns the highcharts pie.
1273
     */
1274
    public function setInnerSize($innerSize) {
1275
        $this->innerSize = $innerSize;
1276
        return $this;
1277
    }
1278
1279
    /**
1280
     * Set the keys.
1281
     *
1282
     * @param array $keys The keys.
1283
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\Series\HighchartsPie Returns the highcharts pie.
1284
     */
1285
    public function setKeys(array $keys = null) {
1286
        $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...
1287
        return $this;
1288
    }
1289
1290
    /**
1291
     * Set the legend index.
1292
     *
1293
     * @param integer $legendIndex The legend index.
1294
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\Series\HighchartsPie Returns the highcharts pie.
1295
     */
1296
    public function setLegendIndex($legendIndex) {
1297
        $this->legendIndex = $legendIndex;
1298
        return $this;
1299
    }
1300
1301
    /**
1302
     * Set the linked to.
1303
     *
1304
     * @param string $linkedTo The linked to.
1305
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\Series\HighchartsPie Returns the highcharts pie.
1306
     */
1307
    public function setLinkedTo($linkedTo) {
1308
        $this->linkedTo = $linkedTo;
1309
        return $this;
1310
    }
1311
1312
    /**
1313
     * Set the min size.
1314
     *
1315
     * @param integer $minSize The min size.
1316
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\Series\HighchartsPie Returns the highcharts pie.
1317
     */
1318
    public function setMinSize($minSize) {
1319
        $this->minSize = $minSize;
1320
        return $this;
1321
    }
1322
1323
    /**
1324
     * Set the name.
1325
     *
1326
     * @param string $name The name.
1327
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\Series\HighchartsPie Returns the highcharts pie.
1328
     */
1329
    public function setName($name) {
1330
        $this->name = $name;
1331
        return $this;
1332
    }
1333
1334
    /**
1335
     * Set the point.
1336
     *
1337
     * @param \WBW\Bundle\HighchartsBundle\API\Chart\Series\Pie\HighchartsPoint $point The point.
1338
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\Series\HighchartsPie Returns the highcharts pie.
1339
     */
1340
    public function setPoint(\WBW\Bundle\HighchartsBundle\API\Chart\Series\Pie\HighchartsPoint $point = null) {
1341
        $this->point = $point;
1342
        return $this;
1343
    }
1344
1345
    /**
1346
     * Set the point description formatter.
1347
     *
1348
     * @param string $pointDescriptionFormatter The point description formatter.
1349
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\Series\HighchartsPie Returns the highcharts pie.
1350
     */
1351
    public function setPointDescriptionFormatter($pointDescriptionFormatter) {
1352
        $this->pointDescriptionFormatter = $pointDescriptionFormatter;
1353
        return $this;
1354
    }
1355
1356
    /**
1357
     * Set the selected.
1358
     *
1359
     * @param boolean $selected The selected.
1360
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\Series\HighchartsPie Returns the highcharts pie.
1361
     */
1362
    public function setSelected($selected) {
1363
        $this->selected = $selected;
1364
        return $this;
1365
    }
1366
1367
    /**
1368
     * Set the shadow.
1369
     *
1370
     * @param boolean|array $shadow The shadow.
1371
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\Series\HighchartsPie Returns the highcharts pie.
1372
     */
1373
    public function setShadow($shadow) {
1374
        $this->shadow = $shadow;
1375
        return $this;
1376
    }
1377
1378
    /**
1379
     * Set the show in legend.
1380
     *
1381
     * @param boolean $showInLegend The show in legend.
1382
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\Series\HighchartsPie Returns the highcharts pie.
1383
     */
1384
    public function setShowInLegend($showInLegend) {
1385
        $this->showInLegend = $showInLegend;
1386
        return $this;
1387
    }
1388
1389
    /**
1390
     * Set the size.
1391
     *
1392
     * @param string|integer $size The size.
1393
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\Series\HighchartsPie Returns the highcharts pie.
1394
     */
1395
    public function setSize($size) {
1396
        $this->size = $size;
1397
        return $this;
1398
    }
1399
1400
    /**
1401
     * Set the skip keyboard navigation.
1402
     *
1403
     * @param boolean $skipKeyboardNavigation The skip keyboard navigation.
1404
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\Series\HighchartsPie Returns the highcharts pie.
1405
     */
1406
    public function setSkipKeyboardNavigation($skipKeyboardNavigation) {
1407
        $this->skipKeyboardNavigation = $skipKeyboardNavigation;
1408
        return $this;
1409
    }
1410
1411
    /**
1412
     * Set the sliced offset.
1413
     *
1414
     * @param integer $slicedOffset The sliced offset.
1415
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\Series\HighchartsPie Returns the highcharts pie.
1416
     */
1417
    public function setSlicedOffset($slicedOffset) {
1418
        $this->slicedOffset = $slicedOffset;
1419
        return $this;
1420
    }
1421
1422
    /**
1423
     * Set the start angle.
1424
     *
1425
     * @param integer $startAngle The start angle.
1426
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\Series\HighchartsPie Returns the highcharts pie.
1427
     */
1428
    public function setStartAngle($startAngle) {
1429
        $this->startAngle = $startAngle;
1430
        return $this;
1431
    }
1432
1433
    /**
1434
     * Set the states.
1435
     *
1436
     * @param \WBW\Bundle\HighchartsBundle\API\Chart\Series\Pie\HighchartsStates $states The states.
1437
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\Series\HighchartsPie Returns the highcharts pie.
1438
     */
1439
    public function setStates(\WBW\Bundle\HighchartsBundle\API\Chart\Series\Pie\HighchartsStates $states = null) {
1440
        $this->states = $states;
1441
        return $this;
1442
    }
1443
1444
    /**
1445
     * Set the sticky tracking.
1446
     *
1447
     * @param boolean $stickyTracking The sticky tracking.
1448
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\Series\HighchartsPie Returns the highcharts pie.
1449
     */
1450
    public function setStickyTracking($stickyTracking) {
1451
        $this->stickyTracking = $stickyTracking;
1452
        return $this;
1453
    }
1454
1455
    /**
1456
     * Set the tooltip.
1457
     *
1458
     * @param array $tooltip The tooltip.
1459
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\Series\HighchartsPie Returns the highcharts pie.
1460
     */
1461
    public function setTooltip(array $tooltip = null) {
1462
        $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...
1463
        return $this;
1464
    }
1465
1466
    /**
1467
     * Set the type.
1468
     *
1469
     * @param string $type The type.
1470
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\Series\HighchartsPie Returns the highcharts pie.
1471
     */
1472
    public function setType($type) {
1473
        switch ($type) {
1474
            case null:
1475
            case "area":
1476
            case "arearange":
1477
            case "areaspline":
1478
            case "areasplinerange":
1479
            case "boxplot":
1480
            case "bubble":
1481
            case "column":
1482
            case "columnrange":
1483
            case "errorbar":
1484
            case "funnel":
1485
            case "gauge":
1486
            case "line":
1487
            case "pie":
1488
            case "scatter":
1489
            case "spline":
1490
            case "waterfall":
1491
            $this->type = $type;
1492
            break;
1493
        }
1494
        return $this;
1495
    }
1496
1497
    /**
1498
     * Set the visible.
1499
     *
1500
     * @param boolean $visible The visible.
1501
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\Series\HighchartsPie Returns the highcharts pie.
1502
     */
1503
    public function setVisible($visible) {
1504
        $this->visible = $visible;
1505
        return $this;
1506
    }
1507
1508
    /**
1509
     * Set the z index.
1510
     *
1511
     * @param integer $zIndex The z index.
1512
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\Series\HighchartsPie Returns the highcharts pie.
1513
     */
1514
    public function setZIndex($zIndex) {
1515
        $this->zIndex = $zIndex;
1516
        return $this;
1517
    }
1518
1519
    /**
1520
     * Set the zone axis.
1521
     *
1522
     * @param string $zoneAxis The zone axis.
1523
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\Series\HighchartsPie Returns the highcharts pie.
1524
     */
1525
    public function setZoneAxis($zoneAxis) {
1526
        $this->zoneAxis = $zoneAxis;
1527
        return $this;
1528
    }
1529
1530
    /**
1531
     * Set the zones.
1532
     *
1533
     * @param array $zones The zones.
1534
     * @return \WBW\Bundle\HighchartsBundle\API\Chart\Series\HighchartsPie Returns the highcharts pie.
1535
     */
1536
    public function setZones(array $zones = null) {
1537
        $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...
1538
        return $this;
1539
    }
1540
1541
    /**
1542
     * Convert into an array representing this instance.
1543
     *
1544
     * @return array Returns an array representing this instance.
1545
     */
1546
    public function toArray() {
1547
1548
        // Initialize the output.
1549
        $output = [];
1550
1551
        // Set the allow point select.
1552
        ArrayUtility::set($output, "allowPointSelect", $this->allowPointSelect, [null]);
1553
1554
        // Set the animation.
1555
        ArrayUtility::set($output, "animation", $this->animation, [null]);
1556
1557
        // Set the animation limit.
1558
        ArrayUtility::set($output, "animationLimit", $this->animationLimit, [null]);
1559
1560
        // Set the border color.
1561
        ArrayUtility::set($output, "borderColor", $this->borderColor, [null]);
1562
1563
        // Set the border width.
1564
        ArrayUtility::set($output, "borderWidth", $this->borderWidth, [null]);
1565
1566
        // Set the center.
1567
        ArrayUtility::set($output, "center", $this->center, [null]);
1568
1569
        // Set the class name.
1570
        ArrayUtility::set($output, "className", $this->className, [null]);
1571
1572
        // Set the color index.
1573
        ArrayUtility::set($output, "colorIndex", $this->colorIndex, [null]);
1574
1575
        // Set the colors.
1576
        ArrayUtility::set($output, "colors", $this->colors, [null]);
1577
1578
        // Set the cursor.
1579
        ArrayUtility::set($output, "cursor", $this->cursor, [null]);
1580
1581
        // Set the data.
1582
        ArrayUtility::set($output, "data", $this->data, [null]);
1583
1584
        // Set the data labels.
1585
        if (null !== $this->dataLabels) {
1586
            ArrayUtility::set($output, "dataLabels", $this->dataLabels->toArray(), []);
1587
        }
1588
1589
        // Set the depth.
1590
        ArrayUtility::set($output, "depth", $this->depth, [null]);
1591
1592
        // Set the description.
1593
        ArrayUtility::set($output, "description", $this->description, [null]);
1594
1595
        // Set the enable mouse tracking.
1596
        ArrayUtility::set($output, "enableMouseTracking", $this->enableMouseTracking, [null]);
1597
1598
        // Set the end angle.
1599
        ArrayUtility::set($output, "endAngle", $this->endAngle, [null]);
1600
1601
        // Set the events.
1602
        if (null !== $this->events) {
1603
            ArrayUtility::set($output, "events", $this->events->toArray(), []);
1604
        }
1605
1606
        // Set the expose element to a11y.
1607
        ArrayUtility::set($output, "exposeElementToA11y", $this->exposeElementToA11y, [null]);
1608
1609
        // Set the find nearest point by.
1610
        ArrayUtility::set($output, "findNearestPointBy", $this->findNearestPointBy, [null]);
1611
1612
        // Set the get extremes from all.
1613
        ArrayUtility::set($output, "getExtremesFromAll", $this->getExtremesFromAll, [null]);
1614
1615
        // Set the id.
1616
        ArrayUtility::set($output, "id", $this->id, [null]);
1617
1618
        // Set the ignore hidden point.
1619
        ArrayUtility::set($output, "ignoreHiddenPoint", $this->ignoreHiddenPoint, [null]);
1620
1621
        // Set the index.
1622
        ArrayUtility::set($output, "index", $this->index, [null]);
1623
1624
        // Set the inner size.
1625
        ArrayUtility::set($output, "innerSize", $this->innerSize, [null]);
1626
1627
        // Set the keys.
1628
        ArrayUtility::set($output, "keys", $this->keys, [null]);
1629
1630
        // Set the legend index.
1631
        ArrayUtility::set($output, "legendIndex", $this->legendIndex, [null]);
1632
1633
        // Set the linked to.
1634
        ArrayUtility::set($output, "linkedTo", $this->linkedTo, [null]);
1635
1636
        // Set the min size.
1637
        ArrayUtility::set($output, "minSize", $this->minSize, [null]);
1638
1639
        // Set the name.
1640
        ArrayUtility::set($output, "name", $this->name, [null]);
1641
1642
        // Set the point.
1643
        if (null !== $this->point) {
1644
            ArrayUtility::set($output, "point", $this->point->toArray(), []);
1645
        }
1646
1647
        // Set the point description formatter.
1648
        ArrayUtility::set($output, "pointDescriptionFormatter", $this->pointDescriptionFormatter, [null]);
1649
1650
        // Set the selected.
1651
        ArrayUtility::set($output, "selected", $this->selected, [null]);
1652
1653
        // Set the shadow.
1654
        ArrayUtility::set($output, "shadow", $this->shadow, [null]);
1655
1656
        // Set the show in legend.
1657
        ArrayUtility::set($output, "showInLegend", $this->showInLegend, [null]);
1658
1659
        // Set the size.
1660
        ArrayUtility::set($output, "size", $this->size, [null]);
1661
1662
        // Set the skip keyboard navigation.
1663
        ArrayUtility::set($output, "skipKeyboardNavigation", $this->skipKeyboardNavigation, [null]);
1664
1665
        // Set the sliced offset.
1666
        ArrayUtility::set($output, "slicedOffset", $this->slicedOffset, [null]);
1667
1668
        // Set the start angle.
1669
        ArrayUtility::set($output, "startAngle", $this->startAngle, [null]);
1670
1671
        // Set the states.
1672
        if (null !== $this->states) {
1673
            ArrayUtility::set($output, "states", $this->states->toArray(), []);
1674
        }
1675
1676
        // Set the sticky tracking.
1677
        ArrayUtility::set($output, "stickyTracking", $this->stickyTracking, [null]);
1678
1679
        // Set the tooltip.
1680
        ArrayUtility::set($output, "tooltip", $this->tooltip, [null]);
1681
1682
        // Set the type.
1683
        ArrayUtility::set($output, "type", $this->type, [null]);
1684
1685
        // Set the visible.
1686
        ArrayUtility::set($output, "visible", $this->visible, [null]);
1687
1688
        // Set the z index.
1689
        ArrayUtility::set($output, "zIndex", $this->zIndex, [null]);
1690
1691
        // Set the zone axis.
1692
        ArrayUtility::set($output, "zoneAxis", $this->zoneAxis, [null]);
1693
1694
        // Set the zones.
1695
        ArrayUtility::set($output, "zones", $this->zones, [null]);
1696
1697
        // Return the output.
1698
        return $output;
1699
    }
1700
1701
}
1702