Duplicate code is one of the most pungent code smells. A rule that is often used is to re-structure code once it is duplicated in three or more places.
Common duplication problems, and corresponding solutions are:
Complex classes like TLabeledElementExpressionType often do a lot of different things. To break such a class down, we need to identify a cohesive component within that class. A common approach to find such a component is to look for fields/methods that share the same prefixes, or suffixes. You can also have a look at the cohesion graph to spot any un-connected, or weakly-connected components.
Once you have determined the fields that belong together, you can apply the Extract Class refactoring. If the component makes sense as a sub-class, Extract Subclass is also a candidate, and is often faster.
While breaking up the class, it is a good idea to analyze how other classes use TLabeledElementExpressionType, and based on these observations, apply Extract Interface, too.
1 | <?php |
||
11 | View Code Duplication | class TLabeledElementExpressionType |
|
|
|||
12 | { |
||
13 | |||
14 | /** |
||
15 | * @property string $name |
||
16 | */ |
||
17 | private $name = null; |
||
18 | |||
19 | /** |
||
20 | * @property string $binary |
||
21 | */ |
||
22 | private $binary = null; |
||
23 | |||
24 | /** |
||
25 | * @property boolean $bool |
||
26 | */ |
||
27 | private $bool = null; |
||
28 | |||
29 | /** |
||
30 | * @property \DateTime $date |
||
31 | */ |
||
32 | private $date = null; |
||
33 | |||
34 | /** |
||
35 | * @property \DateTime $dateTimeOffset |
||
36 | */ |
||
37 | private $dateTimeOffset = null; |
||
38 | |||
39 | /** |
||
40 | * @property float $decimal |
||
41 | */ |
||
42 | private $decimal = null; |
||
43 | |||
44 | /** |
||
45 | * @property \DateInterval $duration |
||
46 | */ |
||
47 | private $duration = null; |
||
48 | |||
49 | /** |
||
50 | * @property string[] $enumMember |
||
51 | */ |
||
52 | private $enumMember = null; |
||
53 | |||
54 | /** |
||
55 | * @property float $float |
||
56 | */ |
||
57 | private $float = null; |
||
58 | |||
59 | /** |
||
60 | * @property string $guid |
||
61 | */ |
||
62 | private $guid = null; |
||
63 | |||
64 | /** |
||
65 | * @property integer $int |
||
66 | */ |
||
67 | private $int = null; |
||
68 | |||
69 | /** |
||
70 | * @property string $string |
||
71 | */ |
||
72 | private $string = null; |
||
73 | |||
74 | /** |
||
75 | * @property \DateTime $timeOfDay |
||
76 | */ |
||
77 | private $timeOfDay = null; |
||
78 | |||
79 | /** |
||
80 | * @property string $annotationPath |
||
81 | */ |
||
82 | private $annotationPath = null; |
||
83 | |||
84 | /** |
||
85 | * @property string $navigationPropertyPath |
||
86 | */ |
||
87 | private $navigationPropertyPath = null; |
||
88 | |||
89 | /** |
||
90 | * @property string $path |
||
91 | */ |
||
92 | private $path = null; |
||
93 | |||
94 | /** |
||
95 | * @property string $propertyPath |
||
96 | */ |
||
97 | private $propertyPath = null; |
||
98 | |||
99 | /** |
||
100 | * @property \MetadataV4\edm\TOneChildExpressionType $urlRef |
||
101 | */ |
||
102 | private $urlRef = null; |
||
103 | |||
104 | /** |
||
105 | * @property \MetadataV4\edm\Annotation[] $annotation |
||
106 | */ |
||
107 | private $annotation = array( |
||
108 | |||
109 | ); |
||
110 | |||
111 | /** |
||
112 | * @property \MetadataV4\edm\TApplyExpressionType $apply |
||
113 | */ |
||
114 | private $apply = null; |
||
115 | |||
116 | /** |
||
117 | * @property \MetadataV4\edm\TCastOrIsOfExpressionType $cast |
||
118 | */ |
||
119 | private $cast = null; |
||
120 | |||
121 | /** |
||
122 | * @property \MetadataV4\edm\TCollectionExpressionType $collection |
||
123 | */ |
||
124 | private $collection = null; |
||
125 | |||
126 | /** |
||
127 | * @property \MetadataV4\edm\TIfExpressionType $if |
||
128 | */ |
||
129 | private $if = null; |
||
130 | |||
131 | /** |
||
132 | * @property \MetadataV4\edm\TTwoChildrenExpressionType $eq |
||
133 | */ |
||
134 | private $eq = null; |
||
135 | |||
136 | /** |
||
137 | * @property \MetadataV4\edm\TTwoChildrenExpressionType $ne |
||
138 | */ |
||
139 | private $ne = null; |
||
140 | |||
141 | /** |
||
142 | * @property \MetadataV4\edm\TTwoChildrenExpressionType $ge |
||
143 | */ |
||
144 | private $ge = null; |
||
145 | |||
146 | /** |
||
147 | * @property \MetadataV4\edm\TTwoChildrenExpressionType $gt |
||
148 | */ |
||
149 | private $gt = null; |
||
150 | |||
151 | /** |
||
152 | * @property \MetadataV4\edm\TTwoChildrenExpressionType $le |
||
153 | */ |
||
154 | private $le = null; |
||
155 | |||
156 | /** |
||
157 | * @property \MetadataV4\edm\TTwoChildrenExpressionType $lt |
||
158 | */ |
||
159 | private $lt = null; |
||
160 | |||
161 | /** |
||
162 | * @property \MetadataV4\edm\TTwoChildrenExpressionType $and |
||
163 | */ |
||
164 | private $and = null; |
||
165 | |||
166 | /** |
||
167 | * @property \MetadataV4\edm\TTwoChildrenExpressionType $or |
||
168 | */ |
||
169 | private $or = null; |
||
170 | |||
171 | /** |
||
172 | * @property \MetadataV4\edm\TOneChildExpressionType $not |
||
173 | */ |
||
174 | private $not = null; |
||
175 | |||
176 | /** |
||
177 | * @property \MetadataV4\edm\TCastOrIsOfExpressionType $isOf |
||
178 | */ |
||
179 | private $isOf = null; |
||
180 | |||
181 | /** |
||
182 | * @property \MetadataV4\edm\TLabeledElementExpressionType $labeledElement |
||
183 | */ |
||
184 | private $labeledElement = null; |
||
185 | |||
186 | /** |
||
187 | * @property string $labeledElementReference |
||
188 | */ |
||
189 | private $labeledElementReference = null; |
||
190 | |||
191 | /** |
||
192 | * @property \MetadataV4\edm\Annotation[] $null |
||
193 | */ |
||
194 | private $null = null; |
||
195 | |||
196 | /** |
||
197 | * @property \MetadataV4\edm\TRecordExpressionType $record |
||
198 | */ |
||
199 | private $record = null; |
||
200 | |||
201 | /** |
||
202 | * Gets as name |
||
203 | * |
||
204 | * @return string |
||
205 | */ |
||
206 | public function getName() |
||
210 | |||
211 | /** |
||
212 | * Sets a new name |
||
213 | * |
||
214 | * @param string $name |
||
215 | * @return self |
||
216 | */ |
||
217 | public function setName($name) |
||
222 | |||
223 | /** |
||
224 | * Gets as binary |
||
225 | * |
||
226 | * @return string |
||
227 | */ |
||
228 | public function getBinary() |
||
232 | |||
233 | /** |
||
234 | * Sets a new binary |
||
235 | * |
||
236 | * @param string $binary |
||
237 | * @return self |
||
238 | */ |
||
239 | public function setBinary($binary) |
||
244 | |||
245 | /** |
||
246 | * Gets as bool |
||
247 | * |
||
248 | * @return boolean |
||
249 | */ |
||
250 | public function getBool() |
||
254 | |||
255 | /** |
||
256 | * Sets a new bool |
||
257 | * |
||
258 | * @param boolean $bool |
||
259 | * @return self |
||
260 | */ |
||
261 | public function setBool($bool) |
||
266 | |||
267 | /** |
||
268 | * Gets as date |
||
269 | * |
||
270 | * @return \DateTime |
||
271 | */ |
||
272 | public function getDate() |
||
276 | |||
277 | /** |
||
278 | * Sets a new date |
||
279 | * |
||
280 | * @param \DateTime $date |
||
281 | * @return self |
||
282 | */ |
||
283 | public function setDate(\DateTime $date) |
||
288 | |||
289 | /** |
||
290 | * Gets as dateTimeOffset |
||
291 | * |
||
292 | * @return \DateTime |
||
293 | */ |
||
294 | public function getDateTimeOffset() |
||
298 | |||
299 | /** |
||
300 | * Sets a new dateTimeOffset |
||
301 | * |
||
302 | * @param \DateTime $dateTimeOffset |
||
303 | * @return self |
||
304 | */ |
||
305 | public function setDateTimeOffset(\DateTime $dateTimeOffset) |
||
310 | |||
311 | /** |
||
312 | * Gets as decimal |
||
313 | * |
||
314 | * @return float |
||
315 | */ |
||
316 | public function getDecimal() |
||
320 | |||
321 | /** |
||
322 | * Sets a new decimal |
||
323 | * |
||
324 | * @param float $decimal |
||
325 | * @return self |
||
326 | */ |
||
327 | public function setDecimal($decimal) |
||
332 | |||
333 | /** |
||
334 | * Gets as duration |
||
335 | * |
||
336 | * @return \DateInterval |
||
337 | */ |
||
338 | public function getDuration() |
||
342 | |||
343 | /** |
||
344 | * Sets a new duration |
||
345 | * |
||
346 | * @param \DateInterval $duration |
||
347 | * @return self |
||
348 | */ |
||
349 | public function setDuration(\DateInterval $duration) |
||
354 | |||
355 | /** |
||
356 | * Adds as enumMember |
||
357 | * |
||
358 | * @return self |
||
359 | * @param string $enumMember |
||
360 | */ |
||
361 | public function addToEnumMember($enumMember) |
||
366 | |||
367 | /** |
||
368 | * isset enumMember |
||
369 | * |
||
370 | * @param scalar $index |
||
371 | * @return boolean |
||
372 | */ |
||
373 | public function issetEnumMember($index) |
||
377 | |||
378 | /** |
||
379 | * unset enumMember |
||
380 | * |
||
381 | * @param scalar $index |
||
382 | * @return void |
||
383 | */ |
||
384 | public function unsetEnumMember($index) |
||
388 | |||
389 | /** |
||
390 | * Gets as enumMember |
||
391 | * |
||
392 | * @return string[] |
||
393 | */ |
||
394 | public function getEnumMember() |
||
398 | |||
399 | /** |
||
400 | * Sets a new enumMember |
||
401 | * |
||
402 | * @param string $enumMember |
||
403 | * @return self |
||
404 | */ |
||
405 | public function setEnumMember(array $enumMember) |
||
410 | |||
411 | /** |
||
412 | * Gets as float |
||
413 | * |
||
414 | * @return float |
||
415 | */ |
||
416 | public function getFloat() |
||
420 | |||
421 | /** |
||
422 | * Sets a new float |
||
423 | * |
||
424 | * @param float $float |
||
425 | * @return self |
||
426 | */ |
||
427 | public function setFloat($float) |
||
432 | |||
433 | /** |
||
434 | * Gets as guid |
||
435 | * |
||
436 | * @return string |
||
437 | */ |
||
438 | public function getGuid() |
||
442 | |||
443 | /** |
||
444 | * Sets a new guid |
||
445 | * |
||
446 | * @param string $guid |
||
447 | * @return self |
||
448 | */ |
||
449 | public function setGuid($guid) |
||
454 | |||
455 | /** |
||
456 | * Gets as int |
||
457 | * |
||
458 | * @return integer |
||
459 | */ |
||
460 | public function getInt() |
||
464 | |||
465 | /** |
||
466 | * Sets a new int |
||
467 | * |
||
468 | * @param integer $int |
||
469 | * @return self |
||
470 | */ |
||
471 | public function setInt($int) |
||
476 | |||
477 | /** |
||
478 | * Gets as string |
||
479 | * |
||
480 | * @return string |
||
481 | */ |
||
482 | public function getString() |
||
486 | |||
487 | /** |
||
488 | * Sets a new string |
||
489 | * |
||
490 | * @param string $string |
||
491 | * @return self |
||
492 | */ |
||
493 | public function setString($string) |
||
498 | |||
499 | /** |
||
500 | * Gets as timeOfDay |
||
501 | * |
||
502 | * @return \DateTime |
||
503 | */ |
||
504 | public function getTimeOfDay() |
||
508 | |||
509 | /** |
||
510 | * Sets a new timeOfDay |
||
511 | * |
||
512 | * @param \DateTime $timeOfDay |
||
513 | * @return self |
||
514 | */ |
||
515 | public function setTimeOfDay(\DateTime $timeOfDay) |
||
520 | |||
521 | /** |
||
522 | * Gets as annotationPath |
||
523 | * |
||
524 | * @return string |
||
525 | */ |
||
526 | public function getAnnotationPath() |
||
530 | |||
531 | /** |
||
532 | * Sets a new annotationPath |
||
533 | * |
||
534 | * @param string $annotationPath |
||
535 | * @return self |
||
536 | */ |
||
537 | public function setAnnotationPath($annotationPath) |
||
542 | |||
543 | /** |
||
544 | * Gets as navigationPropertyPath |
||
545 | * |
||
546 | * @return string |
||
547 | */ |
||
548 | public function getNavigationPropertyPath() |
||
552 | |||
553 | /** |
||
554 | * Sets a new navigationPropertyPath |
||
555 | * |
||
556 | * @param string $navigationPropertyPath |
||
557 | * @return self |
||
558 | */ |
||
559 | public function setNavigationPropertyPath($navigationPropertyPath) |
||
564 | |||
565 | /** |
||
566 | * Gets as path |
||
567 | * |
||
568 | * @return string |
||
569 | */ |
||
570 | public function getPath() |
||
574 | |||
575 | /** |
||
576 | * Sets a new path |
||
577 | * |
||
578 | * @param string $path |
||
579 | * @return self |
||
580 | */ |
||
581 | public function setPath($path) |
||
586 | |||
587 | /** |
||
588 | * Gets as propertyPath |
||
589 | * |
||
590 | * @return string |
||
591 | */ |
||
592 | public function getPropertyPath() |
||
596 | |||
597 | /** |
||
598 | * Sets a new propertyPath |
||
599 | * |
||
600 | * @param string $propertyPath |
||
601 | * @return self |
||
602 | */ |
||
603 | public function setPropertyPath($propertyPath) |
||
608 | |||
609 | /** |
||
610 | * Gets as urlRef |
||
611 | * |
||
612 | * @return \MetadataV4\edm\TOneChildExpressionType |
||
613 | */ |
||
614 | public function getUrlRef() |
||
618 | |||
619 | /** |
||
620 | * Sets a new urlRef |
||
621 | * |
||
622 | * @param \MetadataV4\edm\TOneChildExpressionType $urlRef |
||
623 | * @return self |
||
624 | */ |
||
625 | public function setUrlRef(\MetadataV4\edm\TOneChildExpressionType $urlRef) |
||
630 | |||
631 | /** |
||
632 | * Adds as annotation |
||
633 | * |
||
634 | * @return self |
||
635 | * @param \MetadataV4\edm\Annotation $annotation |
||
636 | */ |
||
637 | public function addToAnnotation(\MetadataV4\edm\Annotation $annotation) |
||
642 | |||
643 | /** |
||
644 | * isset annotation |
||
645 | * |
||
646 | * @param scalar $index |
||
647 | * @return boolean |
||
648 | */ |
||
649 | public function issetAnnotation($index) |
||
653 | |||
654 | /** |
||
655 | * unset annotation |
||
656 | * |
||
657 | * @param scalar $index |
||
658 | * @return void |
||
659 | */ |
||
660 | public function unsetAnnotation($index) |
||
664 | |||
665 | /** |
||
666 | * Gets as annotation |
||
667 | * |
||
668 | * @return \MetadataV4\edm\Annotation[] |
||
669 | */ |
||
670 | public function getAnnotation() |
||
674 | |||
675 | /** |
||
676 | * Sets a new annotation |
||
677 | * |
||
678 | * @param \MetadataV4\edm\Annotation[] $annotation |
||
679 | * @return self |
||
680 | */ |
||
681 | public function setAnnotation(array $annotation) |
||
686 | |||
687 | /** |
||
688 | * Gets as apply |
||
689 | * |
||
690 | * @return \MetadataV4\edm\TApplyExpressionType |
||
691 | */ |
||
692 | public function getApply() |
||
696 | |||
697 | /** |
||
698 | * Sets a new apply |
||
699 | * |
||
700 | * @param \MetadataV4\edm\TApplyExpressionType $apply |
||
701 | * @return self |
||
702 | */ |
||
703 | public function setApply(\MetadataV4\edm\TApplyExpressionType $apply) |
||
708 | |||
709 | /** |
||
710 | * Gets as cast |
||
711 | * |
||
712 | * @return \MetadataV4\edm\TCastOrIsOfExpressionType |
||
713 | */ |
||
714 | public function getCast() |
||
718 | |||
719 | /** |
||
720 | * Sets a new cast |
||
721 | * |
||
722 | * @param \MetadataV4\edm\TCastOrIsOfExpressionType $cast |
||
723 | * @return self |
||
724 | */ |
||
725 | public function setCast(\MetadataV4\edm\TCastOrIsOfExpressionType $cast) |
||
730 | |||
731 | /** |
||
732 | * Gets as collection |
||
733 | * |
||
734 | * @return \MetadataV4\edm\TCollectionExpressionType |
||
735 | */ |
||
736 | public function getCollection() |
||
740 | |||
741 | /** |
||
742 | * Sets a new collection |
||
743 | * |
||
744 | * @param \MetadataV4\edm\TCollectionExpressionType $collection |
||
745 | * @return self |
||
746 | */ |
||
747 | public function setCollection(\MetadataV4\edm\TCollectionExpressionType $collection) |
||
752 | |||
753 | /** |
||
754 | * Gets as if |
||
755 | * |
||
756 | * @return \MetadataV4\edm\TIfExpressionType |
||
757 | */ |
||
758 | public function getIf() |
||
762 | |||
763 | /** |
||
764 | * Sets a new if |
||
765 | * |
||
766 | * @param \MetadataV4\edm\TIfExpressionType $if |
||
767 | * @return self |
||
768 | */ |
||
769 | public function setIf(\MetadataV4\edm\TIfExpressionType $if) |
||
774 | |||
775 | /** |
||
776 | * Gets as eq |
||
777 | * |
||
778 | * @return \MetadataV4\edm\TTwoChildrenExpressionType |
||
779 | */ |
||
780 | public function getEq() |
||
784 | |||
785 | /** |
||
786 | * Sets a new eq |
||
787 | * |
||
788 | * @param \MetadataV4\edm\TTwoChildrenExpressionType $eq |
||
789 | * @return self |
||
790 | */ |
||
791 | public function setEq(\MetadataV4\edm\TTwoChildrenExpressionType $eq) |
||
796 | |||
797 | /** |
||
798 | * Gets as ne |
||
799 | * |
||
800 | * @return \MetadataV4\edm\TTwoChildrenExpressionType |
||
801 | */ |
||
802 | public function getNe() |
||
806 | |||
807 | /** |
||
808 | * Sets a new ne |
||
809 | * |
||
810 | * @param \MetadataV4\edm\TTwoChildrenExpressionType $ne |
||
811 | * @return self |
||
812 | */ |
||
813 | public function setNe(\MetadataV4\edm\TTwoChildrenExpressionType $ne) |
||
818 | |||
819 | /** |
||
820 | * Gets as ge |
||
821 | * |
||
822 | * @return \MetadataV4\edm\TTwoChildrenExpressionType |
||
823 | */ |
||
824 | public function getGe() |
||
828 | |||
829 | /** |
||
830 | * Sets a new ge |
||
831 | * |
||
832 | * @param \MetadataV4\edm\TTwoChildrenExpressionType $ge |
||
833 | * @return self |
||
834 | */ |
||
835 | public function setGe(\MetadataV4\edm\TTwoChildrenExpressionType $ge) |
||
840 | |||
841 | /** |
||
842 | * Gets as gt |
||
843 | * |
||
844 | * @return \MetadataV4\edm\TTwoChildrenExpressionType |
||
845 | */ |
||
846 | public function getGt() |
||
850 | |||
851 | /** |
||
852 | * Sets a new gt |
||
853 | * |
||
854 | * @param \MetadataV4\edm\TTwoChildrenExpressionType $gt |
||
855 | * @return self |
||
856 | */ |
||
857 | public function setGt(\MetadataV4\edm\TTwoChildrenExpressionType $gt) |
||
862 | |||
863 | /** |
||
864 | * Gets as le |
||
865 | * |
||
866 | * @return \MetadataV4\edm\TTwoChildrenExpressionType |
||
867 | */ |
||
868 | public function getLe() |
||
872 | |||
873 | /** |
||
874 | * Sets a new le |
||
875 | * |
||
876 | * @param \MetadataV4\edm\TTwoChildrenExpressionType $le |
||
877 | * @return self |
||
878 | */ |
||
879 | public function setLe(\MetadataV4\edm\TTwoChildrenExpressionType $le) |
||
884 | |||
885 | /** |
||
886 | * Gets as lt |
||
887 | * |
||
888 | * @return \MetadataV4\edm\TTwoChildrenExpressionType |
||
889 | */ |
||
890 | public function getLt() |
||
894 | |||
895 | /** |
||
896 | * Sets a new lt |
||
897 | * |
||
898 | * @param \MetadataV4\edm\TTwoChildrenExpressionType $lt |
||
899 | * @return self |
||
900 | */ |
||
901 | public function setLt(\MetadataV4\edm\TTwoChildrenExpressionType $lt) |
||
906 | |||
907 | /** |
||
908 | * Gets as and |
||
909 | * |
||
910 | * @return \MetadataV4\edm\TTwoChildrenExpressionType |
||
911 | */ |
||
912 | public function getAnd() |
||
916 | |||
917 | /** |
||
918 | * Sets a new and |
||
919 | * |
||
920 | * @param \MetadataV4\edm\TTwoChildrenExpressionType $and |
||
921 | * @return self |
||
922 | */ |
||
923 | public function setAnd(\MetadataV4\edm\TTwoChildrenExpressionType $and) |
||
928 | |||
929 | /** |
||
930 | * Gets as or |
||
931 | * |
||
932 | * @return \MetadataV4\edm\TTwoChildrenExpressionType |
||
933 | */ |
||
934 | public function getOr() |
||
938 | |||
939 | /** |
||
940 | * Sets a new or |
||
941 | * |
||
942 | * @param \MetadataV4\edm\TTwoChildrenExpressionType $or |
||
943 | * @return self |
||
944 | */ |
||
945 | public function setOr(\MetadataV4\edm\TTwoChildrenExpressionType $or) |
||
950 | |||
951 | /** |
||
952 | * Gets as not |
||
953 | * |
||
954 | * @return \MetadataV4\edm\TOneChildExpressionType |
||
955 | */ |
||
956 | public function getNot() |
||
960 | |||
961 | /** |
||
962 | * Sets a new not |
||
963 | * |
||
964 | * @param \MetadataV4\edm\TOneChildExpressionType $not |
||
965 | * @return self |
||
966 | */ |
||
967 | public function setNot(\MetadataV4\edm\TOneChildExpressionType $not) |
||
972 | |||
973 | /** |
||
974 | * Gets as isOf |
||
975 | * |
||
976 | * @return \MetadataV4\edm\TCastOrIsOfExpressionType |
||
977 | */ |
||
978 | public function getIsOf() |
||
982 | |||
983 | /** |
||
984 | * Sets a new isOf |
||
985 | * |
||
986 | * @param \MetadataV4\edm\TCastOrIsOfExpressionType $isOf |
||
987 | * @return self |
||
988 | */ |
||
989 | public function setIsOf(\MetadataV4\edm\TCastOrIsOfExpressionType $isOf) |
||
994 | |||
995 | /** |
||
996 | * Gets as labeledElement |
||
997 | * |
||
998 | * @return \MetadataV4\edm\TLabeledElementExpressionType |
||
999 | */ |
||
1000 | public function getLabeledElement() |
||
1004 | |||
1005 | /** |
||
1006 | * Sets a new labeledElement |
||
1007 | * |
||
1008 | * @param \MetadataV4\edm\TLabeledElementExpressionType $labeledElement |
||
1009 | * @return self |
||
1010 | */ |
||
1011 | public function setLabeledElement(\MetadataV4\edm\TLabeledElementExpressionType $labeledElement) |
||
1016 | |||
1017 | /** |
||
1018 | * Gets as labeledElementReference |
||
1019 | * |
||
1020 | * @return string |
||
1021 | */ |
||
1022 | public function getLabeledElementReference() |
||
1026 | |||
1027 | /** |
||
1028 | * Sets a new labeledElementReference |
||
1029 | * |
||
1030 | * @param string $labeledElementReference |
||
1031 | * @return self |
||
1032 | */ |
||
1033 | public function setLabeledElementReference($labeledElementReference) |
||
1038 | |||
1039 | /** |
||
1040 | * Adds as annotation |
||
1041 | * |
||
1042 | * @return self |
||
1043 | * @param \MetadataV4\edm\Annotation $annotation |
||
1044 | */ |
||
1045 | public function addToNull(\MetadataV4\edm\Annotation $annotation) |
||
1050 | |||
1051 | /** |
||
1052 | * isset null |
||
1053 | * |
||
1054 | * @param scalar $index |
||
1055 | * @return boolean |
||
1056 | */ |
||
1057 | public function issetNull($index) |
||
1061 | |||
1062 | /** |
||
1063 | * unset null |
||
1064 | * |
||
1065 | * @param scalar $index |
||
1066 | * @return void |
||
1067 | */ |
||
1068 | public function unsetNull($index) |
||
1072 | |||
1073 | /** |
||
1074 | * Gets as null |
||
1075 | * |
||
1076 | * @return \MetadataV4\edm\Annotation[] |
||
1077 | */ |
||
1078 | public function getNull() |
||
1082 | |||
1083 | /** |
||
1084 | * Sets a new null |
||
1085 | * |
||
1086 | * @param \MetadataV4\edm\Annotation[] $null |
||
1087 | * @return self |
||
1088 | */ |
||
1089 | public function setNull(array $null) |
||
1094 | |||
1095 | /** |
||
1096 | * Gets as record |
||
1097 | * |
||
1098 | * @return \MetadataV4\edm\TRecordExpressionType |
||
1099 | */ |
||
1100 | public function getRecord() |
||
1104 | |||
1105 | /** |
||
1106 | * Sets a new record |
||
1107 | * |
||
1108 | * @param \MetadataV4\edm\TRecordExpressionType $record |
||
1109 | * @return self |
||
1110 | */ |
||
1111 | public function setRecord(\MetadataV4\edm\TRecordExpressionType $record) |
||
1116 | } |
||
1117 |
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.