Reformat code automatically

This commit is contained in:
Meritoo
2022-02-12 14:46:47 +01:00
parent a3af138f0c
commit a3adae50b8
116 changed files with 19152 additions and 19091 deletions

View File

@@ -20,13 +20,28 @@ use Meritoo\Common\Type\OopVisibilityType;
* @copyright Meritoo <http://www.meritoo.pl>
*
* @internal
* @covers \Meritoo\Common\Exception\Regex\IncorrectColorHexLengthException
* @covers \Meritoo\Common\Exception\Regex\IncorrectColorHexLengthException
*/
class IncorrectColorHexLengthExceptionTest extends BaseTestCase
{
public function testConstructorVisibilityAndArguments()
/**
* Provides incorrect hexadecimal value of color and expected exception's message
*
* @return Generator
*/
public function provideColor()
{
static::assertConstructorVisibilityAndArguments(IncorrectColorHexLengthException::class, OopVisibilityType::IS_PUBLIC, 3);
$template = 'Length of hexadecimal value of color \'%s\' is incorrect. It\'s %d, but it should be 3 or 6. Is there everything ok?';
yield [
'',
sprintf($template, '', strlen('')),
];
yield [
'aa-bb-cc',
sprintf($template, 'aa-bb-cc', strlen('aa-bb-cc')),
];
}
/**
@@ -41,23 +56,8 @@ class IncorrectColorHexLengthExceptionTest extends BaseTestCase
static::assertSame($expectedMessage, $exception->getMessage());
}
/**
* Provides incorrect hexadecimal value of color and expected exception's message
*
* @return Generator
*/
public function provideColor()
public function testConstructorVisibilityAndArguments()
{
$template = 'Length of hexadecimal value of color \'%s\' is incorrect. It\'s %d, but it should be 3 or 6. Is there everything ok?';
yield[
'',
sprintf($template, '', strlen('')),
];
yield[
'aa-bb-cc',
sprintf($template, 'aa-bb-cc', strlen('aa-bb-cc')),
];
static::assertConstructorVisibilityAndArguments(IncorrectColorHexLengthException::class, OopVisibilityType::IS_PUBLIC, 3);
}
}

View File

@@ -20,13 +20,28 @@ use Meritoo\Common\Type\OopVisibilityType;
* @copyright Meritoo <http://www.meritoo.pl>
*
* @internal
* @covers \Meritoo\Common\Exception\Regex\InvalidColorHexValueException
* @covers \Meritoo\Common\Exception\Regex\InvalidColorHexValueException
*/
class InvalidColorHexValueExceptionTest extends BaseTestCase
{
public function testConstructorVisibilityAndArguments()
/**
* Provides invalid hexadecimal value of color and expected exception's message
*
* @return Generator
*/
public function provideColor()
{
static::assertConstructorVisibilityAndArguments(InvalidColorHexValueException::class, OopVisibilityType::IS_PUBLIC, 3);
$template = 'Hexadecimal value of color \'%s\' is invalid. Is there everything ok?';
yield [
'',
sprintf($template, ''),
];
yield [
'aa-bb-cc',
sprintf($template, 'aa-bb-cc'),
];
}
/**
@@ -41,23 +56,8 @@ class InvalidColorHexValueExceptionTest extends BaseTestCase
static::assertSame($expectedMessage, $exception->getMessage());
}
/**
* Provides invalid hexadecimal value of color and expected exception's message
*
* @return Generator
*/
public function provideColor()
public function testConstructorVisibilityAndArguments()
{
$template = 'Hexadecimal value of color \'%s\' is invalid. Is there everything ok?';
yield[
'',
sprintf($template, ''),
];
yield[
'aa-bb-cc',
sprintf($template, 'aa-bb-cc'),
];
static::assertConstructorVisibilityAndArguments(InvalidColorHexValueException::class, OopVisibilityType::IS_PUBLIC, 3);
}
}

View File

@@ -20,13 +20,33 @@ use Meritoo\Common\Type\OopVisibilityType;
* @copyright Meritoo <http://www.meritoo.pl>
*
* @internal
* @covers \Meritoo\Common\Exception\Regex\InvalidHtmlAttributesException
* @covers \Meritoo\Common\Exception\Regex\InvalidHtmlAttributesException
*/
class InvalidHtmlAttributesExceptionTest extends BaseTestCase
{
public function testConstructorVisibilityAndArguments()
/**
* Provides html attributes
*
* @return Generator
*/
public function provideHtmlAttributes()
{
static::assertConstructorVisibilityAndArguments(InvalidHtmlAttributesException::class, OopVisibilityType::IS_PUBLIC, 3);
$template = 'HTML attributes \'%s\' are invalid. Is there everything ok?';
yield [
'abc = def',
sprintf($template, 'abc = def'),
];
yield [
'abc = def ghi = jkl',
sprintf($template, 'abc = def ghi = jkl'),
];
yield [
'abc=def ghi=jkl',
sprintf($template, 'abc=def ghi=jkl'),
];
}
/**
@@ -41,28 +61,8 @@ class InvalidHtmlAttributesExceptionTest extends BaseTestCase
static::assertSame($expectedMessage, $exception->getMessage());
}
/**
* Provides html attributes
*
* @return Generator
*/
public function provideHtmlAttributes()
public function testConstructorVisibilityAndArguments()
{
$template = 'HTML attributes \'%s\' are invalid. Is there everything ok?';
yield[
'abc = def',
sprintf($template, 'abc = def'),
];
yield[
'abc = def ghi = jkl',
sprintf($template, 'abc = def ghi = jkl'),
];
yield[
'abc=def ghi=jkl',
sprintf($template, 'abc=def ghi=jkl'),
];
static::assertConstructorVisibilityAndArguments(InvalidHtmlAttributesException::class, OopVisibilityType::IS_PUBLIC, 3);
}
}

View File

@@ -20,13 +20,28 @@ use Meritoo\Common\Type\OopVisibilityType;
* @copyright Meritoo <http://www.meritoo.pl>
*
* @internal
* @covers \Meritoo\Common\Exception\Regex\InvalidUrlException
* @covers \Meritoo\Common\Exception\Regex\InvalidUrlException
*/
class InvalidUrlExceptionTest extends BaseTestCase
{
public function testConstructorVisibilityAndArguments()
/**
* Provides invalid url and expected exception's message
*
* @return Generator
*/
public function provideUrl()
{
static::assertConstructorVisibilityAndArguments(InvalidUrlException::class, OopVisibilityType::IS_PUBLIC, 3);
$template = 'Url \'%s\' is invalid. Is there everything ok?';
yield [
'aa/bb/cc',
sprintf($template, 'aa/bb/cc'),
];
yield [
'http:/images\show\car.jpg',
sprintf($template, 'http:/images\show\car.jpg'),
];
}
/**
@@ -41,23 +56,8 @@ class InvalidUrlExceptionTest extends BaseTestCase
static::assertSame($expectedMessage, $exception->getMessage());
}
/**
* Provides invalid url and expected exception's message
*
* @return Generator
*/
public function provideUrl()
public function testConstructorVisibilityAndArguments()
{
$template = 'Url \'%s\' is invalid. Is there everything ok?';
yield[
'aa/bb/cc',
sprintf($template, 'aa/bb/cc'),
];
yield[
'http:/images\show\car.jpg',
sprintf($template, 'http:/images\show\car.jpg'),
];
static::assertConstructorVisibilityAndArguments(InvalidUrlException::class, OopVisibilityType::IS_PUBLIC, 3);
}
}