Skip to content

Commit 3eb083c

Browse files
committed
Dev: Define the exception.
1 parent adbfbf7 commit 3eb083c

File tree

2 files changed

+21
-5
lines changed

2 files changed

+21
-5
lines changed

system/Pager/Exceptions/PagerException.php

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,22 @@
1515

1616
class PagerException extends FrameworkException
1717
{
18-
public static function forInvalidTemplate(?string $template = null): self
18+
/**
19+
* Throws when the template is invalid.
20+
*
21+
* @return static
22+
*/
23+
public static function forInvalidTemplate(?string $template = null)
1924
{
2025
return new static(lang('Pager.invalidTemplate', [$template]));
2126
}
2227

23-
public static function forInvalidPaginationGroup(?string $group = null): self
28+
/**
29+
* Throws when the group is invalid.
30+
*
31+
* @return static
32+
*/
33+
public static function forInvalidPaginationGroup(?string $group = null)
2434
{
2535
return new static(lang('Pager.invalidPaginationGroup', [$group]));
2636
}

system/Publisher/Exceptions/PublisherException.php

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,24 +25,30 @@ class PublisherException extends FrameworkException
2525
*
2626
* @param string $from The source file
2727
* @param string $to The destination file
28+
*
29+
* @return static
2830
*/
29-
public static function forCollision(string $from, string $to): self
31+
public static function forCollision(string $from, string $to)
3032
{
3133
return new static(lang('Publisher.collision', [filetype($to), $from, $to]));
3234
}
3335

3436
/**
3537
* Throws when given a destination that is not in the list of allowed directories.
38+
*
39+
* @return static
3640
*/
37-
public static function forDestinationNotAllowed(string $destination): self
41+
public static function forDestinationNotAllowed(string $destination)
3842
{
3943
return new static(lang('Publisher.destinationNotAllowed', [$destination]));
4044
}
4145

4246
/**
4347
* Throws when a file fails to match the allowed pattern for its destination.
48+
*
49+
* @return static
4450
*/
45-
public static function forFileNotAllowed(string $file, string $directory, string $pattern): self
51+
public static function forFileNotAllowed(string $file, string $directory, string $pattern)
4652
{
4753
return new static(lang('Publisher.fileNotAllowed', [$file, $directory, $pattern]));
4854
}

0 commit comments

Comments
 (0)