From fdd725f58cfe96d9bb9454d0347f6ff847fce69d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Thu, 20 Apr 2017 14:58:20 +0200 Subject: Added notmatches operator for tagging rule --- src/Wallabag/CoreBundle/Operator/PHP/NotMatches.php | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 src/Wallabag/CoreBundle/Operator/PHP/NotMatches.php (limited to 'src/Wallabag/CoreBundle/Operator/PHP/NotMatches.php') diff --git a/src/Wallabag/CoreBundle/Operator/PHP/NotMatches.php b/src/Wallabag/CoreBundle/Operator/PHP/NotMatches.php new file mode 100644 index 00000000..eecb43cc --- /dev/null +++ b/src/Wallabag/CoreBundle/Operator/PHP/NotMatches.php @@ -0,0 +1,21 @@ + Date: Sat, 22 Apr 2017 13:14:34 +0200 Subject: Fixed @j0k3r review --- src/Wallabag/CoreBundle/Operator/PHP/NotMatches.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Wallabag/CoreBundle/Operator/PHP/NotMatches.php') diff --git a/src/Wallabag/CoreBundle/Operator/PHP/NotMatches.php b/src/Wallabag/CoreBundle/Operator/PHP/NotMatches.php index eecb43cc..68b2676f 100644 --- a/src/Wallabag/CoreBundle/Operator/PHP/NotMatches.php +++ b/src/Wallabag/CoreBundle/Operator/PHP/NotMatches.php @@ -10,7 +10,7 @@ namespace Wallabag\CoreBundle\Operator\PHP; * * This operator will be used to compile tagging rules in PHP, usable * directly on Entry objects for instance. - * It's registered in RulerZ using a service (wallabag.operator.array.matches); + * It's registered in RulerZ using a service (wallabag.operator.array.notmatches); */ class NotMatches { -- cgit v1.2.3 From 3ef055ced3d6ea0d2f15ba660602545f477e9c3c Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Mon, 9 Oct 2017 16:47:15 +0200 Subject: CS --- src/Wallabag/CoreBundle/Operator/PHP/NotMatches.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Wallabag/CoreBundle/Operator/PHP/NotMatches.php') diff --git a/src/Wallabag/CoreBundle/Operator/PHP/NotMatches.php b/src/Wallabag/CoreBundle/Operator/PHP/NotMatches.php index 68b2676f..bd4d887a 100644 --- a/src/Wallabag/CoreBundle/Operator/PHP/NotMatches.php +++ b/src/Wallabag/CoreBundle/Operator/PHP/NotMatches.php @@ -16,6 +16,6 @@ class NotMatches { public function __invoke($subject, $pattern) { - return stripos($subject, $pattern) === false; + return false === stripos($subject, $pattern); } } -- cgit v1.2.3