File tree Expand file tree Collapse file tree 5 files changed +51
-3
lines changed
tests/lib/Unit/Validation/Rules Expand file tree Collapse file tree 5 files changed +51
-3
lines changed Original file line number Diff line number Diff line change 19
19
20
20
use Illuminate \Support \Collection ;
21
21
use InvalidArgumentException ;
22
+ use Neomerx \JsonApi \Contracts \Document \DocumentInterface ;
22
23
use function is_array ;
23
- use function is_null ;
24
24
use function is_string ;
25
- use Neomerx \JsonApi \Contracts \Document \DocumentInterface ;
26
25
27
26
/**
28
27
* Trait FindsManyResources
Original file line number Diff line number Diff line change @@ -71,7 +71,11 @@ public function except(string ...$except): self
71
71
}
72
72
73
73
/**
74
- * @return RelationshipRegistration
74
+ * Make the relationship read-only.
75
+ *
76
+ * This is a shorthand for only registering the `related` and `read` actions.
77
+ *
78
+ * @return $this
75
79
*/
76
80
public function readOnly (): self
77
81
{
Original file line number Diff line number Diff line change 1
1
<?php
2
+ /**
3
+ * Copyright 2019 Cloud Creativity Limited
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
2
17
3
18
namespace CloudCreativity \LaravelJsonApi \Rules ;
4
19
Original file line number Diff line number Diff line change 1
1
<?php
2
+ /**
3
+ * Copyright 2019 Cloud Creativity Limited
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
2
17
3
18
namespace CloudCreativity \LaravelJsonApi \Rules ;
4
19
Original file line number Diff line number Diff line change 1
1
<?php
2
+ /**
3
+ * Copyright 2019 Cloud Creativity Limited
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
2
17
3
18
namespace CloudCreativity \LaravelJsonApi \Tests \Unit \Validation \Rules ;
4
19
You can’t perform that action at this time.
0 commit comments