1
0
Fork 0
mirror of https://github.com/wallabag/wallabag.git synced 2025-08-26 18:21:02 +00:00

Remove rulerz-php/doctrine-orm

This commit is contained in:
Yassine Guedidi 2025-03-07 00:35:17 +01:00
parent 8542edc4f1
commit ed2ad4776b
7 changed files with 3 additions and 126 deletions

View file

@ -1,25 +0,0 @@
<?php
namespace Wallabag\Operator\Doctrine;
/**
* Provides a "matches" operator used for tagging rules.
*
* It asserts that a given pattern is contained in a subject, in a
* case-insensitive way.
*
* This operator will be used to compile tagging rules in DQL, usable
* by Doctrine ORM.
* It's registered in RulerZ using a service;
*/
class Matches
{
public function __invoke($subject, $pattern)
{
if ("'" === $pattern[0]) {
$pattern = \sprintf("'%%%s%%'", substr($pattern, 1, -1));
}
return \sprintf('UPPER(%s) LIKE UPPER(%s)', $subject, $pattern);
}
}

View file

@ -1,25 +0,0 @@
<?php
namespace Wallabag\Operator\Doctrine;
/**
* Provides a "notmatches" operator used for tagging rules.
*
* It asserts that a given pattern is not contained in a subject, in a
* case-insensitive way.
*
* This operator will be used to compile tagging rules in DQL, usable
* by Doctrine ORM.
* It's registered in RulerZ using a service;
*/
class NotMatches
{
public function __invoke($subject, $pattern)
{
if ("'" === $pattern[0]) {
$pattern = \sprintf("'%%%s%%'", substr($pattern, 1, -1));
}
return \sprintf('UPPER(%s) NOT LIKE UPPER(%s)', $subject, $pattern);
}
}