File tree Expand file tree Collapse file tree 2 files changed +4
-9
lines changed Expand file tree Collapse file tree 2 files changed +4
-9
lines changed Original file line number Diff line number Diff line change @@ -114,14 +114,6 @@ public function hasAttributes(): bool
114
114
return !empty ($ this ->toArray ());
115
115
}
116
116
117
- /**
118
- * @return Meta
119
- */
120
- public function getDataMeta (): Meta
121
- {
122
- return $ this ->meta ;
123
- }
124
-
125
117
/**
126
118
* @return array
127
119
*/
@@ -150,6 +142,9 @@ public function getRelationships(): array
150
142
'type ' => $ relation ->getIncluded ()->getType (),
151
143
'id ' => $ relation ->getIncluded ()->getId (),
152
144
];
145
+ if ($ relation ->getIncluded ()->getMeta ()) {
146
+ $ relationships [$ name ]['data ' ]['meta ' ] = $ relation ->getIncluded ()->getMeta ();
147
+ }
153
148
}
154
149
} elseif ($ relation instanceof ManyRelationInterface) {
155
150
$ relationships [$ name ]['data ' ] = [];
Original file line number Diff line number Diff line change @@ -657,7 +657,7 @@ public function itParsesMetaInData()
657
657
658
658
$ item = $ parser ->parse ($ this ->getJsonApiItemMock ('master ' , '1 ' ));
659
659
660
- $ dataMeta = $ item ->getRelation ('childwithdatameta ' )->getIncluded ()->getDataMeta ();
660
+ $ dataMeta = $ item ->getRelation ('childwithdatameta ' )->getIncluded ()->getMeta ();
661
661
static ::assertInstanceOf (Meta::class, $ dataMeta );
662
662
663
663
$ image = $ dataMeta ->imageDerivatives ->links ->header ->href ;
You can’t perform that action at this time.
0 commit comments