Skip to content

Commit

Permalink
Rename classes (support PHP 7.0).
Browse files Browse the repository at this point in the history
  • Loading branch information
romeOz committed May 20, 2015
1 parent e9d7fe6 commit f039472
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 24 deletions.
32 changes: 16 additions & 16 deletions src/Sanitize.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@
use rock\helpers\Instance;
use rock\sanitize\rules\Abs;
use rock\sanitize\rules\BasicTags;
use rock\sanitize\rules\Boolean;
use rock\sanitize\rules\BooleanRule;
use rock\sanitize\rules\Call;
use rock\sanitize\rules\Decode;
use rock\sanitize\rules\DefaultRule;
use rock\sanitize\rules\Email;
use rock\sanitize\rules\Encode;
use rock\sanitize\rules\Float;
use rock\sanitize\rules\Int;
use rock\sanitize\rules\FloatRule;
use rock\sanitize\rules\IntRule;
use rock\sanitize\rules\Lowercase;
use rock\sanitize\rules\LowerFirst;
use rock\sanitize\rules\LtrimWords;
Expand All @@ -30,7 +30,7 @@
use rock\sanitize\rules\Rule;
use rock\sanitize\rules\RemoveScript;
use rock\sanitize\rules\RemoveTags;
use rock\sanitize\rules\String;
use rock\sanitize\rules\StringRule;
use rock\sanitize\rules\ToType;
use rock\sanitize\rules\Slug;
use rock\sanitize\rules\Trim;
Expand All @@ -45,11 +45,11 @@
*
* @method static Sanitize attributes($attributes)
* @method static Sanitize recursive(bool $recursive = true)
* @method static Sanitize labelRemainder(string $label = '*')
* @method static Sanitize labelRemainder(StringRule $label = '*')
* @method static Sanitize rules(array $rules)
*
* @method static Sanitize abs()
* @method static Sanitize basicTags(string $allowedTags = '')
* @method static Sanitize basicTags(StringRule $allowedTags = '')
* @method static Sanitize bool()
* @method static Sanitize call(callable $call, array $args = null)
* @method static Sanitize decode()
Expand All @@ -62,21 +62,21 @@
* @method static Sanitize lowerFirst()
* @method static Sanitize ltrimWords(array $words)
* @method static Sanitize negative()
* @method static Sanitize noiseWords(string $enNoiseWords = '')
* @method static Sanitize noiseWords(StringRule $enNoiseWords = '')
* @method static Sanitize numbers()
* @method static Sanitize positive()
* @method static Sanitize specialChars()
* @method static Sanitize removeScript()
* @method static Sanitize removeTags()
* @method static Sanitize replaceRandChars(string $replaceTo = '*')
* @method static Sanitize round(int $precision = 0)
* @method static Sanitize replaceRandChars(StringRule $replaceTo = '*')
* @method static Sanitize round(IntRule $precision = 0)
* @method static Sanitize rtrimWords(array $words)
* @method static Sanitize string()
* @method static Sanitize toType()
* @method static Sanitize slug(string $replacement = '-', bool $lowercase = true)
* @method static Sanitize slug(StringRule $replacement = '-', bool $lowercase = true)
* @method static Sanitize trim()
* @method static Sanitize truncate(int $length = 4, string $suffix = '...')
* @method static Sanitize truncateWords(int $length = 100, string $suffix = '...')
* @method static Sanitize truncate(IntRule $length = 4, StringRule $suffix = '...')
* @method static Sanitize truncateWords(IntRule $length = 100, StringRule $suffix = '...')
* @method static Sanitize unserialize()
* @method static Sanitize uppercase()
* @method static Sanitize upperFirst()
Expand Down Expand Up @@ -224,14 +224,14 @@ protected function defaultRules()
return [
'abs' => Abs::className(),
'basicTags' => BasicTags::className(),
'bool' => Boolean::className(),
'bool' => BooleanRule::className(),
'call' => Call::className(),
'decode' => Decode::className(),
'defaultValue' => DefaultRule::className(),
'email' => Email::className(),
'encode' => Encode::className(),
'float' => Float::className(),
'int' => Int::className(),
'float' => FloatRule::className(),
'int' => IntRule::className(),
'lowercase' => Lowercase::className(),
'lowerFirst' => LowerFirst::className(),
'ltrimWords' => LtrimWords::className(),
Expand All @@ -245,7 +245,7 @@ protected function defaultRules()
'replaceRandChars' => ReplaceRandChars::className(),
'round' => Round::className(),
'rtrimWords' => RtrimWords::className(),
'string' => String::className(),
'string' => StringRule::className(),
'toType' => ToType::className(),
'slug' => Slug::className(),
'trim' => Trim::className(),
Expand Down
2 changes: 1 addition & 1 deletion src/rules/Boolean.php → src/rules/BooleanRule.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace rock\sanitize\rules;


class Boolean extends Rule
class BooleanRule extends Rule
{
/**
* @inheritdoc
Expand Down
2 changes: 1 addition & 1 deletion src/rules/Float.php → src/rules/FloatRule.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace rock\sanitize\rules;


class Float extends Rule
class FloatRule extends Rule
{
/**
* @inheritdoc
Expand Down
2 changes: 1 addition & 1 deletion src/rules/Int.php → src/rules/IntRule.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace rock\sanitize\rules;


class Int extends Rule
class IntRule extends Rule
{
/**
* @inheritdoc
Expand Down
2 changes: 1 addition & 1 deletion src/rules/String.php → src/rules/StringRule.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace rock\sanitize\rules;


class String extends Rule
class StringRule extends Rule
{
/**
* @inheritdoc
Expand Down
2 changes: 1 addition & 1 deletion tests/BooleanTest.php → tests/BooleanRuleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

use rock\sanitize\Sanitize;

class BooleanTest extends \PHPUnit_Framework_TestCase
class BooleanRuleTest extends \PHPUnit_Framework_TestCase
{
public function test_()
{
Expand Down
2 changes: 1 addition & 1 deletion tests/FloatTest.php → tests/FloatRuleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

use rock\sanitize\Sanitize;

class FloatTest extends \PHPUnit_Framework_TestCase
class FloatRuleTest extends \PHPUnit_Framework_TestCase
{
public function testFloat()
{
Expand Down
2 changes: 1 addition & 1 deletion tests/intTest.php → tests/IntRuleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

use rock\sanitize\Sanitize;

class IntTest extends \PHPUnit_Framework_TestCase
class IntRuleTest extends \PHPUnit_Framework_TestCase
{
public function testInt()
{
Expand Down
2 changes: 1 addition & 1 deletion tests/StringTest.php → tests/StringRuleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

use rock\sanitize\Sanitize;

class StringTest extends \PHPUnit_Framework_TestCase
class StringRuleTest extends \PHPUnit_Framework_TestCase
{
public function testString()
{
Expand Down

0 comments on commit f039472

Please sign in to comment.