Conditions | 1 |
Paths | 1 |
Total Lines | 643 |
Code Lines | 418 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
Small methods make your code easier to understand, in particular if combined with a good name. Besides, if your method is small, finding a good name is usually much easier.
For example, if you find yourself adding comments to a method's body, this is usually a good sign to extract the commented part to a new method, and use the comment as a starting point when coming up with a good name for this new method.
Commonly applied refactorings include:
If many parameters/temporary variables are present:
1 | <?php |
||
732 | public function queryExpressionProvider() |
||
733 | { |
||
734 | yield 'Ascending forward start inclusive with QueryExpression' => [ |
||
735 | function () { |
||
736 | return [ |
||
737 | 'forward' => true, |
||
738 | 'seekable' => true, |
||
739 | 'limit' => 3, |
||
740 | 'order' => [ |
||
741 | new OrderClauseExpression('modified', 'asc'), |
||
742 | new OrderClauseExpression('id', 'asc'), |
||
743 | ], |
||
744 | ]; |
||
745 | }, |
||
746 | new PaginationResult( |
||
747 | [ |
||
748 | new Entity([ |
||
749 | 'id' => 1, |
||
750 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
751 | ]), |
||
752 | new Entity([ |
||
753 | 'id' => 3, |
||
754 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
755 | ]), |
||
756 | new Entity([ |
||
757 | 'id' => 5, |
||
758 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
759 | ]), |
||
760 | ], |
||
761 | [ |
||
762 | 'hasPrevious' => null, |
||
763 | 'previousCursor' => null, |
||
764 | 'hasNext' => true, |
||
765 | 'nextCursor' => [ |
||
766 | 'id' => 2, |
||
767 | 'modified' => new Time('2017-01-01 11:00:00'), |
||
768 | ], |
||
769 | ] |
||
770 | ), |
||
771 | ]; |
||
772 | |||
773 | yield 'Ascending forward start exclusive with QueryExpression' => [ |
||
774 | function () { |
||
775 | return [ |
||
776 | 'forward' => true, |
||
777 | 'seekable' => true, |
||
778 | 'exclusive' => true, |
||
779 | 'limit' => 3, |
||
780 | 'order' => [ |
||
781 | new OrderClauseExpression('modified', 'asc'), |
||
782 | new OrderClauseExpression('id', 'asc'), |
||
783 | ], |
||
784 | ]; |
||
785 | }, |
||
786 | new PaginationResult( |
||
787 | [ |
||
788 | new Entity([ |
||
789 | 'id' => 1, |
||
790 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
791 | ]), |
||
792 | new Entity([ |
||
793 | 'id' => 3, |
||
794 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
795 | ]), |
||
796 | new Entity([ |
||
797 | 'id' => 5, |
||
798 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
799 | ]), |
||
800 | ], |
||
801 | [ |
||
802 | 'hasPrevious' => null, |
||
803 | 'previousCursor' => null, |
||
804 | 'hasNext' => true, |
||
805 | 'nextCursor' => [ |
||
806 | 'id' => 5, |
||
807 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
808 | ], |
||
809 | ] |
||
810 | ), |
||
811 | ]; |
||
812 | |||
813 | yield 'Ascending forward inclusive with QueryExpression' => [ |
||
814 | function () { |
||
815 | return [ |
||
816 | 'forward' => true, |
||
817 | 'seekable' => true, |
||
818 | 'limit' => 3, |
||
819 | 'order' => [ |
||
820 | new OrderClauseExpression('modified', 'asc'), |
||
821 | new OrderClauseExpression('id', 'asc'), |
||
822 | ], |
||
823 | 'cursor' => [ |
||
824 | 'id' => 3, |
||
825 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
826 | ], |
||
827 | ]; |
||
828 | }, |
||
829 | new PaginationResult( |
||
830 | [ |
||
831 | new Entity([ |
||
832 | 'id' => 3, |
||
833 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
834 | ]), |
||
835 | new Entity([ |
||
836 | 'id' => 5, |
||
837 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
838 | ]), |
||
839 | new Entity([ |
||
840 | 'id' => 2, |
||
841 | 'modified' => new Time('2017-01-01 11:00:00'), |
||
842 | ]), |
||
843 | ], |
||
844 | [ |
||
845 | 'hasPrevious' => true, |
||
846 | 'previousCursor' => [ |
||
847 | 'id' => 1, |
||
848 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
849 | ], |
||
850 | 'hasNext' => true, |
||
851 | 'nextCursor' => [ |
||
852 | 'id' => 4, |
||
853 | 'modified' => new Time('2017-01-01 11:00:00'), |
||
854 | ], |
||
855 | ] |
||
856 | ), |
||
857 | ]; |
||
858 | |||
859 | yield 'Ascending forward exclusive with QueryExpression' => [ |
||
860 | function () { |
||
861 | return [ |
||
862 | 'forward' => true, |
||
863 | 'seekable' => true, |
||
864 | 'exclusive' => true, |
||
865 | 'limit' => 3, |
||
866 | 'order' => [ |
||
867 | new OrderClauseExpression('modified', 'asc'), |
||
868 | new OrderClauseExpression('id', 'asc'), |
||
869 | ], |
||
870 | 'cursor' => [ |
||
871 | 'id' => 3, |
||
872 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
873 | ], |
||
874 | ]; |
||
875 | }, |
||
876 | new PaginationResult( |
||
877 | [ |
||
878 | new Entity([ |
||
879 | 'id' => 5, |
||
880 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
881 | ]), |
||
882 | new Entity([ |
||
883 | 'id' => 2, |
||
884 | 'modified' => new Time('2017-01-01 11:00:00'), |
||
885 | ]), |
||
886 | new Entity([ |
||
887 | 'id' => 4, |
||
888 | 'modified' => new Time('2017-01-01 11:00:00'), |
||
889 | ]), |
||
890 | ], |
||
891 | [ |
||
892 | 'hasPrevious' => true, |
||
893 | 'previousCursor' => [ |
||
894 | 'id' => 5, |
||
895 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
896 | ], |
||
897 | 'hasNext' => false, |
||
898 | 'nextCursor' => null, |
||
899 | ] |
||
900 | ), |
||
901 | ]; |
||
902 | |||
903 | yield 'Ascending backward start inclusive with QueryExpression' => [ |
||
904 | function () { |
||
905 | return [ |
||
906 | 'backward' => true, |
||
907 | 'seekable' => true, |
||
908 | 'limit' => 3, |
||
909 | 'order' => [ |
||
910 | new OrderClauseExpression('modified', 'asc'), |
||
911 | new OrderClauseExpression('id', 'asc'), |
||
912 | ], |
||
913 | ]; |
||
914 | }, |
||
915 | new PaginationResult( |
||
916 | [ |
||
917 | new Entity([ |
||
918 | 'id' => 5, |
||
919 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
920 | ]), |
||
921 | new Entity([ |
||
922 | 'id' => 2, |
||
923 | 'modified' => new Time('2017-01-01 11:00:00'), |
||
924 | ]), |
||
925 | new Entity([ |
||
926 | 'id' => 4, |
||
927 | 'modified' => new Time('2017-01-01 11:00:00'), |
||
928 | ]), |
||
929 | ], |
||
930 | [ |
||
931 | 'hasPrevious' => true, |
||
932 | 'previousCursor' => [ |
||
933 | 'id' => 3, |
||
934 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
935 | ], |
||
936 | 'hasNext' => null, |
||
937 | 'nextCursor' => null, |
||
938 | ] |
||
939 | ), |
||
940 | ]; |
||
941 | |||
942 | yield 'Ascending backward start exclusive with QueryExpression' => [ |
||
943 | function () { |
||
944 | return [ |
||
945 | 'backward' => true, |
||
946 | 'seekable' => true, |
||
947 | 'exclusive' => true, |
||
948 | 'limit' => 3, |
||
949 | 'order' => [ |
||
950 | new OrderClauseExpression('modified', 'asc'), |
||
951 | new OrderClauseExpression('id', 'asc'), |
||
952 | ], |
||
953 | ]; |
||
954 | }, |
||
955 | new PaginationResult( |
||
956 | [ |
||
957 | new Entity([ |
||
958 | 'id' => 5, |
||
959 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
960 | ]), |
||
961 | new Entity([ |
||
962 | 'id' => 2, |
||
963 | 'modified' => new Time('2017-01-01 11:00:00'), |
||
964 | ]), |
||
965 | new Entity([ |
||
966 | 'id' => 4, |
||
967 | 'modified' => new Time('2017-01-01 11:00:00'), |
||
968 | ]), |
||
969 | ], |
||
970 | [ |
||
971 | 'hasPrevious' => true, |
||
972 | 'previousCursor' => [ |
||
973 | 'id' => 5, |
||
974 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
975 | ], |
||
976 | 'hasNext' => null, |
||
977 | 'nextCursor' => null, |
||
978 | ] |
||
979 | ), |
||
980 | ]; |
||
981 | |||
982 | yield 'Ascending backward inclusive with QueryExpression' => [ |
||
983 | function () { |
||
984 | return [ |
||
985 | 'backward' => true, |
||
986 | 'seekable' => true, |
||
987 | 'limit' => 3, |
||
988 | 'order' => [ |
||
989 | new OrderClauseExpression('modified', 'asc'), |
||
990 | new OrderClauseExpression('id', 'asc'), |
||
991 | ], |
||
992 | 'cursor' => [ |
||
993 | 'id' => 3, |
||
994 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
995 | ], |
||
996 | ]; |
||
997 | }, |
||
998 | new PaginationResult( |
||
999 | [ |
||
1000 | new Entity([ |
||
1001 | 'id' => 1, |
||
1002 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
1003 | ]), |
||
1004 | new Entity([ |
||
1005 | 'id' => 3, |
||
1006 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
1007 | ]), |
||
1008 | ], |
||
1009 | [ |
||
1010 | 'hasPrevious' => false, |
||
1011 | 'previousCursor' => null, |
||
1012 | 'hasNext' => true, |
||
1013 | 'nextCursor' => [ |
||
1014 | 'id' => 5, |
||
1015 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
1016 | ], |
||
1017 | ] |
||
1018 | ), |
||
1019 | ]; |
||
1020 | |||
1021 | yield 'Ascending backward exclusive with QueryExpression' => [ |
||
1022 | function () { |
||
1023 | return [ |
||
1024 | 'backward' => true, |
||
1025 | 'seekable' => true, |
||
1026 | 'exclusive' => true, |
||
1027 | 'limit' => 3, |
||
1028 | 'order' => [ |
||
1029 | new OrderClauseExpression('modified', 'asc'), |
||
1030 | new OrderClauseExpression('id', 'asc'), |
||
1031 | ], |
||
1032 | 'cursor' => [ |
||
1033 | 'id' => 3, |
||
1034 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
1035 | ], |
||
1036 | ]; |
||
1037 | }, |
||
1038 | new PaginationResult( |
||
1039 | [ |
||
1040 | new Entity([ |
||
1041 | 'id' => 1, |
||
1042 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
1043 | ]), |
||
1044 | ], |
||
1045 | [ |
||
1046 | 'hasPrevious' => false, |
||
1047 | 'previousCursor' => null, |
||
1048 | 'hasNext' => true, |
||
1049 | 'nextCursor' => [ |
||
1050 | 'id' => 1, |
||
1051 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
1052 | ], |
||
1053 | ] |
||
1054 | ), |
||
1055 | ]; |
||
1056 | |||
1057 | yield 'Descending forward start inclusive with QueryExpression' => [ |
||
1058 | function () { |
||
1059 | return [ |
||
1060 | 'forward' => true, |
||
1061 | 'seekable' => true, |
||
1062 | 'limit' => 3, |
||
1063 | 'order' => [ |
||
1064 | new OrderClauseExpression('modified', 'desc'), |
||
1065 | new OrderClauseExpression('id', 'desc'), |
||
1066 | ], |
||
1067 | ]; |
||
1068 | }, |
||
1069 | new PaginationResult( |
||
1070 | [ |
||
1071 | new Entity([ |
||
1072 | 'id' => 4, |
||
1073 | 'modified' => new Time('2017-01-01 11:00:00'), |
||
1074 | ]), |
||
1075 | new Entity([ |
||
1076 | 'id' => 2, |
||
1077 | 'modified' => new Time('2017-01-01 11:00:00'), |
||
1078 | ]), |
||
1079 | new Entity([ |
||
1080 | 'id' => 5, |
||
1081 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
1082 | ]), |
||
1083 | ], |
||
1084 | [ |
||
1085 | 'hasPrevious' => null, |
||
1086 | 'previousCursor' => null, |
||
1087 | 'hasNext' => true, |
||
1088 | 'nextCursor' => [ |
||
1089 | 'id' => 3, |
||
1090 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
1091 | ], |
||
1092 | ] |
||
1093 | ), |
||
1094 | ]; |
||
1095 | |||
1096 | yield 'Descending forward start exclusive with QueryExpression' => [ |
||
1097 | function () { |
||
1098 | return [ |
||
1099 | 'forward' => true, |
||
1100 | 'seekable' => true, |
||
1101 | 'exclusive' => true, |
||
1102 | 'limit' => 3, |
||
1103 | 'order' => [ |
||
1104 | new OrderClauseExpression('modified', 'desc'), |
||
1105 | new OrderClauseExpression('id', 'desc'), |
||
1106 | ], |
||
1107 | ]; |
||
1108 | }, |
||
1109 | new PaginationResult( |
||
1110 | [ |
||
1111 | new Entity([ |
||
1112 | 'id' => 4, |
||
1113 | 'modified' => new Time('2017-01-01 11:00:00'), |
||
1114 | ]), |
||
1115 | new Entity([ |
||
1116 | 'id' => 2, |
||
1117 | 'modified' => new Time('2017-01-01 11:00:00'), |
||
1118 | ]), |
||
1119 | new Entity([ |
||
1120 | 'id' => 5, |
||
1121 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
1122 | ]), |
||
1123 | ], |
||
1124 | [ |
||
1125 | 'hasPrevious' => null, |
||
1126 | 'previousCursor' => null, |
||
1127 | 'hasNext' => true, |
||
1128 | 'nextCursor' => [ |
||
1129 | 'id' => 5, |
||
1130 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
1131 | ], |
||
1132 | ] |
||
1133 | ), |
||
1134 | ]; |
||
1135 | |||
1136 | yield 'Descending forward inclusive with QueryExpression' => [ |
||
1137 | function () { |
||
1138 | return [ |
||
1139 | 'forward' => true, |
||
1140 | 'seekable' => true, |
||
1141 | 'limit' => 3, |
||
1142 | 'order' => [ |
||
1143 | new OrderClauseExpression('modified', 'desc'), |
||
1144 | new OrderClauseExpression('id', 'desc'), |
||
1145 | ], |
||
1146 | 'cursor' => [ |
||
1147 | 'id' => 3, |
||
1148 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
1149 | ], |
||
1150 | ]; |
||
1151 | }, |
||
1152 | new PaginationResult( |
||
1153 | [ |
||
1154 | new Entity([ |
||
1155 | 'id' => 3, |
||
1156 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
1157 | ]), |
||
1158 | new Entity([ |
||
1159 | 'id' => 1, |
||
1160 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
1161 | ]), |
||
1162 | ], |
||
1163 | [ |
||
1164 | 'hasPrevious' => true, |
||
1165 | 'previousCursor' => [ |
||
1166 | 'id' => 5, |
||
1167 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
1168 | ], |
||
1169 | 'hasNext' => false, |
||
1170 | 'nextCursor' => null, |
||
1171 | ] |
||
1172 | ), |
||
1173 | ]; |
||
1174 | |||
1175 | yield 'Descending forward exclusive with QueryExpression' => [ |
||
1176 | function () { |
||
1177 | return [ |
||
1178 | 'forward' => true, |
||
1179 | 'seekable' => true, |
||
1180 | 'exclusive' => true, |
||
1181 | 'limit' => 3, |
||
1182 | 'order' => [ |
||
1183 | new OrderClauseExpression('modified', 'desc'), |
||
1184 | new OrderClauseExpression('id', 'desc'), |
||
1185 | ], |
||
1186 | 'cursor' => [ |
||
1187 | 'id' => 3, |
||
1188 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
1189 | ], |
||
1190 | ]; |
||
1191 | }, |
||
1192 | new PaginationResult( |
||
1193 | [ |
||
1194 | new Entity([ |
||
1195 | 'id' => 1, |
||
1196 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
1197 | ]), |
||
1198 | ], |
||
1199 | [ |
||
1200 | 'hasPrevious' => true, |
||
1201 | 'previousCursor' => [ |
||
1202 | 'id' => 1, |
||
1203 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
1204 | ], |
||
1205 | 'hasNext' => false, |
||
1206 | 'nextCursor' => null, |
||
1207 | ] |
||
1208 | ), |
||
1209 | ]; |
||
1210 | |||
1211 | yield 'Descending backward start inclusive with QueryExpression' => [ |
||
1212 | function () { |
||
1213 | return [ |
||
1214 | 'backward' => true, |
||
1215 | 'seekable' => true, |
||
1216 | 'limit' => 3, |
||
1217 | 'order' => [ |
||
1218 | new OrderClauseExpression('modified', 'desc'), |
||
1219 | new OrderClauseExpression('id', 'desc'), |
||
1220 | ], |
||
1221 | ]; |
||
1222 | }, |
||
1223 | new PaginationResult( |
||
1224 | [ |
||
1225 | new Entity([ |
||
1226 | 'id' => 5, |
||
1227 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
1228 | ]), |
||
1229 | new Entity([ |
||
1230 | 'id' => 3, |
||
1231 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
1232 | ]), |
||
1233 | new Entity([ |
||
1234 | 'id' => 1, |
||
1235 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
1236 | ]), |
||
1237 | ], |
||
1238 | [ |
||
1239 | 'hasPrevious' => true, |
||
1240 | 'previousCursor' => [ |
||
1241 | 'id' => 2, |
||
1242 | 'modified' => new Time('2017-01-01 11:00:00'), |
||
1243 | ], |
||
1244 | 'hasNext' => null, |
||
1245 | 'nextCursor' => null, |
||
1246 | ] |
||
1247 | ), |
||
1248 | ]; |
||
1249 | |||
1250 | yield 'Descending backward start exclusive with QueryExpression' => [ |
||
1251 | function () { |
||
1252 | return [ |
||
1253 | 'backward' => true, |
||
1254 | 'seekable' => true, |
||
1255 | 'exclusive' => true, |
||
1256 | 'limit' => 3, |
||
1257 | 'order' => [ |
||
1258 | new OrderClauseExpression('modified', 'desc'), |
||
1259 | new OrderClauseExpression('id', 'desc'), |
||
1260 | ], |
||
1261 | ]; |
||
1262 | }, |
||
1263 | new PaginationResult( |
||
1264 | [ |
||
1265 | new Entity([ |
||
1266 | 'id' => 5, |
||
1267 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
1268 | ]), |
||
1269 | new Entity([ |
||
1270 | 'id' => 3, |
||
1271 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
1272 | ]), |
||
1273 | new Entity([ |
||
1274 | 'id' => 1, |
||
1275 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
1276 | ]), |
||
1277 | ], |
||
1278 | [ |
||
1279 | 'hasPrevious' => true, |
||
1280 | 'previousCursor' => [ |
||
1281 | 'id' => 5, |
||
1282 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
1283 | ], |
||
1284 | 'hasNext' => null, |
||
1285 | 'nextCursor' => null, |
||
1286 | ] |
||
1287 | ), |
||
1288 | ]; |
||
1289 | |||
1290 | yield 'Descending backward inclusive with QueryExpression' => [ |
||
1291 | function () { |
||
1292 | return [ |
||
1293 | 'backward' => true, |
||
1294 | 'seekable' => true, |
||
1295 | 'limit' => 3, |
||
1296 | 'order' => [ |
||
1297 | new OrderClauseExpression('modified', 'desc'), |
||
1298 | new OrderClauseExpression('id', 'desc'), |
||
1299 | ], |
||
1300 | 'cursor' => [ |
||
1301 | 'id' => 3, |
||
1302 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
1303 | ], |
||
1304 | ]; |
||
1305 | }, |
||
1306 | new PaginationResult( |
||
1307 | [ |
||
1308 | new Entity([ |
||
1309 | 'id' => 2, |
||
1310 | 'modified' => new Time('2017-01-01 11:00:00'), |
||
1311 | ]), |
||
1312 | new Entity([ |
||
1313 | 'id' => 5, |
||
1314 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
1315 | ]), |
||
1316 | new Entity([ |
||
1317 | 'id' => 3, |
||
1318 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
1319 | ]), |
||
1320 | ], |
||
1321 | [ |
||
1322 | 'hasPrevious' => true, |
||
1323 | 'previousCursor' => [ |
||
1324 | 'id' => 4, |
||
1325 | 'modified' => new Time('2017-01-01 11:00:00'), |
||
1326 | ], |
||
1327 | 'hasNext' => true, |
||
1328 | 'nextCursor' => [ |
||
1329 | 'id' => 1, |
||
1330 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
1331 | ], |
||
1332 | ] |
||
1333 | ), |
||
1334 | ]; |
||
1335 | |||
1336 | yield 'Descending backward exclusive with QueryExpression' => [ |
||
1337 | function () { |
||
1338 | return [ |
||
1339 | 'backward' => true, |
||
1340 | 'seekable' => true, |
||
1341 | 'exclusive' => true, |
||
1342 | 'limit' => 3, |
||
1343 | 'order' => [ |
||
1344 | new OrderClauseExpression('modified', 'desc'), |
||
1345 | new OrderClauseExpression('id', 'desc'), |
||
1346 | ], |
||
1347 | 'cursor' => [ |
||
1348 | 'id' => 3, |
||
1349 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
1350 | ], |
||
1351 | ]; |
||
1352 | }, |
||
1353 | new PaginationResult( |
||
1354 | [ |
||
1355 | new Entity([ |
||
1356 | 'id' => 4, |
||
1357 | 'modified' => new Time('2017-01-01 11:00:00'), |
||
1358 | ]), |
||
1359 | new Entity([ |
||
1360 | 'id' => 2, |
||
1361 | 'modified' => new Time('2017-01-01 11:00:00'), |
||
1362 | ]), |
||
1363 | new Entity([ |
||
1364 | 'id' => 5, |
||
1365 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
1366 | ]), |
||
1367 | ], |
||
1368 | [ |
||
1369 | 'hasPrevious' => false, |
||
1370 | 'previousCursor' => null, |
||
1371 | 'hasNext' => true, |
||
1372 | 'nextCursor' => [ |
||
1373 | 'id' => 5, |
||
1374 | 'modified' => new Time('2017-01-01 10:00:00'), |
||
1375 | ], |
||
1381 |