Skip to content

Commit cee39f3

Browse files
Add missing @throws tags
Where functions are already adjusted and `throws` tags are missing they are added
1 parent 0ca568a commit cee39f3

4 files changed

Lines changed: 10 additions & 0 deletions

File tree

src/ColumnDefinition.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ public function setLabel(?string $label): static
6262
* @param array $options
6363
*
6464
* @return static
65+
*
66+
* @throws InvalidArgumentException If the given options do not provide a name
6567
*/
6668
public static function fromArray(array $options): static
6769
{

src/Relation/BelongsToMany.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,8 @@ public function setThroughAlias(string $throughAlias): static
8585
* Get the junction model
8686
*
8787
* @return Model
88+
*
89+
* @throws LogicException If no through class is configured
8890
*/
8991
public function getThrough(): Model
9092
{

src/Relations.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,8 @@ public function getIterator(): Traversable
216216
* @param string $name
217217
*
218218
* @return void
219+
*
220+
* @throws InvalidArgumentException
219221
*/
220222
protected function assertRelationDoesNotYetExist(string $name): void
221223
{
@@ -228,6 +230,8 @@ protected function assertRelationDoesNotYetExist(string $name): void
228230
* Throw exception if a relation with the given name does not exist
229231
*
230232
* @param string $name
233+
*
234+
* @throws InvalidArgumentException
231235
*/
232236
protected function assertRelationExists(string $name): void
233237
{

src/Resolver.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -753,6 +753,8 @@ protected function collectColumns(Model $subject): void
753753
* @param Model $subject
754754
*
755755
* @return array
756+
*
757+
* @throws LogicException If a column definition's name differs from its array index
756758
*/
757759
protected function collectMetaData(Model $subject): array
758760
{

0 commit comments

Comments
 (0)