From 253071404e11fc6cd543774ac199581fbbd16818 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Dorn?= Date: Wed, 26 May 2021 11:20:13 +0200 Subject: [PATCH] rename rule->add to rule->save --- README.md | 2 +- src/Rule.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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);