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 string |
||
| 717 | */ |
||
| 718 | protected $contentType; |
||
| 719 | |||
| 720 | /** |
||
| 721 | * @var int |
||
| 722 | */ |
||
| 723 | protected $contentExpression; |
||
| 724 | |||
| 725 | /** |
||
| 726 | * @var int |
||
| 727 | */ |
||
| 728 | protected $contentMedium; |
||
| 729 | |||
| 730 | /** |
||
| 731 | * @var string |
||
| 732 | */ |
||
| 733 | protected $rights; |
||
| 734 | |||
| 735 | /** |
||
| 736 | * @var string |
||
| 737 | */ |
||
| 738 | protected $rating; |
||
| 739 | |||
| 740 | |||
| 741 | /** |
||
| 742 | * @var string |
||
| 743 | */ |
||
| 744 | protected $ratingScheme; |
||
| 745 | |||
| 746 | /** |
||
| 747 | * @var int |
||
| 748 | */ |
||
| 749 | protected $titleType; |
||
| 750 | |||
| 751 | /** |
||
| 752 | * @var int |
||
| 753 | */ |
||
| 754 | protected $descriptionType; |
||
| 755 | |||
| 756 | /** |
||
| 757 | * @var array |
||
| 758 | */ |
||
| 759 | protected $keywords = array(); |
||
| 760 | |||
| 761 | /** |
||
| 762 | * @var int |
||
| 763 | */ |
||
| 764 | protected $thumbnailWidth; |
||
| 765 | |||
| 766 | /** |
||
| 767 | * @var int |
||
| 768 | */ |
||
| 769 | protected $thumbnailHeight; |
||
| 770 | |||
| 771 | /** |
||
| 772 | * @var DateTime |
||
| 773 | */ |
||
| 774 | protected $thumbnailTime; |
||
| 775 | |||
| 776 | /** |
||
| 777 | * @var string |
||
| 778 | */ |
||
| 779 | protected $category; |
||
| 780 | |||
| 781 | /** |
||
| 782 | * @var string |
||
| 783 | */ |
||
| 784 | protected $categoryLabel; |
||
| 785 | |||
| 786 | /** |
||
| 787 | * @var string |
||
| 788 | */ |
||
| 789 | protected $categoryScheme; |
||
| 790 | |||
| 791 | /** |
||
| 792 | * @var string |
||
| 793 | */ |
||
| 794 | protected $hash; |
||
| 795 | |||
| 796 | /** |
||
| 797 | * @var string |
||
| 798 | */ |
||
| 799 | protected $hashAlgo; |
||
| 800 | |||
| 801 | /** |
||
| 802 | * @var string |
||
| 803 | */ |
||
| 804 | protected $playerUrl; |
||
| 805 | |||
| 806 | /** |
||
| 807 | * @var int |
||
| 808 | */ |
||
| 809 | protected $playerWidth; |
||
| 810 | |||
| 811 | /** |
||
| 812 | * @var int |
||
| 813 | */ |
||
| 814 | protected $playerHeight; |
||
| 815 | |||
| 816 | /** |
||
| 817 | * @var string |
||
| 818 | */ |
||
| 819 | protected $copyright; |
||
| 820 | |||
| 821 | /** |
||
| 822 | * @var string |
||
| 823 | */ |
||
| 824 | protected $copyrightUrl; |
||
| 825 | |||
| 826 | /** |
||
| 827 | * @var string |
||
| 828 | */ |
||
| 829 | protected $restriction; |
||
| 830 | |||
| 831 | /** |
||
| 832 | * @var int |
||
| 833 | */ |
||
| 834 | protected $restrictionType; |
||
| 835 | |||
| 836 | /** |
||
| 837 | * @var int |
||
| 838 | */ |
||
| 839 | protected $restrictionRelationship; |
||
| 840 | |||
| 841 | /** |
||
| 842 | * @var float |
||
| 843 | */ |
||
| 844 | protected $starRatingAverage; |
||
| 845 | |||
| 846 | /** |
||
| 847 | * @var int |
||
| 848 | */ |
||
| 849 | protected $starRatingCount; |
||
| 850 | |||
| 851 | /** |
||
| 852 | * @var int |
||
| 853 | */ |
||
| 854 | protected $starRatingMin; |
||
| 855 | |||
| 856 | /** |
||
| 857 | * @var int |
||
| 858 | */ |
||
| 859 | protected $starRatingMax; |
||
| 860 | |||
| 861 | /** |
||
| 862 | * @var int |
||
| 863 | */ |
||
| 864 | protected $nbViews; |
||
| 865 | |||
| 866 | /** |
||
| 867 | * @var int |
||
| 868 | */ |
||
| 869 | protected $nbFavorites; |
||
| 870 | |||
| 871 | /** |
||
| 872 | * @var array |
||
| 873 | */ |
||
| 874 | protected $tags = array(); |
||
| 875 | |||
| 876 | /** |
||
| 877 | * @var array |
||
| 878 | */ |
||
| 879 | protected $comments = array(); |
||
| 880 | |||
| 881 | /** |
||
| 882 | * @var string |
||
| 883 | */ |
||
| 884 | protected $embedUrl; |
||
| 885 | |||
| 886 | /** |
||
| 887 | * @var int |
||
| 888 | */ |
||
| 889 | protected $embedWidth; |
||
| 890 | |||
| 891 | /** |
||
| 892 | * @var int |
||
| 893 | */ |
||
| 894 | protected $embedHeight; |
||
| 895 | |||
| 896 | /** |
||
| 897 | * @var array |
||
| 898 | */ |
||
| 899 | protected $embedParams = array(); |
||
| 900 | |||
| 901 | /** |
||
| 902 | * @var array |
||
| 903 | */ |
||
| 904 | protected $responses = array(); |
||
| 905 | |||
| 906 | /** |
||
| 907 | * @var array |
||
| 908 | */ |
||
| 909 | protected $backlinks = array(); |
||
| 910 | |||
| 911 | /** |
||
| 912 | * @var int |
||
| 913 | */ |
||
| 914 | protected $status; |
||
| 915 | |||
| 916 | /** |
||
| 917 | * @var string |
||
| 918 | */ |
||
| 919 | protected $statusReason; |
||
| 920 | |||
| 921 | /** |
||
| 922 | * @var string |
||
| 923 | */ |
||
| 924 | protected $license; |
||
| 925 | |||
| 926 | /** |
||
| 927 | * @var string |
||
| 928 | */ |
||
| 929 | protected $licenseUrl; |
||
| 930 | |||
| 931 | /** |
||
| 932 | * @var string |
||
| 933 | */ |
||
| 934 | protected $licenseType; |
||
| 935 | |||
| 936 | /** |
||
| 937 | * @var string |
||
| 938 | */ |
||
| 939 | protected $peerLink; |
||
| 940 | |||
| 941 | /** |
||
| 942 | * @var string |
||
| 943 | */ |
||
| 944 | protected $peerLinkType; |
||
| 945 | |||
| 946 | /** |
||
| 947 | * @var array |
||
| 948 | */ |
||
| 949 | protected $credits = array(); |
||
| 950 | |||
| 951 | /** |
||
| 952 | * @var array |
||
| 953 | */ |
||
| 954 | protected $texts = array(); |
||
| 955 | |||
| 956 | /** |
||
| 957 | * @var array |
||
| 958 | */ |
||
| 959 | protected $prices = array(); |
||
| 960 | |||
| 961 | /** |
||
| 962 | * @var array |
||
| 963 | */ |
||
| 964 | protected $subTitles = array(); |
||
| 965 | |||
| 966 | /** |
||
| 967 | * @var array |
||
| 968 | */ |
||
| 969 | protected $scenes = array(); |
||
| 970 | |||
| 971 | /** |
||
| 972 | * @var bool |
||
| 973 | */ |
||
| 974 | protected $default = true; |
||
| 975 | |||
| 976 | /** |
||
| 977 | * @return string |
||
| 978 | */ |
||
| 979 | public function getNodeName() : string |
||
| 983 | |||
| 984 | /** |
||
| 985 | * @param string $nodeName |
||
| 986 | * @return MediaInterface |
||
| 987 | */ |
||
| 988 | 51 | public function setNodeName(string $nodeName) : MediaInterface |
|
| 994 | |||
| 995 | /** |
||
| 996 | * @return string |
||
| 997 | */ |
||
| 998 | 5 | public function getType() : ? string |
|
| 1002 | |||
| 1003 | /** |
||
| 1004 | * @param string $type |
||
| 1005 | * @return MediaInterface |
||
| 1006 | */ |
||
| 1007 | 7 | public function setType(?string $type) : MediaInterface |
|
| 1013 | |||
| 1014 | /** |
||
| 1015 | * @return string |
||
| 1016 | */ |
||
| 1017 | 10 | public function getUrl() : ? string |
|
| 1021 | |||
| 1022 | /** |
||
| 1023 | * @param string $url |
||
| 1024 | * @return MediaInterface |
||
| 1025 | */ |
||
| 1026 | 53 | public function setUrl(?string $url) : MediaInterface |
|
| 1032 | |||
| 1033 | /** |
||
| 1034 | * @return string |
||
| 1035 | */ |
||
| 1036 | 3 | public function getLength() : ? string |
|
| 1040 | |||
| 1041 | /** |
||
| 1042 | * @param string $length |
||
| 1043 | * @return MediaInterface |
||
| 1044 | */ |
||
| 1045 | 6 | public function setLength(?string $length) : MediaInterface |
|
| 1051 | |||
| 1052 | /** |
||
| 1053 | * @return string |
||
| 1054 | */ |
||
| 1055 | 4 | public function getTitle() : ? string |
|
| 1059 | |||
| 1060 | /** |
||
| 1061 | * @param string $title |
||
| 1062 | * @return MediaInterface |
||
| 1063 | */ |
||
| 1064 | 4 | public function setTitle(?string $title) : MediaInterface |
|
| 1070 | |||
| 1071 | /** |
||
| 1072 | * @return string |
||
| 1073 | */ |
||
| 1074 | 5 | public function getDescription() : ? string |
|
| 1078 | |||
| 1079 | /** |
||
| 1080 | * @param string $description |
||
| 1081 | * @return MediaInterface |
||
| 1082 | */ |
||
| 1083 | 5 | public function setDescription(?string $description) : MediaInterface |
|
| 1089 | |||
| 1090 | /** |
||
| 1091 | * @return string |
||
| 1092 | */ |
||
| 1093 | 3 | public function getThumbnail() : ? string |
|
| 1097 | |||
| 1098 | /** |
||
| 1099 | * @param string $thumbnail |
||
| 1100 | * @return MediaInterface |
||
| 1101 | */ |
||
| 1102 | 3 | public function setThumbnail(?string $thumbnail) : MediaInterface |
|
| 1108 | |||
| 1109 | /** |
||
| 1110 | * @return int |
||
| 1111 | */ |
||
| 1112 | 2 | public function getContentFileSize() : ?int |
|
| 1116 | |||
| 1117 | /** |
||
| 1118 | * @param int $contentFileSize |
||
| 1119 | * @return MediaInterface |
||
| 1120 | */ |
||
| 1121 | 47 | public function setContentFileSize(?int $contentFileSize) : MediaInterface |
|
| 1127 | |||
| 1128 | /** |
||
| 1129 | * @return int |
||
| 1130 | */ |
||
| 1131 | 2 | public function getContentBitrate() : ?int |
|
| 1135 | |||
| 1136 | /** |
||
| 1137 | * @param int $contentBitrate |
||
| 1138 | * @return MediaInterface |
||
| 1139 | */ |
||
| 1140 | 47 | public function setContentBitrate(?int $contentBitrate) : MediaInterface |
|
| 1146 | |||
| 1147 | /** |
||
| 1148 | * @return int |
||
| 1149 | */ |
||
| 1150 | 2 | public function getContentFramerate() : ?int |
|
| 1154 | |||
| 1155 | /** |
||
| 1156 | * @param int $contentFramerate |
||
| 1157 | * @return MediaInterface |
||
| 1158 | */ |
||
| 1159 | 47 | public function setContentFramerate(?int $contentFramerate) : MediaInterface |
|
| 1165 | |||
| 1166 | /** |
||
| 1167 | * @return float |
||
| 1168 | */ |
||
| 1169 | 2 | public function getContentSamplingrate() : ?float |
|
| 1173 | |||
| 1174 | /** |
||
| 1175 | * @param float $contentSamplingrate |
||
| 1176 | * @return MediaInterface |
||
| 1177 | */ |
||
| 1178 | 47 | public function setContentSamplingrate(?float $contentSamplingrate) : MediaInterface |
|
| 1184 | |||
| 1185 | /** |
||
| 1186 | * @return int |
||
| 1187 | */ |
||
| 1188 | 2 | public function getContentDuration() : ?int |
|
| 1192 | |||
| 1193 | /** |
||
| 1194 | * @param int $contentDuration |
||
| 1195 | * @return MediaInterface |
||
| 1196 | */ |
||
| 1197 | 47 | public function setContentDuration(?int $contentDuration) : MediaInterface |
|
| 1203 | |||
| 1204 | /** |
||
| 1205 | * @return int |
||
| 1206 | */ |
||
| 1207 | 2 | public function getContentHeight() : ?int |
|
| 1211 | |||
| 1212 | /** |
||
| 1213 | * @param int $contentHeight |
||
| 1214 | * @return MediaInterface |
||
| 1215 | */ |
||
| 1216 | 47 | public function setContentHeight(?int $contentHeight) : MediaInterface |
|
| 1222 | |||
| 1223 | /** |
||
| 1224 | * @return int |
||
| 1225 | */ |
||
| 1226 | 2 | public function getContentWidth() : ?int |
|
| 1230 | |||
| 1231 | /** |
||
| 1232 | * @param int $contentWidth |
||
| 1233 | * @return MediaInterface |
||
| 1234 | */ |
||
| 1235 | 47 | public function setContentWidth(?int $contentWidth) : MediaInterface |
|
| 1241 | |||
| 1242 | /** |
||
| 1243 | * @return string |
||
| 1244 | */ |
||
| 1245 | 2 | public function getContentLang() : ?string |
|
| 1249 | |||
| 1250 | /** |
||
| 1251 | * @param string $contentLang |
||
| 1252 | * @return MediaInterface |
||
| 1253 | */ |
||
| 1254 | 47 | public function setContentLang(?string $contentLang) : MediaInterface |
|
| 1260 | |||
| 1261 | /** |
||
| 1262 | * @return string |
||
| 1263 | */ |
||
| 1264 | 2 | public function getContentType() : ?string |
|
| 1268 | |||
| 1269 | /** |
||
| 1270 | * @param string $contentType |
||
| 1271 | * @return MediaInterface |
||
| 1272 | */ |
||
| 1273 | 47 | public function setContentType(?string $contentType) : MediaInterface |
|
| 1279 | |||
| 1280 | /** |
||
| 1281 | * @return int |
||
| 1282 | */ |
||
| 1283 | 2 | public function getContentExpression() : ?int |
|
| 1287 | |||
| 1288 | /** |
||
| 1289 | * @param int $contentExpression |
||
| 1290 | * @return MediaInterface |
||
| 1291 | */ |
||
| 1292 | 47 | public function setContentExpression(?int $contentExpression) : MediaInterface |
|
| 1298 | |||
| 1299 | /** |
||
| 1300 | * @return int |
||
| 1301 | */ |
||
| 1302 | 2 | public function getContentMedium() : ?int |
|
| 1306 | |||
| 1307 | /** |
||
| 1308 | * @param int $contentMedium |
||
| 1309 | * @return MediaInterface |
||
| 1310 | */ |
||
| 1311 | 47 | public function setContentMedium(?int $contentMedium) : MediaInterface |
|
| 1317 | |||
| 1318 | /** |
||
| 1319 | * @return int |
||
| 1320 | */ |
||
| 1321 | 1 | public function getRights() : ?int |
|
| 1325 | |||
| 1326 | /** |
||
| 1327 | * @param int $rights |
||
| 1328 | * @return MediaInterface |
||
| 1329 | */ |
||
| 1330 | 1 | public function setRights(int $rights) : MediaInterface |
|
| 1336 | |||
| 1337 | |||
| 1338 | /** |
||
| 1339 | * @return string |
||
| 1340 | */ |
||
| 1341 | 2 | public function getRating() : ?string |
|
| 1345 | |||
| 1346 | /** |
||
| 1347 | * @param string $rating |
||
| 1348 | * @return MediaInterface |
||
| 1349 | */ |
||
| 1350 | 2 | public function setRating(?string $rating) : MediaInterface |
|
| 1356 | |||
| 1357 | /** |
||
| 1358 | * @return string |
||
| 1359 | */ |
||
| 1360 | 2 | public function getRatingScheme() : ?string |
|
| 1364 | |||
| 1365 | /** |
||
| 1366 | * @param string $ratingScheme |
||
| 1367 | * @return MediaInterface |
||
| 1368 | */ |
||
| 1369 | 2 | public function setRatingScheme(?string $ratingScheme) : MediaInterface |
|
| 1375 | |||
| 1376 | |||
| 1377 | /** |
||
| 1378 | * @return int |
||
| 1379 | */ |
||
| 1380 | 2 | public function getTitleType() : ?int |
|
| 1384 | |||
| 1385 | /** |
||
| 1386 | * @param int $titleType |
||
| 1387 | * @return MediaInterface |
||
| 1388 | */ |
||
| 1389 | 4 | public function setTitleType(?int $titleType) : MediaInterface |
|
| 1395 | |||
| 1396 | |||
| 1397 | /** |
||
| 1398 | * @return int |
||
| 1399 | */ |
||
| 1400 | 2 | public function getDescriptionType() : ?int |
|
| 1404 | |||
| 1405 | /** |
||
| 1406 | * @param int $descriptionType |
||
| 1407 | * @return MediaInterface |
||
| 1408 | */ |
||
| 1409 | 5 | public function setDescriptionType(?int $descriptionType) : MediaInterface |
|
| 1415 | |||
| 1416 | /** |
||
| 1417 | * @return array |
||
| 1418 | */ |
||
| 1419 | 1 | public function getKeywords() : array |
|
| 1423 | |||
| 1424 | /** |
||
| 1425 | * @param array $keywords |
||
| 1426 | * @return MediaInterface |
||
| 1427 | */ |
||
| 1428 | 1 | public function setKeywords(array $keywords) : MediaInterface |
|
| 1434 | |||
| 1435 | |||
| 1436 | /** |
||
| 1437 | * @return int |
||
| 1438 | */ |
||
| 1439 | 2 | public function getThumbnailWidth() : ?int |
|
| 1443 | |||
| 1444 | /** |
||
| 1445 | * @param int $thumbnailWidth |
||
| 1446 | * @return MediaInterface |
||
| 1447 | */ |
||
| 1448 | 3 | public function setThumbnailWidth(?int $thumbnailWidth) : MediaInterface |
|
| 1454 | |||
| 1455 | /** |
||
| 1456 | * @return int |
||
| 1457 | */ |
||
| 1458 | 2 | public function getThumbnailHeight() : ?int |
|
| 1462 | |||
| 1463 | /** |
||
| 1464 | * @param int $thumbnailHeight |
||
| 1465 | * @return MediaInterface |
||
| 1466 | */ |
||
| 1467 | 3 | public function setThumbnailHeight(?int $thumbnailHeight) : MediaInterface |
|
| 1473 | |||
| 1474 | /** |
||
| 1475 | * @return DateTime |
||
| 1476 | */ |
||
| 1477 | 2 | public function getThumbnailTime() : ? \DateTime |
|
| 1481 | |||
| 1482 | /** |
||
| 1483 | * @param DateTime $thumbnailTime |
||
| 1484 | * @return MediaInterface |
||
| 1485 | */ |
||
| 1486 | 1 | public function setThumbnailTime(? \DateTime $thumbnailTime) : MediaInterface |
|
| 1492 | |||
| 1493 | /** |
||
| 1494 | * @return string |
||
| 1495 | */ |
||
| 1496 | 2 | public function getCategory() : ?string |
|
| 1500 | |||
| 1501 | /** |
||
| 1502 | * @param string $category |
||
| 1503 | * @return MediaInterface |
||
| 1504 | */ |
||
| 1505 | 2 | public function setCategory(?string $category) : MediaInterface |
|
| 1511 | |||
| 1512 | /** |
||
| 1513 | * @return string |
||
| 1514 | */ |
||
| 1515 | 2 | public function getCategoryLabel() : ?string |
|
| 1519 | |||
| 1520 | /** |
||
| 1521 | * @param string $categoryLabel |
||
| 1522 | * @return MediaInterface |
||
| 1523 | */ |
||
| 1524 | 2 | public function setCategoryLabel(?string $categoryLabel) : MediaInterface |
|
| 1530 | |||
| 1531 | /** |
||
| 1532 | * @return string |
||
| 1533 | */ |
||
| 1534 | 2 | public function getCategoryScheme() : ?string |
|
| 1538 | |||
| 1539 | /** |
||
| 1540 | * @param string $categoryScheme |
||
| 1541 | * @return MediaInterface |
||
| 1542 | */ |
||
| 1543 | 2 | public function setCategoryScheme(?string $categoryScheme) : MediaInterface |
|
| 1549 | |||
| 1550 | /** |
||
| 1551 | * @return string |
||
| 1552 | */ |
||
| 1553 | 2 | public function getHash() : ?string |
|
| 1557 | |||
| 1558 | /** |
||
| 1559 | * @param string $hash |
||
| 1560 | * @return MediaInterface |
||
| 1561 | */ |
||
| 1562 | 2 | public function setHash(?string $hash) : MediaInterface |
|
| 1568 | |||
| 1569 | /** |
||
| 1570 | * @return int |
||
| 1571 | */ |
||
| 1572 | 2 | public function getHashAlgo() : ?int |
|
| 1576 | |||
| 1577 | /** |
||
| 1578 | * @param int $hashAlgo |
||
| 1579 | * @return MediaInterface |
||
| 1580 | */ |
||
| 1581 | 2 | public function setHashAlgo(?int $hashAlgo) : MediaInterface |
|
| 1587 | |||
| 1588 | /** |
||
| 1589 | * @return string |
||
| 1590 | */ |
||
| 1591 | 2 | public function getPlayerUrl() : ?string |
|
| 1595 | |||
| 1596 | /** |
||
| 1597 | * @param string $playerUrl |
||
| 1598 | * @return MediaInterface |
||
| 1599 | */ |
||
| 1600 | 2 | public function setPlayerUrl(?string $playerUrl) : MediaInterface |
|
| 1606 | |||
| 1607 | /** |
||
| 1608 | * @return int |
||
| 1609 | */ |
||
| 1610 | 2 | public function getPlayerWidth() : ?int |
|
| 1614 | |||
| 1615 | /** |
||
| 1616 | * @param int $playerWidth |
||
| 1617 | * @return MediaInterface |
||
| 1618 | */ |
||
| 1619 | 2 | public function setPlayerWidth(?int $playerWidth) : MediaInterface |
|
| 1625 | |||
| 1626 | /** |
||
| 1627 | * @return int |
||
| 1628 | */ |
||
| 1629 | 2 | public function getPlayerHeight() : ?int |
|
| 1633 | |||
| 1634 | /** |
||
| 1635 | * @param int $playerHeight |
||
| 1636 | * @return MediaInterface |
||
| 1637 | */ |
||
| 1638 | 2 | public function setPlayerHeight(?int $playerHeight) : MediaInterface |
|
| 1644 | |||
| 1645 | /** |
||
| 1646 | * @return string |
||
| 1647 | */ |
||
| 1648 | 2 | public function getCopyright() : ?string |
|
| 1652 | |||
| 1653 | /** |
||
| 1654 | * @param string $copyright |
||
| 1655 | * @return MediaInterface |
||
| 1656 | */ |
||
| 1657 | 2 | public function setCopyright(?string $copyright) : MediaInterface |
|
| 1663 | |||
| 1664 | /** |
||
| 1665 | * @return string |
||
| 1666 | */ |
||
| 1667 | 2 | public function getCopyrightUrl() : ?string |
|
| 1671 | |||
| 1672 | /** |
||
| 1673 | * @param string $copyrightUrl |
||
| 1674 | * @return MediaInterface |
||
| 1675 | */ |
||
| 1676 | 2 | public function setCopyrightUrl(?string $copyrightUrl) : MediaInterface |
|
| 1682 | |||
| 1683 | /** |
||
| 1684 | * @return string |
||
| 1685 | */ |
||
| 1686 | 2 | public function getRestriction() : ?string |
|
| 1690 | |||
| 1691 | /** |
||
| 1692 | * @param string $restriction |
||
| 1693 | * @return MediaInterface |
||
| 1694 | */ |
||
| 1695 | 2 | public function setRestriction(?string $restriction) : MediaInterface |
|
| 1701 | |||
| 1702 | |||
| 1703 | /** |
||
| 1704 | * @return int |
||
| 1705 | */ |
||
| 1706 | 2 | public function getRestrictionType() : ?int |
|
| 1710 | |||
| 1711 | /** |
||
| 1712 | * @param int $restrictionType |
||
| 1713 | * @return MediaInterface |
||
| 1714 | */ |
||
| 1715 | 2 | public function setRestrictionType(?int $restrictionType) : MediaInterface |
|
| 1721 | |||
| 1722 | /** |
||
| 1723 | * @return int |
||
| 1724 | */ |
||
| 1725 | 2 | public function getRestrictionRelationship() : ?int |
|
| 1729 | |||
| 1730 | /** |
||
| 1731 | * @param int $restrictionRelationship |
||
| 1732 | * @return MediaInterface |
||
| 1733 | */ |
||
| 1734 | 2 | public function setRestrictionRelationship(?int $restrictionRelationship) : MediaInterface |
|
| 1740 | |||
| 1741 | /** |
||
| 1742 | * @return float |
||
| 1743 | */ |
||
| 1744 | 2 | public function getStarRatingAverage() : ?float |
|
| 1748 | |||
| 1749 | /** |
||
| 1750 | * @param float $starRatingAverage |
||
| 1751 | * @return MediaInterface |
||
| 1752 | */ |
||
| 1753 | 3 | public function setStarRatingAverage(?float $starRatingAverage) : MediaInterface |
|
| 1759 | |||
| 1760 | /** |
||
| 1761 | * @return int |
||
| 1762 | */ |
||
| 1763 | 2 | public function getStarRatingCount() : ?int |
|
| 1767 | |||
| 1768 | /** |
||
| 1769 | * @param int $starRatingCount |
||
| 1770 | * @return MediaInterface |
||
| 1771 | */ |
||
| 1772 | 3 | public function setStarRatingCount(?int $starRatingCount) : MediaInterface |
|
| 1778 | |||
| 1779 | /** |
||
| 1780 | * @return int |
||
| 1781 | */ |
||
| 1782 | 2 | public function getStarRatingMin() : ?int |
|
| 1786 | |||
| 1787 | /** |
||
| 1788 | * @param int $starRatingMin |
||
| 1789 | * @return MediaInterface |
||
| 1790 | */ |
||
| 1791 | 3 | public function setStarRatingMin(?int $starRatingMin) : MediaInterface |
|
| 1797 | |||
| 1798 | /** |
||
| 1799 | * @return int |
||
| 1800 | */ |
||
| 1801 | 2 | public function getStarRatingMax() : ?int |
|
| 1805 | |||
| 1806 | /** |
||
| 1807 | * @param int $starRatingMax |
||
| 1808 | * @return MediaInterface |
||
| 1809 | */ |
||
| 1810 | 3 | public function setStarRatingMax(?int $starRatingMax) : MediaInterface |
|
| 1816 | |||
| 1817 | /** |
||
| 1818 | * @return int |
||
| 1819 | */ |
||
| 1820 | 2 | public function getNbViews() : ?int |
|
| 1824 | |||
| 1825 | /** |
||
| 1826 | * @param int $nbViews |
||
| 1827 | * @return MediaInterface |
||
| 1828 | */ |
||
| 1829 | 3 | public function setNbViews(?int $nbViews) : MediaInterface |
|
| 1835 | |||
| 1836 | /** |
||
| 1837 | * @return int |
||
| 1838 | */ |
||
| 1839 | 2 | public function getNbFavorites() : ?int |
|
| 1843 | |||
| 1844 | /** |
||
| 1845 | * @param int $nbFavorites |
||
| 1846 | * @return MediaInterface |
||
| 1847 | */ |
||
| 1848 | 3 | public function setNbFavorites(?int $nbFavorites) : MediaInterface |
|
| 1854 | |||
| 1855 | /** |
||
| 1856 | * @return array |
||
| 1857 | */ |
||
| 1858 | 2 | public function getTags() : array |
|
| 1862 | |||
| 1863 | /** |
||
| 1864 | * @param array $tags |
||
| 1865 | * @return MediaInterface |
||
| 1866 | */ |
||
| 1867 | 3 | public function setTags(array $tags) : MediaInterface |
|
| 1873 | |||
| 1874 | /** |
||
| 1875 | * @return array |
||
| 1876 | */ |
||
| 1877 | 2 | public function getComments() : array |
|
| 1881 | |||
| 1882 | /** |
||
| 1883 | * @param array $comments |
||
| 1884 | * @return MediaInterface |
||
| 1885 | */ |
||
| 1886 | 2 | public function setComments(array $comments) : MediaInterface |
|
| 1892 | |||
| 1893 | |||
| 1894 | /** |
||
| 1895 | * @return string |
||
| 1896 | */ |
||
| 1897 | 2 | public function getEmbedUrl() : ?string |
|
| 1901 | |||
| 1902 | /** |
||
| 1903 | * @param string $embedUrl |
||
| 1904 | * @return MediaInterface |
||
| 1905 | */ |
||
| 1906 | 2 | public function setEmbedUrl(?string $embedUrl) : MediaInterface |
|
| 1912 | |||
| 1913 | /** |
||
| 1914 | * @return int |
||
| 1915 | */ |
||
| 1916 | 2 | public function getEmbedWidth() : ?int |
|
| 1920 | |||
| 1921 | /** |
||
| 1922 | * @param int $embedWidth |
||
| 1923 | * @return MediaInterface |
||
| 1924 | */ |
||
| 1925 | 2 | public function setEmbedWidth(?int $embedWidth) : MediaInterface |
|
| 1931 | |||
| 1932 | /** |
||
| 1933 | * @return int |
||
| 1934 | */ |
||
| 1935 | 2 | public function getEmbedHeight() : ?int |
|
| 1939 | |||
| 1940 | /** |
||
| 1941 | * @param int $embedHeight |
||
| 1942 | * @return MediaInterface |
||
| 1943 | */ |
||
| 1944 | 2 | public function setEmbedHeight(?int $embedHeight) : MediaInterface |
|
| 1950 | |||
| 1951 | /** |
||
| 1952 | * @return array |
||
| 1953 | */ |
||
| 1954 | 2 | public function getEmbedParams() : array |
|
| 1958 | |||
| 1959 | /** |
||
| 1960 | * @param array $embedParams |
||
| 1961 | * @return MediaInterface |
||
| 1962 | */ |
||
| 1963 | 2 | public function setEmbedParams(array $embedParams) : MediaInterface |
|
| 1969 | |||
| 1970 | /** |
||
| 1971 | * @return array |
||
| 1972 | */ |
||
| 1973 | 2 | public function getResponses() : array |
|
| 1977 | |||
| 1978 | /** |
||
| 1979 | * @param array $responses |
||
| 1980 | * @return MediaInterface |
||
| 1981 | */ |
||
| 1982 | 2 | public function setResponses(array $responses) : MediaInterface |
|
| 1988 | |||
| 1989 | /** |
||
| 1990 | * @return array |
||
| 1991 | */ |
||
| 1992 | 2 | public function getBacklinks() : array |
|
| 1996 | |||
| 1997 | /** |
||
| 1998 | * @param array $backlinks |
||
| 1999 | * @return MediaInterface |
||
| 2000 | */ |
||
| 2001 | 2 | public function setBacklinks(array $backlinks) : MediaInterface |
|
| 2007 | |||
| 2008 | /** |
||
| 2009 | * @return int |
||
| 2010 | */ |
||
| 2011 | 2 | public function getStatus() : ?int |
|
| 2015 | |||
| 2016 | /** |
||
| 2017 | * @param int $status |
||
| 2018 | * @return MediaInterface |
||
| 2019 | */ |
||
| 2020 | 2 | public function setStatus(?int $status) : MediaInterface |
|
| 2026 | |||
| 2027 | /** |
||
| 2028 | * @return string |
||
| 2029 | */ |
||
| 2030 | 2 | public function getStatusReason() : ?string |
|
| 2034 | |||
| 2035 | /** |
||
| 2036 | * @param string $statusReason |
||
| 2037 | * @return MediaInterface |
||
| 2038 | */ |
||
| 2039 | 2 | public function setStatusReason(?string $statusReason) : MediaInterface |
|
| 2045 | |||
| 2046 | /** |
||
| 2047 | * @return string |
||
| 2048 | */ |
||
| 2049 | 1 | public function getLicense() : ?string |
|
| 2053 | |||
| 2054 | /** |
||
| 2055 | * @param string $license |
||
| 2056 | * @return MediaInterface |
||
| 2057 | */ |
||
| 2058 | 1 | public function setLicense(?string $license) : MediaInterface |
|
| 2064 | |||
| 2065 | /** |
||
| 2066 | * @return string |
||
| 2067 | */ |
||
| 2068 | 1 | public function getLicenseUrl() : ?string |
|
| 2072 | |||
| 2073 | /** |
||
| 2074 | * @param string $licenseUrl |
||
| 2075 | * @return MediaInterface |
||
| 2076 | */ |
||
| 2077 | 1 | public function setLicenseUrl(?string $licenseUrl) : MediaInterface |
|
| 2083 | |||
| 2084 | /** |
||
| 2085 | * @return string |
||
| 2086 | */ |
||
| 2087 | 1 | public function getLicenseType() : ?string |
|
| 2091 | |||
| 2092 | /** |
||
| 2093 | * @param string $licenseType |
||
| 2094 | * @return MediaInterface |
||
| 2095 | */ |
||
| 2096 | 1 | public function setLicenseType(?string $licenseType) : MediaInterface |
|
| 2102 | |||
| 2103 | /** |
||
| 2104 | * @return string |
||
| 2105 | */ |
||
| 2106 | 1 | public function getPeerLink() : ?string |
|
| 2110 | |||
| 2111 | /** |
||
| 2112 | * @param string $peerLink |
||
| 2113 | * @return MediaInterface |
||
| 2114 | */ |
||
| 2115 | 1 | public function setPeerLink(?string $peerLink) : MediaInterface |
|
| 2121 | |||
| 2122 | /** |
||
| 2123 | * @return string |
||
| 2124 | */ |
||
| 2125 | 1 | public function getPeerLinkType() : ?string |
|
| 2129 | |||
| 2130 | /** |
||
| 2131 | * @param string $peerLinkType |
||
| 2132 | * @return MediaInterface |
||
| 2133 | */ |
||
| 2134 | 1 | public function setPeerLinkType(?string $peerLinkType) : MediaInterface |
|
| 2140 | |||
| 2141 | /** |
||
| 2142 | * @return array |
||
| 2143 | */ |
||
| 2144 | 2 | public function getCredits() : array |
|
| 2148 | |||
| 2149 | /** |
||
| 2150 | * @param array $credits |
||
| 2151 | * @return MediaInterface |
||
| 2152 | */ |
||
| 2153 | 2 | public function setCredits(array $credits) : MediaInterface |
|
| 2159 | |||
| 2160 | /** |
||
| 2161 | * @return array |
||
| 2162 | */ |
||
| 2163 | 2 | public function getTexts() : array |
|
| 2167 | |||
| 2168 | /** |
||
| 2169 | * @param array $texts |
||
| 2170 | * @return MediaInterface |
||
| 2171 | */ |
||
| 2172 | 2 | public function setTexts(array $texts) : MediaInterface |
|
| 2178 | |||
| 2179 | /** |
||
| 2180 | * @return array |
||
| 2181 | */ |
||
| 2182 | 2 | public function getPrices() : array |
|
| 2186 | |||
| 2187 | /** |
||
| 2188 | * @param array $prices |
||
| 2189 | * @return MediaInterface |
||
| 2190 | */ |
||
| 2191 | 2 | public function setPrices(array $prices) : MediaInterface |
|
| 2197 | |||
| 2198 | /** |
||
| 2199 | * @return array |
||
| 2200 | */ |
||
| 2201 | 1 | public function getSubTitles() : array |
|
| 2205 | |||
| 2206 | /** |
||
| 2207 | * @param array $subTitles |
||
| 2208 | * @return MediaInterface |
||
| 2209 | */ |
||
| 2210 | 1 | public function setSubTitles(array $subTitles) : MediaInterface |
|
| 2216 | |||
| 2217 | /** |
||
| 2218 | * @return array |
||
| 2219 | */ |
||
| 2220 | 1 | public function getScenes() : array |
|
| 2224 | |||
| 2225 | /** |
||
| 2226 | * @param array $scenes |
||
| 2227 | * @return MediaInterface |
||
| 2228 | */ |
||
| 2229 | 1 | public function setScenes(array $scenes) : MediaInterface |
|
| 2235 | |||
| 2236 | /** |
||
| 2237 | * @return bool |
||
| 2238 | */ |
||
| 2239 | 2 | public function isDefault() : bool |
|
| 2243 | |||
| 2244 | /** |
||
| 2245 | * @param bool $default |
||
| 2246 | * @return MediaInterface |
||
| 2247 | */ |
||
| 2248 | 1 | public function setDefault(bool $default) : MediaInterface |
|
| 2254 | } |
||
| 2255 |
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.