Skip to content

Commit

Permalink
Fix bugs
Browse files Browse the repository at this point in the history
syntax error, unexpected 'new' (T_NEW), expecting identifier (T_STRING).
  • Loading branch information
JackieDo committed Mar 17, 2022
1 parent cdaec14 commit f1c64d0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ Always keep in mind that, if we use package methods via Facade, we are using it
*
* @return $this
*/
public function new();
public function reset();
```

**Example:**
Expand All @@ -413,8 +413,8 @@ public function new();
// Genrate one select box, exclude two groups of timezones, Asia and Africa
$selectBox = Timezonelist::excludeGroups(['Asia', 'Africa'])->toSelectBox('timezone');

$list1 = Timezonelist::toArray(); // Two groups, Asia and Africa, will not be loaded into the result
$list2 = Timezonelist::new()->toArray() // All groups will be loaded
$list1 = Timezonelist::toArray(); // Two groups, Asia and Africa, will not be loaded into the result
$list2 = Timezonelist::reset()->toArray() // All groups will be loaded
```

# Contributors
Expand Down
2 changes: 1 addition & 1 deletion src/Facades/Timezonelist.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* @method static \Jackiedo\Timezonelist\Timezonelist excludeGroups(array $groups=[]) Set the filter of the groups do not want to get.
* @method static \Jackiedo\Timezonelist\Timezonelist splitGroup(bool $status=true) Decide whether to split group or not.
* @method statis \Jackiedo\Timezonelist\Timezonelist showOffset(bool $status=true) Decide whether to show the offset or not.
* @method static \Jackiedo\Timezonelist\Timezonelist new() Return new static to reset all config.
* @method static \Jackiedo\Timezonelist\Timezonelist reset() Return new static to reset all config.
* @method static string toSelectBox(string $name, null|string $selected=null, null|array|string $attrs=null, bool $htmlencode=true) Create a select box of timezones.
* @method static string create(string $name, null|string $selected=null, null|array|string $attrs=null, bool $htmlencode=true) Alias of the `toSelectBox()` method.
* @method static array toArray(bool $htmlencode=true) Create an array of timezones.
Expand Down
2 changes: 1 addition & 1 deletion src/Timezonelist.php
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ public function showOffset($status = true)
*
* @return $this
*/
public function new()
public function reset()
{
return new static;
}
Expand Down

0 comments on commit f1c64d0

Please sign in to comment.