Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Apply AddAllowDynamicPropertiesAttributeRector
  • Loading branch information
peter279k committed Apr 20, 2023
commit 6bc26ec768bb2f0854ddf098c42ed9f084ddc697
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
strategy:
matrix:
operating-system: [ubuntu-latest]
php-versions: ['7.2', '7.3', '7.4', '8.0', '8.1']
php-versions: ['7.2', '7.3', '7.4', '8.0', '8.1', '8.2']
name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }}

steps:
Expand Down
1 change: 1 addition & 0 deletions src/Ansi/Colors.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
*
* @author Yo-An Lin <[email protected]>
*/
#[\AllowDynamicProperties]
class Colors
{
public const CODE_PATTERN = '#\033\[\d{0,1}[,;]?\d*(?:;\d2)?m#x';
Expand Down
1 change: 1 addition & 0 deletions src/Ansi/CursorControl.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
/**
* @codeCoverageIgnore
*/
#[\AllowDynamicProperties]
class CursorControl
{
protected $fd;
Expand Down
1 change: 1 addition & 0 deletions src/ArgInfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
namespace CLIFramework;
use CLIFramework\ValueCollection;

#[\AllowDynamicProperties]
class ArgInfo
{
public $name;
Expand Down
1 change: 1 addition & 0 deletions src/ArgInfoList.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
use ArrayIterator;
use ArrayObject;

#[\AllowDynamicProperties]
class ArgInfoList extends ArrayObject {

public function add($name) {
Expand Down
1 change: 1 addition & 0 deletions src/ArgumentEditor/ArgumentEditor.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace CLIFramework\ArgumentEditor;

#[\AllowDynamicProperties]
class ArgumentEditor
{
public $args = array();
Expand Down
1 change: 1 addition & 0 deletions src/Autoload/ComposerAutoloadGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
use Symfony\Component\ClassLoader\ClassMapGenerator;
use CLIFramework\Logger;

#[\AllowDynamicProperties]
class ComposerAutoloadGenerator
{
/**
Expand Down
1 change: 1 addition & 0 deletions src/Buffer.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

// TODO: refactoring this to a standalone package.

#[\AllowDynamicProperties]
class Buffer {
public $content = '';

Expand Down
1 change: 1 addition & 0 deletions src/Chooser.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
*
*
*/
#[\AllowDynamicProperties]
class Chooser
{

Expand Down
1 change: 1 addition & 0 deletions src/Command/BuildGitHubWikiTopicsCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
use RecursiveIteratorIterator;
use Exception;

#[\AllowDynamicProperties]
class BuildGitHubWikiTopicsCommand extends Command
{
public function brief()
Expand Down
1 change: 1 addition & 0 deletions src/Command/CompileCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
* {{Halt Compiler}}
* {{Content Section}}
*/
#[\AllowDynamicProperties]
class CompileCommand extends Command
{
public function options($opts)
Expand Down
1 change: 1 addition & 0 deletions src/Command/HelpCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
use CLIFramework\OptionPrinter;
use CLIFramework\Corrector;

#[\AllowDynamicProperties]
class HelpCommand extends Command implements CommandInterface
{
/**
Expand Down
4 changes: 4 additions & 0 deletions src/Command/MetaCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,17 @@
use Exception;
use InvalidArgumentException;

#[\AllowDynamicProperties]
class UnsupportedShellException extends Exception
{
}

#[\AllowDynamicProperties]
class UndefinedArgumentException extends Exception
{
}

#[\AllowDynamicProperties]
class UndefinedOptionException extends Exception
{
public $options;
Expand Down Expand Up @@ -101,6 +104,7 @@ function encode_array_as_shell_string($array)
}
}

#[\AllowDynamicProperties]
class MetaCommand extends Command
{
public function brief()
Expand Down
1 change: 1 addition & 0 deletions src/Command/ZshCompletionCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
use CLIFramework\CommandInterface;
use CLIFramework\Completion\ZshGenerator;

#[\AllowDynamicProperties]
class ZshCompletionCommand extends Command implements CommandInterface
{
public function brief()
Expand Down
1 change: 1 addition & 0 deletions src/CommandAutoloader.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* @method __construct
* @method autoload
*/
#[\AllowDynamicProperties]
class CommandAutoloader
{
/** @var \CLIFramework\CommandBase */
Expand Down
1 change: 1 addition & 0 deletions src/CommandBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
*
* register subcommands.
*/
#[\AllowDynamicProperties]
abstract class CommandBase
implements ArrayAccess, IteratorAggregate, CommandInterface
{
Expand Down
1 change: 1 addition & 0 deletions src/CommandException.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
namespace CLIFramework;
use Exception;

#[\AllowDynamicProperties]
class CommandException extends Exception { }
1 change: 1 addition & 0 deletions src/CommandGroup.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
use CLIFramework\Command;
use CLIFramework\CommandBase;

#[\AllowDynamicProperties]
class CommandGroup
{
public $id;
Expand Down
1 change: 1 addition & 0 deletions src/CommandLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
use CLIFramework\Exception\CommandClassNotFoundException;
use Exception;

#[\AllowDynamicProperties]
class CommandLoader
{
public $namespaces = array();
Expand Down
1 change: 1 addition & 0 deletions src/Completion/BashGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ function command_signature_suffix(CommandBase $command) {
// return str_replace('.','_', $command->getSignature());
}

#[\AllowDynamicProperties]
class BashGenerator
{
public $app;
Expand Down
1 change: 1 addition & 0 deletions src/Completion/Utils.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?php
namespace CLIFramework\Completion;

#[\AllowDynamicProperties]
class Utils
{

Expand Down
1 change: 1 addition & 0 deletions src/Completion/ZshGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ function zsh_comp_desc_array(array $array) {
}


#[\AllowDynamicProperties]
class ZshGenerator
{
public $app;
Expand Down
1 change: 1 addition & 0 deletions src/CompletionUtils.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?php
namespace CLIFramework;

#[\AllowDynamicProperties]
class CompletionUtils
{
public static function split_words($line) {
Expand Down
1 change: 1 addition & 0 deletions src/Component/Progress/ETACalculator.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?php
namespace CLIFramework\Component\Progress;

#[\AllowDynamicProperties]
class ETACalculator
{
static public function calculateRemainingSeconds($proceeded, $total, $start, $now)
Expand Down
1 change: 1 addition & 0 deletions src/Component/Progress/ProgressBar.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ class LaserProgressBarStyle extends ProgressBarStyle
public $barCharacter = '#';
}

#[\AllowDynamicProperties]
class ProgressBar implements ProgressReporter
{
protected $terminalWidth = 78;
Expand Down
1 change: 1 addition & 0 deletions src/Component/Progress/ProgressBarStyle.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use CLIFramework\ConsoleInfo\EnvConsoleInfo;
use CLIFramework\ConsoleInfo\ConsoleInfoFactory;

#[\AllowDynamicProperties]
class ProgressBarStyle
{
public $leftDecorator = "|";
Expand Down
1 change: 1 addition & 0 deletions src/Component/Progress/ProgressStar.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?php
namespace CLIFramework\Component\Progress;

#[\AllowDynamicProperties]
class ProgressStar implements ProgressReporter
{
public $stars = array('-','\\','|','/');
Expand Down
1 change: 1 addition & 0 deletions src/Component/Table/CellAttribute.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
namespace CLIFramework\Component\Table;
use CLIFramework\Ansi\Colors;

#[\AllowDynamicProperties]
class CellAttribute {

public const ALIGN_RIGHT = 1;
Expand Down
1 change: 1 addition & 0 deletions src/Component/Table/DateFormatCell.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use IntlDateFormatter;
use DateTime;

#[\AllowDynamicProperties]
class DateFormatCell extends NumberFormatCell
{

Expand Down
1 change: 1 addition & 0 deletions src/Component/Table/DurationFormatCell.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
use CLIFramework\Component\Table\CellAttribute;
use NumberFormatter;

#[\AllowDynamicProperties]
class DurationFormatCell extends NumberFormatCell
{
public function __construct($locale) {
Expand Down
1 change: 1 addition & 0 deletions src/Component/Table/MarkdownTableStyle.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?php
namespace CLIFramework\Component\Table;

#[\AllowDynamicProperties]
class MarkdownTableStyle extends TableStyle
{
public $cellPadding = 1;
Expand Down
1 change: 1 addition & 0 deletions src/Component/Table/PercentFormatCell.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
use CLIFramework\Component\Table\CellAttribute;
use NumberFormatter;

#[\AllowDynamicProperties]
class DurationFormatCell extends NumberFormatCell
{
public function __construct($locale) {
Expand Down
1 change: 1 addition & 0 deletions src/Component/Table/SpellOutNumberFormatCell.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
use CLIFramework\Component\Table\CellAttribute;
use NumberFormatter;

#[\AllowDynamicProperties]
class SpellOutNumberFormatCell extends NumberFormatCell
{
public function __construct($locale) {
Expand Down
3 changes: 3 additions & 0 deletions src/Component/Table/Table.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,13 @@ interface Separator { }
/**
* RowSeparator is a slight separator for separating distinct rows...
*/
#[\AllowDynamicProperties]
class RowSeparator implements Separator { }

/**
* TableSeparator is more likely a section separator, the style is customizable.
*/
#[\AllowDynamicProperties]
class TableSeparator implements Separator { }

/**
Expand All @@ -24,6 +26,7 @@ class TableSeparator implements Separator { }
* - Support column wrapping if the cell text is too long.
* - Table style
*/
#[\AllowDynamicProperties]
class Table
{

Expand Down
1 change: 1 addition & 0 deletions src/Component/Table/TableStyle.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?php
namespace CLIFramework\Component\Table;

#[\AllowDynamicProperties]
class TableStyle
{
public $cellPadding = 1;
Expand Down
1 change: 1 addition & 0 deletions src/Config/GlobalConfig.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?php
namespace CLIFramework\Config;

#[\AllowDynamicProperties]
class GlobalConfig
{
/**
Expand Down
1 change: 1 addition & 0 deletions src/ConsoleInfo/ConsoleInfoFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
use CLIFramework\ConsoleInfo\EnvConsoleInfo;
use CLIFramework\ConsoleInfo\TputConsoleInfo;

#[\AllowDynamicProperties]
class ConsoleInfoFactory
{

Expand Down
1 change: 1 addition & 0 deletions src/ConsoleInfo/EnvConsoleInfo.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?php
namespace CLIFramework\ConsoleInfo;

#[\AllowDynamicProperties]
class EnvConsoleInfo implements ConsoleInfoInterface
{
public function getColumns()
Expand Down
1 change: 1 addition & 0 deletions src/ConsoleInfo/TputConsoleInfo.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?php
namespace CLIFramework\ConsoleInfo;

#[\AllowDynamicProperties]
class TputConsoleInfo implements ConsoleInfoInterface
{
public function getColumns()
Expand Down
1 change: 1 addition & 0 deletions src/Corrector.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
* @method guess
* @method match
*/
#[\AllowDynamicProperties]
class Corrector
{
protected $possibleTokens = array();
Expand Down
1 change: 1 addition & 0 deletions src/Debug/ConsoleDebug.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
use LazyRecord\BaseCollection;
use Exception;

#[\AllowDynamicProperties]
class ConsoleDebug
{
static public function dumpException(Exception $e)
Expand Down
1 change: 1 addition & 0 deletions src/Debug/LineIndicator.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?php
namespace CLIFramework\Debug;

#[\AllowDynamicProperties]
class LineIndicator
{
protected $contextLines = 4;
Expand Down
1 change: 1 addition & 0 deletions src/Exception/CommandArgumentNotEnoughException.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
use Exception;
use CLIFramework\CommandBase;

#[\AllowDynamicProperties]
class CommandArgumentNotEnoughException extends CommandBaseException
{
public $given;
Expand Down
1 change: 1 addition & 0 deletions src/Exception/CommandBaseException.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
use Exception;
use CLIFramework\CommandBase;

#[\AllowDynamicProperties]
class CommandBaseException extends Exception
{
public $command;
Expand Down
1 change: 1 addition & 0 deletions src/Exception/CommandClassNotFoundException.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
namespace CLIFramework\Exception;
use Exception;

#[\AllowDynamicProperties]
class CommandClassNotFoundException extends Exception
{
public $class;
Expand Down
1 change: 1 addition & 0 deletions src/Exception/CommandNotFoundException.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
use CLIFramework\CommandBase;
use CLIFramework\Exception\CommandBaseException;

#[\AllowDynamicProperties]
class CommandNotFoundException extends CommandBaseException
{
public $name;
Expand Down
Loading