File tree Expand file tree Collapse file tree 2 files changed +30
-1
lines changed Expand file tree Collapse file tree 2 files changed +30
-1
lines changed Original file line number Diff line number Diff line change 1+ <?php declare (strict_types=1 );
2+
3+ namespace Lkrms \Concept ;
4+
5+ use Lkrms \Concern \TCollection ;
6+ use Lkrms \Contract \ICollection ;
7+ use Lkrms \Contract \IImmutable ;
8+
9+ /**
10+ * Base class for collections of objects of an unenforced type
11+ *
12+ * Extend {@see TypedCollection} instead if type safety concerns outweigh
13+ * performance.
14+ *
15+ * @template TKey of array-key
16+ * @template TValue of object
17+ *
18+ * @implements ICollection<TKey,TValue>
19+ */
20+ abstract class LooselyTypedCollection implements ICollection, IImmutable
21+ {
22+ /**
23+ * @use TCollection<TKey,TValue>
24+ */
25+ use TCollection;
26+ }
Original file line number Diff line number Diff line change 88use LogicException ;
99
1010/**
11- * Base class for collections of objects of a given type
11+ * Base class for collections of objects of a strictly enforced type
12+ *
13+ * Extend {@see LooselyTypedCollection} instead if performance concerns outweigh
14+ * type safety.
1215 *
1316 * @template TKey of array-key
1417 * @template TValue of object
You can’t perform that action at this time.
0 commit comments