Skip to content

Commit c54376c

Browse files
committed
Renamed notEmpty into isNotEmpty, fixed class name of IsEmpty
1 parent 8849833 commit c54376c

File tree

9 files changed

+14
-13
lines changed

9 files changed

+14
-13
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ $match = $matcher->match("lorem ipsum dolor", "@string@")
5252
* ``isDateTime()``
5353
* ``isEmail()``
5454
* ``isUrl()``
55-
* ``notEmpty()``
5655
* ``isEmpty()``
56+
* ``isNotEmpty()``
5757
* ``lowerThan($boundry)``
5858
* ``greaterThan($boundry)``
5959
* ``inArray($value)``

UPGRADE.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
* ``Coduo\PHPMatcher\Matcher\CaptureMatcher`` was removed
55
* ``Coduo\PHPMatcher\Matcher\TypeMatcher`` was removed
66
* ``Coduo\PHPMatcher\Matcher\PropertyMatcher`` interface was remved
7-
* Removed ``match`` function
7+
* Removed ``match`` function, use PHPMatcher facade instead
8+
* Renamed ``@[email protected]()`` expander into ``@[email protected]()``
89

910
# Upgrade from 1.0 to 1.1
1011

src/Coduo/PHPMatcher/Matcher/Pattern/Expander/isEmpty.php renamed to src/Coduo/PHPMatcher/Matcher/Pattern/Expander/IsEmpty.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
use Coduo\PHPMatcher\Matcher\Pattern\PatternExpander;
66
use Coduo\ToString\StringConverter;
77

8-
final class isEmpty implements PatternExpander
8+
final class IsEmpty implements PatternExpander
99
{
1010
private $error;
1111

src/Coduo/PHPMatcher/Matcher/Pattern/Expander/NotEmpty.php renamed to src/Coduo/PHPMatcher/Matcher/Pattern/Expander/IsNotEmpty.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
use Coduo\PHPMatcher\Matcher\Pattern\PatternExpander;
66
use Coduo\ToString\StringConverter;
77

8-
final class NotEmpty implements PatternExpander
8+
final class IsNotEmpty implements PatternExpander
99
{
1010
private $error;
1111

src/Coduo/PHPMatcher/Parser/ExpanderInitializer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ final class ExpanderInitializer
1717
private $expanderDefinitions = array(
1818
"startsWith" => "Coduo\\PHPMatcher\\Matcher\\Pattern\\Expander\\StartsWith",
1919
"endsWith" => "Coduo\\PHPMatcher\\Matcher\\Pattern\\Expander\\EndsWith",
20-
"notEmpty" => "Coduo\\PHPMatcher\\Matcher\\Pattern\\Expander\\NotEmpty",
20+
"isNotEmpty" => "Coduo\\PHPMatcher\\Matcher\\Pattern\\Expander\\IsNotEmpty",
2121
"isEmpty" => "Coduo\\PHPMatcher\\Matcher\\Pattern\\Expander\\IsEmpty",
2222
"isDateTime" => "Coduo\\PHPMatcher\\Matcher\\Pattern\\Expander\\IsDateTime",
2323
"isEmail" => "Coduo\\PHPMatcher\\Matcher\\Pattern\\Expander\\IsEmail",

tests/Coduo/PHPMatcher/Matcher/Pattern/Expander/isEmptyTest.php renamed to tests/Coduo/PHPMatcher/Matcher/Pattern/Expander/IsEmptyTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22

33
namespace Coduo\PHPMatcher\Tests\Matcher\Pattern\Expander;
44

5-
use Coduo\PHPMatcher\Matcher\Pattern\Expander\isEmpty;
5+
use Coduo\PHPMatcher\Matcher\Pattern\Expander\IsEmpty;
66

77
/**
88
* @author Benjamin Lazarecki <[email protected]>
99
*/
10-
class isEmptyTest extends \PHPUnit_Framework_TestCase
10+
class IsEmptyTest extends \PHPUnit_Framework_TestCase
1111
{
1212
/**
1313
* @dataProvider examplesProvider

tests/Coduo/PHPMatcher/Matcher/Pattern/Expander/NotEmptyTest.php renamed to tests/Coduo/PHPMatcher/Matcher/Pattern/Expander/IsNotEmptyTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@
33
namespace Coduo\PHPMatcher\Tests\Matcher\Pattern\Expander;
44

55
use Coduo\PHPMatcher\Matcher;
6-
use Coduo\PHPMatcher\Matcher\Pattern\Expander\NotEmpty;
6+
use Coduo\PHPMatcher\Matcher\Pattern\Expander\IsNotEmpty;
77

8-
class NotEmptyTest extends \PHPUnit_Framework_TestCase
8+
class IsNotEmptyTest extends \PHPUnit_Framework_TestCase
99
{
1010
/**
1111
* @dataProvider examplesProvider
1212
*/
1313
public function test_examples_not_ignoring_case($value, $expectedResult)
1414
{
15-
$expander = new NotEmpty();
15+
$expander = new IsNotEmpty();
1616
$this->assertEquals($expectedResult, $expander->match($value));
1717
}
1818

tests/Coduo/PHPMatcher/Matcher/StringMatcherTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public static function positiveMatchData()
7070
{
7171
return array(
7272
array("lorem ipsum", "@string@"),
73-
array("lorem ipsum", "@string@.notEmpty()"),
73+
array("lorem ipsum", "@string@.isNotEmpty()"),
7474
array("lorem ipsum", "@[email protected]('lorem')"),
7575
array("lorem ipsum", "@[email protected]('ipsum')"),
7676
array("lorem ipsum dolor", "@[email protected]('lorem').contains('ipsum').endsWith('dolor')"),

tests/Coduo/PHPMatcher/MatcherTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,8 +238,8 @@ public static function expanderExamples()
238238
array("lorem ipsum", "@[email protected]()", false),
239239
array("2014-08-19", "@[email protected]()", true),
240240
array(100, "@[email protected](101).greaterThan(10)", true),
241-
array("", "@string@.notEmpty()", false),
242-
array("lorem ipsum", "@string@.notEmpty()", true),
241+
array("", "@string@.isNotEmpty()", false),
242+
array("lorem ipsum", "@string@.isNotEmpty()", true),
243243
array("", "@[email protected]()", true),
244244
array(array("foo", "bar"), "@[email protected](\"bar\")", true),
245245
array(array(), "@[email protected]()", true),

0 commit comments

Comments
 (0)