Complex classes like Media 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 Media, and based on these observations, apply Extract Interface, too.
1 | <?php declare(strict_types=1); |
||
638 | class Media implements MediaInterface |
||
639 | { |
||
640 | /** |
||
641 | * @var string |
||
642 | */ |
||
643 | protected $nodeName; |
||
644 | |||
645 | /** |
||
646 | * @var string |
||
647 | */ |
||
648 | protected $type; |
||
649 | |||
650 | /** |
||
651 | * @var string |
||
652 | */ |
||
653 | protected $url; |
||
654 | |||
655 | /** |
||
656 | * @var string |
||
657 | */ |
||
658 | protected $length; |
||
659 | |||
660 | /** |
||
661 | * @var string |
||
662 | */ |
||
663 | protected $title; |
||
664 | |||
665 | /** |
||
666 | * @var string |
||
667 | */ |
||
668 | protected $description; |
||
669 | |||
670 | /** |
||
671 | * @var string |
||
672 | */ |
||
673 | protected $thumbnail; |
||
674 | |||
675 | /** |
||
676 | * @var int |
||
677 | */ |
||
678 | protected $contentFileSize; |
||
679 | |||
680 | /** |
||
681 | * @var int |
||
682 | */ |
||
683 | protected $contentBitrate; |
||
684 | |||
685 | /** |
||
686 | * @var int |
||
687 | */ |
||
688 | protected $contentFramerate; |
||
689 | |||
690 | /** |
||
691 | * @var int |
||
692 | */ |
||
693 | protected $contentSamplingrate; |
||
694 | |||
695 | /** |
||
696 | * @var int |
||
697 | */ |
||
698 | protected $contentDuration; |
||
699 | |||
700 | /** |
||
701 | * @var int |
||
702 | */ |
||
703 | protected $contentHeight; |
||
704 | |||
705 | /** |
||
706 | * @var int |
||
707 | */ |
||
708 | protected $contentWidth; |
||
709 | |||
710 | /** |
||
711 | * @var string |
||
712 | */ |
||
713 | protected $contentLang; |
||
714 | |||
715 | /** |
||
716 | * @var int |
||
717 | */ |
||
718 | protected $contentExpression; |
||
719 | |||
720 | /** |
||
721 | * @var int |
||
722 | */ |
||
723 | protected $contentMedium; |
||
724 | |||
725 | /** |
||
726 | * @var string |
||
727 | */ |
||
728 | protected $rights; |
||
729 | |||
730 | /** |
||
731 | * @var string |
||
732 | */ |
||
733 | protected $rating; |
||
734 | |||
735 | |||
736 | /** |
||
737 | * @var string |
||
738 | */ |
||
739 | protected $ratingScheme; |
||
740 | |||
741 | /** |
||
742 | * @var int |
||
743 | */ |
||
744 | protected $titleType; |
||
745 | |||
746 | /** |
||
747 | * @var int |
||
748 | */ |
||
749 | protected $descriptionType; |
||
750 | |||
751 | /** |
||
752 | * @var array |
||
753 | */ |
||
754 | protected $keywords = array(); |
||
755 | |||
756 | /** |
||
757 | * @var int |
||
758 | */ |
||
759 | protected $thumbnailWidth; |
||
760 | |||
761 | /** |
||
762 | * @var int |
||
763 | */ |
||
764 | protected $thumbnailHeight; |
||
765 | |||
766 | /** |
||
767 | * @var DateTime |
||
768 | */ |
||
769 | protected $thumbnailTime; |
||
770 | |||
771 | /** |
||
772 | * @var string |
||
773 | */ |
||
774 | protected $category; |
||
775 | |||
776 | /** |
||
777 | * @var string |
||
778 | */ |
||
779 | protected $categoryLabel; |
||
780 | |||
781 | /** |
||
782 | * @var string |
||
783 | */ |
||
784 | protected $categoryScheme; |
||
785 | |||
786 | /** |
||
787 | * @var string |
||
788 | */ |
||
789 | protected $hash; |
||
790 | |||
791 | /** |
||
792 | * @var string |
||
793 | */ |
||
794 | protected $hashAlgo; |
||
795 | |||
796 | /** |
||
797 | * @var string |
||
798 | */ |
||
799 | protected $playerUrl; |
||
800 | |||
801 | /** |
||
802 | * @var int |
||
803 | */ |
||
804 | protected $playerWidth; |
||
805 | |||
806 | /** |
||
807 | * @var int |
||
808 | */ |
||
809 | protected $playerHeight; |
||
810 | |||
811 | /** |
||
812 | * @var string |
||
813 | */ |
||
814 | protected $copyright; |
||
815 | |||
816 | /** |
||
817 | * @var string |
||
818 | */ |
||
819 | protected $copyrightUrl; |
||
820 | |||
821 | /** |
||
822 | * @var string |
||
823 | */ |
||
824 | protected $restriction; |
||
825 | |||
826 | /** |
||
827 | * @var int |
||
828 | */ |
||
829 | protected $restrictionType; |
||
830 | |||
831 | /** |
||
832 | * @var int |
||
833 | */ |
||
834 | protected $restrictionRelationship; |
||
835 | |||
836 | /** |
||
837 | * @var float |
||
838 | */ |
||
839 | protected $starRatingAverage; |
||
840 | |||
841 | /** |
||
842 | * @var int |
||
843 | */ |
||
844 | protected $starRatingCount; |
||
845 | |||
846 | /** |
||
847 | * @var int |
||
848 | */ |
||
849 | protected $starRatingMin; |
||
850 | |||
851 | /** |
||
852 | * @var int |
||
853 | */ |
||
854 | protected $starRatingMax; |
||
855 | |||
856 | /** |
||
857 | * @var int |
||
858 | */ |
||
859 | protected $nbViews; |
||
860 | |||
861 | /** |
||
862 | * @var int |
||
863 | */ |
||
864 | protected $nbFavorites; |
||
865 | |||
866 | /** |
||
867 | * @var array |
||
868 | */ |
||
869 | protected $tags = array(); |
||
870 | |||
871 | /** |
||
872 | * @var array |
||
873 | */ |
||
874 | protected $comments = array(); |
||
875 | |||
876 | /** |
||
877 | * @var string |
||
878 | */ |
||
879 | protected $embedUrl; |
||
880 | |||
881 | /** |
||
882 | * @var int |
||
883 | */ |
||
884 | protected $embedWidth; |
||
885 | |||
886 | /** |
||
887 | * @var int |
||
888 | */ |
||
889 | protected $embedHeight; |
||
890 | |||
891 | /** |
||
892 | * @var array |
||
893 | */ |
||
894 | protected $embedParams = array(); |
||
895 | |||
896 | /** |
||
897 | * @var array |
||
898 | */ |
||
899 | protected $responses = array(); |
||
900 | |||
901 | /** |
||
902 | * @var array |
||
903 | */ |
||
904 | protected $backlinks = array(); |
||
905 | |||
906 | /** |
||
907 | * @var int |
||
908 | */ |
||
909 | protected $status; |
||
910 | |||
911 | /** |
||
912 | * @var string |
||
913 | */ |
||
914 | protected $statusReason; |
||
915 | |||
916 | /** |
||
917 | * @var string |
||
918 | */ |
||
919 | protected $license; |
||
920 | |||
921 | /** |
||
922 | * @var string |
||
923 | */ |
||
924 | protected $licenseUrl; |
||
925 | |||
926 | /** |
||
927 | * @var string |
||
928 | */ |
||
929 | protected $licenseType; |
||
930 | |||
931 | /** |
||
932 | * @var string |
||
933 | */ |
||
934 | protected $peerLink; |
||
935 | |||
936 | /** |
||
937 | * @var string |
||
938 | */ |
||
939 | protected $peerLinkType; |
||
940 | |||
941 | /** |
||
942 | * @var array |
||
943 | */ |
||
944 | protected $credits = array(); |
||
945 | |||
946 | /** |
||
947 | * @var array |
||
948 | */ |
||
949 | protected $texts = array(); |
||
950 | |||
951 | /** |
||
952 | * @var array |
||
953 | */ |
||
954 | protected $prices = array(); |
||
955 | |||
956 | /** |
||
957 | * @var array |
||
958 | */ |
||
959 | protected $subTitles = array(); |
||
960 | |||
961 | /** |
||
962 | * @var array |
||
963 | */ |
||
964 | protected $scenes = array(); |
||
965 | |||
966 | /** |
||
967 | * @var bool |
||
968 | */ |
||
969 | protected $default = true; |
||
970 | |||
971 | /** |
||
972 | * @return string |
||
973 | */ |
||
974 | public function getNodeName() : string |
||
978 | |||
979 | /** |
||
980 | * @param string $nodeName |
||
981 | * @return MediaInterface |
||
982 | */ |
||
983 | 51 | public function setNodeName(string $nodeName) : MediaInterface |
|
989 | |||
990 | /** |
||
991 | * @return string |
||
992 | */ |
||
993 | 7 | public function getType() : ? string |
|
997 | |||
998 | /** |
||
999 | * @param string $type |
||
1000 | * @return MediaInterface |
||
1001 | */ |
||
1002 | 54 | public function setType(?string $type) : MediaInterface |
|
1008 | |||
1009 | /** |
||
1010 | * @return string |
||
1011 | */ |
||
1012 | 10 | public function getUrl() : ? string |
|
1016 | |||
1017 | /** |
||
1018 | * @param string $url |
||
1019 | * @return MediaInterface |
||
1020 | */ |
||
1021 | 53 | public function setUrl(?string $url) : MediaInterface |
|
1027 | |||
1028 | /** |
||
1029 | * @return string |
||
1030 | */ |
||
1031 | 3 | public function getLength() : ? string |
|
1035 | |||
1036 | /** |
||
1037 | * @param string $length |
||
1038 | * @return MediaInterface |
||
1039 | */ |
||
1040 | 6 | public function setLength(?string $length) : MediaInterface |
|
1046 | |||
1047 | /** |
||
1048 | * @return string |
||
1049 | */ |
||
1050 | 4 | public function getTitle() : ? string |
|
1054 | |||
1055 | /** |
||
1056 | * @param string $title |
||
1057 | * @return MediaInterface |
||
1058 | */ |
||
1059 | 4 | public function setTitle(?string $title) : MediaInterface |
|
1065 | |||
1066 | /** |
||
1067 | * @return string |
||
1068 | */ |
||
1069 | 5 | public function getDescription() : ? string |
|
1073 | |||
1074 | /** |
||
1075 | * @param string $description |
||
1076 | * @return MediaInterface |
||
1077 | */ |
||
1078 | 5 | public function setDescription(?string $description) : MediaInterface |
|
1084 | |||
1085 | /** |
||
1086 | * @return string |
||
1087 | */ |
||
1088 | 3 | public function getThumbnail() : ? string |
|
1092 | |||
1093 | /** |
||
1094 | * @param string $thumbnail |
||
1095 | * @return MediaInterface |
||
1096 | */ |
||
1097 | 3 | public function setThumbnail(?string $thumbnail) : MediaInterface |
|
1103 | |||
1104 | /** |
||
1105 | * @return int |
||
1106 | */ |
||
1107 | 2 | public function getContentFileSize() : ?int |
|
1111 | |||
1112 | /** |
||
1113 | * @param int $contentFileSize |
||
1114 | * @return MediaInterface |
||
1115 | */ |
||
1116 | 47 | public function setContentFileSize(?int $contentFileSize) : MediaInterface |
|
1122 | |||
1123 | /** |
||
1124 | * @return int |
||
1125 | */ |
||
1126 | 2 | public function getContentBitrate() : ?int |
|
1130 | |||
1131 | /** |
||
1132 | * @param int $contentBitrate |
||
1133 | * @return MediaInterface |
||
1134 | */ |
||
1135 | 47 | public function setContentBitrate(?int $contentBitrate) : MediaInterface |
|
1141 | |||
1142 | /** |
||
1143 | * @return int |
||
1144 | */ |
||
1145 | 2 | public function getContentFramerate() : ?int |
|
1149 | |||
1150 | /** |
||
1151 | * @param int $contentFramerate |
||
1152 | * @return MediaInterface |
||
1153 | */ |
||
1154 | 47 | public function setContentFramerate(?int $contentFramerate) : MediaInterface |
|
1160 | |||
1161 | /** |
||
1162 | * @return float |
||
1163 | */ |
||
1164 | 2 | public function getContentSamplingrate() : ?float |
|
1168 | |||
1169 | /** |
||
1170 | * @param float $contentSamplingrate |
||
1171 | * @return MediaInterface |
||
1172 | */ |
||
1173 | 47 | public function setContentSamplingrate(?float $contentSamplingrate) : MediaInterface |
|
1179 | |||
1180 | /** |
||
1181 | * @return int |
||
1182 | */ |
||
1183 | 2 | public function getContentDuration() : ?int |
|
1187 | |||
1188 | /** |
||
1189 | * @param int $contentDuration |
||
1190 | * @return MediaInterface |
||
1191 | */ |
||
1192 | 47 | public function setContentDuration(?int $contentDuration) : MediaInterface |
|
1198 | |||
1199 | /** |
||
1200 | * @return int |
||
1201 | */ |
||
1202 | 2 | public function getContentHeight() : ?int |
|
1206 | |||
1207 | /** |
||
1208 | * @param int $contentHeight |
||
1209 | * @return MediaInterface |
||
1210 | */ |
||
1211 | 47 | public function setContentHeight(?int $contentHeight) : MediaInterface |
|
1217 | |||
1218 | /** |
||
1219 | * @return int |
||
1220 | */ |
||
1221 | 2 | public function getContentWidth() : ?int |
|
1225 | |||
1226 | /** |
||
1227 | * @param int $contentWidth |
||
1228 | * @return MediaInterface |
||
1229 | */ |
||
1230 | 47 | public function setContentWidth(?int $contentWidth) : MediaInterface |
|
1236 | |||
1237 | /** |
||
1238 | * @return string |
||
1239 | */ |
||
1240 | 2 | public function getContentLang() : ?string |
|
1244 | |||
1245 | /** |
||
1246 | * @param string $contentLang |
||
1247 | * @return MediaInterface |
||
1248 | */ |
||
1249 | 47 | public function setContentLang(?string $contentLang) : MediaInterface |
|
1255 | |||
1256 | /** |
||
1257 | * @return int |
||
1258 | */ |
||
1259 | 2 | public function getContentExpression() : ?int |
|
1263 | |||
1264 | /** |
||
1265 | * @param int $contentExpression |
||
1266 | * @return MediaInterface |
||
1267 | */ |
||
1268 | 47 | public function setContentExpression(?int $contentExpression) : MediaInterface |
|
1274 | |||
1275 | /** |
||
1276 | * @return int |
||
1277 | */ |
||
1278 | 2 | public function getContentMedium() : ?int |
|
1282 | |||
1283 | /** |
||
1284 | * @param int $contentMedium |
||
1285 | * @return MediaInterface |
||
1286 | */ |
||
1287 | 47 | public function setContentMedium(?int $contentMedium) : MediaInterface |
|
1293 | |||
1294 | /** |
||
1295 | * @return int |
||
1296 | */ |
||
1297 | 1 | public function getRights() : ?int |
|
1301 | |||
1302 | /** |
||
1303 | * @param int $rights |
||
1304 | * @return MediaInterface |
||
1305 | */ |
||
1306 | 1 | public function setRights(int $rights) : MediaInterface |
|
1312 | |||
1313 | |||
1314 | /** |
||
1315 | * @return string |
||
1316 | */ |
||
1317 | 2 | public function getRating() : ?string |
|
1321 | |||
1322 | /** |
||
1323 | * @param string $rating |
||
1324 | * @return MediaInterface |
||
1325 | */ |
||
1326 | 2 | public function setRating(?string $rating) : MediaInterface |
|
1332 | |||
1333 | /** |
||
1334 | * @return string |
||
1335 | */ |
||
1336 | 2 | public function getRatingScheme() : ?string |
|
1340 | |||
1341 | /** |
||
1342 | * @param string $ratingScheme |
||
1343 | * @return MediaInterface |
||
1344 | */ |
||
1345 | 2 | public function setRatingScheme(?string $ratingScheme) : MediaInterface |
|
1351 | |||
1352 | |||
1353 | /** |
||
1354 | * @return int |
||
1355 | */ |
||
1356 | 2 | public function getTitleType() : ?int |
|
1360 | |||
1361 | /** |
||
1362 | * @param int $titleType |
||
1363 | * @return MediaInterface |
||
1364 | */ |
||
1365 | 4 | public function setTitleType(?int $titleType) : MediaInterface |
|
1371 | |||
1372 | |||
1373 | /** |
||
1374 | * @return int |
||
1375 | */ |
||
1376 | 2 | public function getDescriptionType() : ?int |
|
1380 | |||
1381 | /** |
||
1382 | * @param int $descriptionType |
||
1383 | * @return MediaInterface |
||
1384 | */ |
||
1385 | 5 | public function setDescriptionType(?int $descriptionType) : MediaInterface |
|
1391 | |||
1392 | /** |
||
1393 | * @return array |
||
1394 | */ |
||
1395 | 1 | public function getKeywords() : array |
|
1399 | |||
1400 | /** |
||
1401 | * @param array $keywords |
||
1402 | * @return MediaInterface |
||
1403 | */ |
||
1404 | 1 | public function setKeywords(array $keywords) : MediaInterface |
|
1410 | |||
1411 | |||
1412 | /** |
||
1413 | * @return int |
||
1414 | */ |
||
1415 | 2 | public function getThumbnailWidth() : ?int |
|
1419 | |||
1420 | /** |
||
1421 | * @param int $thumbnailWidth |
||
1422 | * @return MediaInterface |
||
1423 | */ |
||
1424 | 3 | public function setThumbnailWidth(?int $thumbnailWidth) : MediaInterface |
|
1430 | |||
1431 | /** |
||
1432 | * @return int |
||
1433 | */ |
||
1434 | 2 | public function getThumbnailHeight() : ?int |
|
1438 | |||
1439 | /** |
||
1440 | * @param int $thumbnailHeight |
||
1441 | * @return MediaInterface |
||
1442 | */ |
||
1443 | 3 | public function setThumbnailHeight(?int $thumbnailHeight) : MediaInterface |
|
1449 | |||
1450 | /** |
||
1451 | * @return DateTime |
||
1452 | */ |
||
1453 | 2 | public function getThumbnailTime() : ? \DateTime |
|
1457 | |||
1458 | /** |
||
1459 | * @param DateTime $thumbnailTime |
||
1460 | * @return MediaInterface |
||
1461 | */ |
||
1462 | 1 | public function setThumbnailTime(? \DateTime $thumbnailTime) : MediaInterface |
|
1468 | |||
1469 | /** |
||
1470 | * @return string |
||
1471 | */ |
||
1472 | 2 | public function getCategory() : ?string |
|
1476 | |||
1477 | /** |
||
1478 | * @param string $category |
||
1479 | * @return MediaInterface |
||
1480 | */ |
||
1481 | 2 | public function setCategory(?string $category) : MediaInterface |
|
1487 | |||
1488 | /** |
||
1489 | * @return string |
||
1490 | */ |
||
1491 | 2 | public function getCategoryLabel() : ?string |
|
1495 | |||
1496 | /** |
||
1497 | * @param string $categoryLabel |
||
1498 | * @return MediaInterface |
||
1499 | */ |
||
1500 | 2 | public function setCategoryLabel(?string $categoryLabel) : MediaInterface |
|
1506 | |||
1507 | /** |
||
1508 | * @return string |
||
1509 | */ |
||
1510 | 2 | public function getCategoryScheme() : ?string |
|
1514 | |||
1515 | /** |
||
1516 | * @param string $categoryScheme |
||
1517 | * @return MediaInterface |
||
1518 | */ |
||
1519 | 2 | public function setCategoryScheme(?string $categoryScheme) : MediaInterface |
|
1525 | |||
1526 | /** |
||
1527 | * @return string |
||
1528 | */ |
||
1529 | 2 | public function getHash() : ?string |
|
1533 | |||
1534 | /** |
||
1535 | * @param string $hash |
||
1536 | * @return MediaInterface |
||
1537 | */ |
||
1538 | 2 | public function setHash(?string $hash) : MediaInterface |
|
1544 | |||
1545 | /** |
||
1546 | * @return int |
||
1547 | */ |
||
1548 | 2 | public function getHashAlgo() : ?int |
|
1552 | |||
1553 | /** |
||
1554 | * @param int $hashAlgo |
||
1555 | * @return MediaInterface |
||
1556 | */ |
||
1557 | 2 | public function setHashAlgo(?int $hashAlgo) : MediaInterface |
|
1563 | |||
1564 | /** |
||
1565 | * @return string |
||
1566 | */ |
||
1567 | 2 | public function getPlayerUrl() : ?string |
|
1571 | |||
1572 | /** |
||
1573 | * @param string $playerUrl |
||
1574 | * @return MediaInterface |
||
1575 | */ |
||
1576 | 2 | public function setPlayerUrl(?string $playerUrl) : MediaInterface |
|
1582 | |||
1583 | /** |
||
1584 | * @return int |
||
1585 | */ |
||
1586 | 2 | public function getPlayerWidth() : ?int |
|
1590 | |||
1591 | /** |
||
1592 | * @param int $playerWidth |
||
1593 | * @return MediaInterface |
||
1594 | */ |
||
1595 | 2 | public function setPlayerWidth(?int $playerWidth) : MediaInterface |
|
1601 | |||
1602 | /** |
||
1603 | * @return int |
||
1604 | */ |
||
1605 | 2 | public function getPlayerHeight() : ?int |
|
1609 | |||
1610 | /** |
||
1611 | * @param int $playerHeight |
||
1612 | * @return MediaInterface |
||
1613 | */ |
||
1614 | 2 | public function setPlayerHeight(?int $playerHeight) : MediaInterface |
|
1620 | |||
1621 | /** |
||
1622 | * @return string |
||
1623 | */ |
||
1624 | 2 | public function getCopyright() : ?string |
|
1628 | |||
1629 | /** |
||
1630 | * @param string $copyright |
||
1631 | * @return MediaInterface |
||
1632 | */ |
||
1633 | 2 | public function setCopyright(?string $copyright) : MediaInterface |
|
1639 | |||
1640 | /** |
||
1641 | * @return string |
||
1642 | */ |
||
1643 | 2 | public function getCopyrightUrl() : ?string |
|
1647 | |||
1648 | /** |
||
1649 | * @param string $copyrightUrl |
||
1650 | * @return MediaInterface |
||
1651 | */ |
||
1652 | 2 | public function setCopyrightUrl(?string $copyrightUrl) : MediaInterface |
|
1658 | |||
1659 | /** |
||
1660 | * @return string |
||
1661 | */ |
||
1662 | 2 | public function getRestriction() : ?string |
|
1666 | |||
1667 | /** |
||
1668 | * @param string $restriction |
||
1669 | * @return MediaInterface |
||
1670 | */ |
||
1671 | 2 | public function setRestriction(?string $restriction) : MediaInterface |
|
1677 | |||
1678 | |||
1679 | /** |
||
1680 | * @return int |
||
1681 | */ |
||
1682 | 2 | public function getRestrictionType() : ?int |
|
1686 | |||
1687 | /** |
||
1688 | * @param int $restrictionType |
||
1689 | * @return MediaInterface |
||
1690 | */ |
||
1691 | 2 | public function setRestrictionType(?int $restrictionType) : MediaInterface |
|
1697 | |||
1698 | /** |
||
1699 | * @return int |
||
1700 | */ |
||
1701 | 2 | public function getRestrictionRelationship() : ?int |
|
1705 | |||
1706 | /** |
||
1707 | * @param int $restrictionRelationship |
||
1708 | * @return MediaInterface |
||
1709 | */ |
||
1710 | 2 | public function setRestrictionRelationship(?int $restrictionRelationship) : MediaInterface |
|
1716 | |||
1717 | /** |
||
1718 | * @return float |
||
1719 | */ |
||
1720 | 2 | public function getStarRatingAverage() : ?float |
|
1724 | |||
1725 | /** |
||
1726 | * @param float $starRatingAverage |
||
1727 | * @return MediaInterface |
||
1728 | */ |
||
1729 | 3 | public function setStarRatingAverage(?float $starRatingAverage) : MediaInterface |
|
1735 | |||
1736 | /** |
||
1737 | * @return int |
||
1738 | */ |
||
1739 | 2 | public function getStarRatingCount() : ?int |
|
1743 | |||
1744 | /** |
||
1745 | * @param int $starRatingCount |
||
1746 | * @return MediaInterface |
||
1747 | */ |
||
1748 | 3 | public function setStarRatingCount(?int $starRatingCount) : MediaInterface |
|
1754 | |||
1755 | /** |
||
1756 | * @return int |
||
1757 | */ |
||
1758 | 2 | public function getStarRatingMin() : ?int |
|
1762 | |||
1763 | /** |
||
1764 | * @param int $starRatingMin |
||
1765 | * @return MediaInterface |
||
1766 | */ |
||
1767 | 3 | public function setStarRatingMin(?int $starRatingMin) : MediaInterface |
|
1773 | |||
1774 | /** |
||
1775 | * @return int |
||
1776 | */ |
||
1777 | 2 | public function getStarRatingMax() : ?int |
|
1781 | |||
1782 | /** |
||
1783 | * @param int $starRatingMax |
||
1784 | * @return MediaInterface |
||
1785 | */ |
||
1786 | 3 | public function setStarRatingMax(?int $starRatingMax) : MediaInterface |
|
1792 | |||
1793 | /** |
||
1794 | * @return int |
||
1795 | */ |
||
1796 | 2 | public function getNbViews() : ?int |
|
1800 | |||
1801 | /** |
||
1802 | * @param int $nbViews |
||
1803 | * @return MediaInterface |
||
1804 | */ |
||
1805 | 3 | public function setNbViews(?int $nbViews) : MediaInterface |
|
1811 | |||
1812 | /** |
||
1813 | * @return int |
||
1814 | */ |
||
1815 | 2 | public function getNbFavorites() : ?int |
|
1819 | |||
1820 | /** |
||
1821 | * @param int $nbFavorites |
||
1822 | * @return MediaInterface |
||
1823 | */ |
||
1824 | 3 | public function setNbFavorites(?int $nbFavorites) : MediaInterface |
|
1830 | |||
1831 | /** |
||
1832 | * @return array |
||
1833 | */ |
||
1834 | 2 | public function getTags() : array |
|
1838 | |||
1839 | /** |
||
1840 | * @param array $tags |
||
1841 | * @return MediaInterface |
||
1842 | */ |
||
1843 | 3 | public function setTags(array $tags) : MediaInterface |
|
1849 | |||
1850 | /** |
||
1851 | * @return array |
||
1852 | */ |
||
1853 | 2 | public function getComments() : array |
|
1857 | |||
1858 | /** |
||
1859 | * @param array $comments |
||
1860 | * @return MediaInterface |
||
1861 | */ |
||
1862 | 2 | public function setComments(array $comments) : MediaInterface |
|
1868 | |||
1869 | |||
1870 | /** |
||
1871 | * @return string |
||
1872 | */ |
||
1873 | 2 | public function getEmbedUrl() : ?string |
|
1877 | |||
1878 | /** |
||
1879 | * @param string $embedUrl |
||
1880 | * @return MediaInterface |
||
1881 | */ |
||
1882 | 2 | public function setEmbedUrl(?string $embedUrl) : MediaInterface |
|
1888 | |||
1889 | /** |
||
1890 | * @return int |
||
1891 | */ |
||
1892 | 2 | public function getEmbedWidth() : ?int |
|
1896 | |||
1897 | /** |
||
1898 | * @param int $embedWidth |
||
1899 | * @return MediaInterface |
||
1900 | */ |
||
1901 | 2 | public function setEmbedWidth(?int $embedWidth) : MediaInterface |
|
1907 | |||
1908 | /** |
||
1909 | * @return int |
||
1910 | */ |
||
1911 | 2 | public function getEmbedHeight() : ?int |
|
1915 | |||
1916 | /** |
||
1917 | * @param int $embedHeight |
||
1918 | * @return MediaInterface |
||
1919 | */ |
||
1920 | 2 | public function setEmbedHeight(?int $embedHeight) : MediaInterface |
|
1926 | |||
1927 | /** |
||
1928 | * @return array |
||
1929 | */ |
||
1930 | 2 | public function getEmbedParams() : array |
|
1934 | |||
1935 | /** |
||
1936 | * @param array $embedParams |
||
1937 | * @return MediaInterface |
||
1938 | */ |
||
1939 | 2 | public function setEmbedParams(array $embedParams) : MediaInterface |
|
1945 | |||
1946 | /** |
||
1947 | * @return array |
||
1948 | */ |
||
1949 | 2 | public function getResponses() : array |
|
1953 | |||
1954 | /** |
||
1955 | * @param array $responses |
||
1956 | * @return MediaInterface |
||
1957 | */ |
||
1958 | 2 | public function setResponses(array $responses) : MediaInterface |
|
1964 | |||
1965 | /** |
||
1966 | * @return array |
||
1967 | */ |
||
1968 | 2 | public function getBacklinks() : array |
|
1972 | |||
1973 | /** |
||
1974 | * @param array $backlinks |
||
1975 | * @return MediaInterface |
||
1976 | */ |
||
1977 | 2 | public function setBacklinks(array $backlinks) : MediaInterface |
|
1983 | |||
1984 | /** |
||
1985 | * @return int |
||
1986 | */ |
||
1987 | 2 | public function getStatus() : ?int |
|
1991 | |||
1992 | /** |
||
1993 | * @param int $status |
||
1994 | * @return MediaInterface |
||
1995 | */ |
||
1996 | 2 | public function setStatus(?int $status) : MediaInterface |
|
2002 | |||
2003 | /** |
||
2004 | * @return string |
||
2005 | */ |
||
2006 | 2 | public function getStatusReason() : ?string |
|
2010 | |||
2011 | /** |
||
2012 | * @param string $statusReason |
||
2013 | * @return MediaInterface |
||
2014 | */ |
||
2015 | 2 | public function setStatusReason(?string $statusReason) : MediaInterface |
|
2021 | |||
2022 | /** |
||
2023 | * @return string |
||
2024 | */ |
||
2025 | 1 | public function getLicense() : ?string |
|
2029 | |||
2030 | /** |
||
2031 | * @param string $license |
||
2032 | * @return MediaInterface |
||
2033 | */ |
||
2034 | 1 | public function setLicense(?string $license) : MediaInterface |
|
2040 | |||
2041 | /** |
||
2042 | * @return string |
||
2043 | */ |
||
2044 | 1 | public function getLicenseUrl() : ?string |
|
2048 | |||
2049 | /** |
||
2050 | * @param string $licenseUrl |
||
2051 | * @return MediaInterface |
||
2052 | */ |
||
2053 | 1 | public function setLicenseUrl(?string $licenseUrl) : MediaInterface |
|
2059 | |||
2060 | /** |
||
2061 | * @return string |
||
2062 | */ |
||
2063 | 1 | public function getLicenseType() : ?string |
|
2067 | |||
2068 | /** |
||
2069 | * @param string $licenseType |
||
2070 | * @return MediaInterface |
||
2071 | */ |
||
2072 | 1 | public function setLicenseType(?string $licenseType) : MediaInterface |
|
2078 | |||
2079 | /** |
||
2080 | * @return string |
||
2081 | */ |
||
2082 | 1 | public function getPeerLink() : ?string |
|
2086 | |||
2087 | /** |
||
2088 | * @param string $peerLink |
||
2089 | * @return MediaInterface |
||
2090 | */ |
||
2091 | 1 | public function setPeerLink(?string $peerLink) : MediaInterface |
|
2097 | |||
2098 | /** |
||
2099 | * @return string |
||
2100 | */ |
||
2101 | 1 | public function getPeerLinkType() : ?string |
|
2105 | |||
2106 | /** |
||
2107 | * @param string $peerLinkType |
||
2108 | * @return MediaInterface |
||
2109 | */ |
||
2110 | 1 | public function setPeerLinkType(?string $peerLinkType) : MediaInterface |
|
2116 | |||
2117 | /** |
||
2118 | * @return array |
||
2119 | */ |
||
2120 | 2 | public function getCredits() : array |
|
2124 | |||
2125 | /** |
||
2126 | * @param array $credits |
||
2127 | * @return MediaInterface |
||
2128 | */ |
||
2129 | 2 | public function setCredits(array $credits) : MediaInterface |
|
2135 | |||
2136 | /** |
||
2137 | * @return array |
||
2138 | */ |
||
2139 | 2 | public function getTexts() : array |
|
2143 | |||
2144 | /** |
||
2145 | * @param array $texts |
||
2146 | * @return MediaInterface |
||
2147 | */ |
||
2148 | 2 | public function setTexts(array $texts) : MediaInterface |
|
2154 | |||
2155 | /** |
||
2156 | * @return array |
||
2157 | */ |
||
2158 | 2 | public function getPrices() : array |
|
2162 | |||
2163 | /** |
||
2164 | * @param array $prices |
||
2165 | * @return MediaInterface |
||
2166 | */ |
||
2167 | 2 | public function setPrices(array $prices) : MediaInterface |
|
2173 | |||
2174 | /** |
||
2175 | * @return array |
||
2176 | */ |
||
2177 | 1 | public function getSubTitles() : array |
|
2181 | |||
2182 | /** |
||
2183 | * @param array $subTitles |
||
2184 | * @return MediaInterface |
||
2185 | */ |
||
2186 | 1 | public function setSubTitles(array $subTitles) : MediaInterface |
|
2192 | |||
2193 | /** |
||
2194 | * @return array |
||
2195 | */ |
||
2196 | 1 | public function getScenes() : array |
|
2200 | |||
2201 | /** |
||
2202 | * @param array $scenes |
||
2203 | * @return MediaInterface |
||
2204 | */ |
||
2205 | 1 | public function setScenes(array $scenes) : MediaInterface |
|
2211 | |||
2212 | /** |
||
2213 | * @return bool |
||
2214 | */ |
||
2215 | 2 | public function isDefault() : bool |
|
2219 | |||
2220 | /** |
||
2221 | * @param bool $default |
||
2222 | * @return MediaInterface |
||
2223 | */ |
||
2224 | 1 | public function setDefault(bool $default) : MediaInterface |
|
2230 | } |
||
2231 |
This check looks for assignments to scalar types that may be of the wrong type.
To ensure the code behaves as expected, it may be a good idea to add an explicit type cast.