Rector StringableForToStringRector

This commit is contained in:
Adrien Crivelli
2023-09-12 15:50:10 +08:00
parent b881309496
commit e65e46db43
14 changed files with 30 additions and 14 deletions
@@ -7,8 +7,9 @@ use PhpOffice\PhpSpreadsheet\Calculation\Exception;
use PhpOffice\PhpSpreadsheet\Cell\Cell;
use PhpOffice\PhpSpreadsheet\Cell\Coordinate;
use PhpOffice\PhpSpreadsheet\Worksheet\Table;
use Stringable;
final class StructuredReference implements Operand
final class StructuredReference implements Operand, Stringable
{
public const NAME = 'Structured Reference';
+2 -1
View File
@@ -14,8 +14,9 @@ use PhpOffice\PhpSpreadsheet\Style\NumberFormat;
use PhpOffice\PhpSpreadsheet\Style\Style;
use PhpOffice\PhpSpreadsheet\Worksheet\Table;
use PhpOffice\PhpSpreadsheet\Worksheet\Worksheet;
use Stringable;
class Cell
class Cell implements Stringable
{
/**
* Value binder to use.
+2 -1
View File
@@ -4,8 +4,9 @@ namespace PhpOffice\PhpSpreadsheet\Cell;
use PhpOffice\PhpSpreadsheet\Exception;
use PhpOffice\PhpSpreadsheet\Worksheet\Worksheet;
use Stringable;
class CellAddress
class CellAddress implements Stringable
{
protected ?Worksheet $worksheet;
+2 -1
View File
@@ -4,8 +4,9 @@ namespace PhpOffice\PhpSpreadsheet\Cell;
use PhpOffice\PhpSpreadsheet\Exception;
use PhpOffice\PhpSpreadsheet\Worksheet\Worksheet;
use Stringable;
class CellRange implements AddressRange
class CellRange implements AddressRange, Stringable
{
/**
* @var CellAddress
+2 -1
View File
@@ -3,8 +3,9 @@
namespace PhpOffice\PhpSpreadsheet\Cell;
use PhpOffice\PhpSpreadsheet\Worksheet\Worksheet;
use Stringable;
class ColumnRange implements AddressRange
class ColumnRange implements AddressRange, Stringable
{
protected ?Worksheet $worksheet;
+2 -1
View File
@@ -3,8 +3,9 @@
namespace PhpOffice\PhpSpreadsheet\Cell;
use PhpOffice\PhpSpreadsheet\Worksheet\Worksheet;
use Stringable;
class RowRange implements AddressRange
class RowRange implements AddressRange, Stringable
{
protected ?Worksheet $worksheet;
+2 -1
View File
@@ -9,8 +9,9 @@ use PhpOffice\PhpSpreadsheet\Shared\Drawing as SharedDrawing;
use PhpOffice\PhpSpreadsheet\Style\Alignment;
use PhpOffice\PhpSpreadsheet\Style\Color;
use PhpOffice\PhpSpreadsheet\Worksheet\Drawing;
use Stringable;
class Comment implements IComparable
class Comment implements IComparable, Stringable
{
/**
* Author.
+3 -1
View File
@@ -2,7 +2,9 @@
namespace PhpOffice\PhpSpreadsheet\Helper;
class Size
use Stringable;
class Size implements Stringable
{
const REGEXP_SIZE_VALIDATION = '/^(?P<size>\d*\.?\d+)(?P<unit>pt|px|em)?$/i';
+2 -1
View File
@@ -5,8 +5,9 @@ namespace PhpOffice\PhpSpreadsheet\RichText;
use PhpOffice\PhpSpreadsheet\Cell\Cell;
use PhpOffice\PhpSpreadsheet\Cell\DataType;
use PhpOffice\PhpSpreadsheet\IComparable;
use Stringable;
class RichText implements IComparable
class RichText implements IComparable, Stringable
{
/**
* Rich text elements.
@@ -2,7 +2,9 @@
namespace PhpOffice\PhpSpreadsheet\Style\NumberFormat\Wizard;
abstract class DateTimeWizard implements Wizard
use Stringable;
abstract class DateTimeWizard implements Stringable, Wizard
{
protected const NO_ESCAPING_NEEDED = "$+-/():!^&'~{}<>= ";
@@ -5,8 +5,9 @@ namespace PhpOffice\PhpSpreadsheet\Style\NumberFormat\Wizard;
use NumberFormatter;
use PhpOffice\PhpSpreadsheet\Exception;
use PhpOffice\PhpSpreadsheet\Style\NumberFormat;
use Stringable;
abstract class NumberBase
abstract class NumberBase implements Stringable
{
protected const MAX_DECIMALS = 30;
+2 -1
View File
@@ -12,8 +12,9 @@ use PhpOffice\PhpSpreadsheet\Cell\Coordinate;
use PhpOffice\PhpSpreadsheet\Exception;
use PhpOffice\PhpSpreadsheet\Shared\Date;
use PhpOffice\PhpSpreadsheet\Worksheet\AutoFilter\Column\Rule;
use Stringable;
class AutoFilter
class AutoFilter implements Stringable
{
/**
* Autofilter Worksheet.
+2 -1
View File
@@ -9,8 +9,9 @@ use PhpOffice\PhpSpreadsheet\Exception as PhpSpreadsheetException;
use PhpOffice\PhpSpreadsheet\Shared\StringHelper;
use PhpOffice\PhpSpreadsheet\Spreadsheet;
use PhpOffice\PhpSpreadsheet\Worksheet\Table\TableStyle;
use Stringable;
class Table
class Table implements Stringable
{
/**
* Table Name.
@@ -6,8 +6,9 @@ namespace PhpOffice\PhpSpreadsheetTests\Calculation\Functions;
use PhpOffice\PhpSpreadsheet\Cell\CellAddress;
use PhpOffice\PhpSpreadsheet\Worksheet\Worksheet;
use Stringable;
class FormulaArguments
class FormulaArguments implements Stringable
{
/**
* @var mixed[]