Skip to content

Commit

Permalink
rename rule->add to rule->save
Browse files Browse the repository at this point in the history
  • Loading branch information
felixdorn committed May 26, 2021
1 parent e601924 commit 2530714
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ Rule::all();
use RWC\TwitterStream\Rule;

$rule = new Rule('cat has:image', 'cats with images');
$rule->add();
$rule->save();
```

If no tag is provided, the fallback is the rule content itself.
Expand Down
4 changes: 2 additions & 2 deletions src/Rule.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,12 @@ public static function useBearerToken(string $bearerToken): void
public static function create(string $name, ?string $tag = null): self
{
$rule = new self($name, $tag);
$rule->add();
$rule->save();

return $rule;
}

public function add(): array
public function save(): array
{
$results = static::addBulk($this);

Expand Down

0 comments on commit 2530714

Please sign in to comment.