Automated native_function_invocation fixes

This commit is contained in:
drowe authored and Adrien Loison committed 2019-11-18 12:17:27 +01:00
1 parent 94b654175c
commit eb88bb4c3a
62 files changed
+237 -237

No files matched your search

+3 -3
View File
@@ -93,7 +93,7 @@ class BorderPart
*/
public function setName($name)
{
if (!in_array($name, self::$allowedNames)) {
if (!\in_array($name, self::$allowedNames)) {
throw new InvalidNameException($name);
}
$this->name = $name;
@@ -114,7 +114,7 @@ class BorderPart
*/
public function setStyle($style)
{
if (!in_array($style, self::$allowedStyles)) {
if (!\in_array($style, self::$allowedStyles)) {
throw new InvalidStyleException($style);
}
$this->style = $style;
@@ -152,7 +152,7 @@ class BorderPart
*/
public function setWidth($width)
{
if (!in_array($width, self::$allowedWidths)) {
if (!\in_array($width, self::$allowedWidths)) {
throw new InvalidWidthException($width);
}
$this->width = $width;
+3 -3
View File
@@ -38,7 +38,7 @@ abstract class Color
self::throwIfInvalidColorComponentValue($green);
self::throwIfInvalidColorComponentValue($blue);
return strtoupper(
return \strtoupper(
self::convertColorComponentToHex($red) .
self::convertColorComponentToHex($green) .
self::convertColorComponentToHex($blue)
@@ -54,7 +54,7 @@ abstract class Color
*/
protected static function throwIfInvalidColorComponentValue($colorComponent)
{
if (!is_int($colorComponent) || $colorComponent < 0 || $colorComponent > 255) {
if (!\is_int($colorComponent) || $colorComponent < 0 || $colorComponent > 255) {
throw new InvalidColorException("The RGB components must be between 0 and 255. Received: $colorComponent");
}
}
@@ -67,7 +67,7 @@ abstract class Color
*/
protected static function convertColorComponentToHex($colorComponent)
{
return str_pad(dechex($colorComponent), 2, '0', STR_PAD_LEFT);
return \str_pad(\dechex($colorComponent), 2, '0', STR_PAD_LEFT);
}
/**