diff --git a/README.md b/README.md index 7d8ee8b..bd5ef9b 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/src/Rule.php b/src/Rule.php index 66d5abb..5e27e0a 100644 --- a/src/Rule.php +++ b/src/Rule.php @@ -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);