Move source files directly under src/ directory

This commit is contained in:
Yassine Guedidi
2024-02-19 00:39:48 +01:00
parent 804261bc26
commit a37b385c23
190 changed files with 19 additions and 21 deletions

View File

@ -0,0 +1,23 @@
<?php
namespace Wallabag\CoreBundle\Operator\PHP;
/**
* Provides a "~" operator used for ignore origin rules.
*
* It asserts that a subject matches a given regexp pattern, in a
* case-insensitive way.
*
* This operator will be used to compile ignore origin rules in PHP, usable
* directly on Entry objects for instance.
* It's registered in RulerZ using a service;
*/
class PatternMatches
{
public function __invoke($subject, $pattern)
{
$count = preg_match("`$pattern`i", $subject);
return \is_int($count) && $count > 0;
}
}