repo stringlengths 7 63 | file_url stringlengths 81 284 | file_path stringlengths 5 200 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 15:02:33 2026-01-05 05:24:06 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/src/Rule/ControlStructureSpacing.php | src/Rule/ControlStructureSpacing.php | <?php declare(strict_types=1);
namespace Lkrms\PrettyPHP\Rule;
use Lkrms\PrettyPHP\Catalog\TokenData as Data;
use Lkrms\PrettyPHP\Catalog\TokenFlag as Flag;
use Lkrms\PrettyPHP\Catalog\WhitespaceFlag as Space;
use Lkrms\PrettyPHP\Concern\TokenRuleTrait;
use Lkrms\PrettyPHP\Contract\TokenRule;
use Lkrms\PrettyPHP\Abst... | php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/src/Rule/PreserveOneLineStatements.php | src/Rule/PreserveOneLineStatements.php | <?php declare(strict_types=1);
namespace Lkrms\PrettyPHP\Rule;
use Lkrms\PrettyPHP\Catalog\WhitespaceFlag as Space;
use Lkrms\PrettyPHP\Concern\StatementRuleTrait;
use Lkrms\PrettyPHP\Contract\StatementRule;
use Lkrms\PrettyPHP\Token;
/**
* Suppress newlines between tokens in statements and control structures that
... | php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/src/Rule/AlignData.php | src/Rule/AlignData.php | <?php declare(strict_types=1);
namespace Lkrms\PrettyPHP\Rule;
use Lkrms\PrettyPHP\Catalog\TokenFlag as Flag;
use Lkrms\PrettyPHP\Concern\BlockRuleTrait;
use Lkrms\PrettyPHP\Contract\BlockRule;
use Lkrms\PrettyPHP\Token;
/**
* Align consecutive assignment operators, "=>" delimiters in array syntax, and
* "=>" deli... | php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/src/Rule/AlignTernaryOperators.php | src/Rule/AlignTernaryOperators.php | <?php declare(strict_types=1);
namespace Lkrms\PrettyPHP\Rule;
use Lkrms\PrettyPHP\Catalog\TokenData as Data;
use Lkrms\PrettyPHP\Catalog\TokenFlag as Flag;
use Lkrms\PrettyPHP\Concern\TokenRuleTrait;
use Lkrms\PrettyPHP\Contract\TokenRule;
use Lkrms\PrettyPHP\AbstractTokenIndex;
use Lkrms\PrettyPHP\Token;
use Lkrms\... | php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/src/Rule/AlignLists.php | src/Rule/AlignLists.php | <?php declare(strict_types=1);
namespace Lkrms\PrettyPHP\Rule;
use Lkrms\PrettyPHP\Catalog\TokenFlag as Flag;
use Lkrms\PrettyPHP\Concern\ListRuleTrait;
use Lkrms\PrettyPHP\Contract\ListRule;
use Lkrms\PrettyPHP\Internal\TokenCollection;
use Lkrms\PrettyPHP\Token;
use Lkrms\PrettyPHP\TokenUtil;
/**
* Align argument... | php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/src/Rule/PreserveNewlines.php | src/Rule/PreserveNewlines.php | <?php declare(strict_types=1);
namespace Lkrms\PrettyPHP\Rule;
use Lkrms\PrettyPHP\Catalog\TokenData as Data;
use Lkrms\PrettyPHP\Catalog\TokenFlag as Flag;
use Lkrms\PrettyPHP\Catalog\WhitespaceFlag as Space;
use Lkrms\PrettyPHP\Concern\TokenRuleTrait;
use Lkrms\PrettyPHP\Contract\TokenRule;
use Lkrms\PrettyPHP\Abst... | php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/src/Rule/AlignComments.php | src/Rule/AlignComments.php | <?php declare(strict_types=1);
namespace Lkrms\PrettyPHP\Rule;
use Lkrms\PrettyPHP\Catalog\TokenFlag as Flag;
use Lkrms\PrettyPHP\Catalog\TokenFlagMask as Mask;
use Lkrms\PrettyPHP\Concern\BlockRuleTrait;
use Lkrms\PrettyPHP\Contract\BlockRule;
use Lkrms\PrettyPHP\Token;
/**
* Align comments beside code
*
* @api
... | php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/src/Rule/IndexSpacing.php | src/Rule/IndexSpacing.php | <?php declare(strict_types=1);
namespace Lkrms\PrettyPHP\Rule;
use Lkrms\PrettyPHP\Catalog\TokenFlag as Flag;
use Lkrms\PrettyPHP\Catalog\WhitespaceFlag as Space;
use Lkrms\PrettyPHP\Concern\TokenRuleTrait;
use Lkrms\PrettyPHP\Contract\TokenRule;
use Lkrms\PrettyPHP\AbstractTokenIndex;
/**
* Apply whitespace to tok... | php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/src/Rule/FormatHeredocs.php | src/Rule/FormatHeredocs.php | <?php declare(strict_types=1);
namespace Lkrms\PrettyPHP\Rule;
use Lkrms\PrettyPHP\Catalog\HeredocIndent;
use Lkrms\PrettyPHP\Concern\TokenRuleTrait;
use Lkrms\PrettyPHP\Contract\TokenRule;
use Lkrms\PrettyPHP\AbstractTokenIndex;
use Lkrms\PrettyPHP\Token;
/**
* Apply indentation to heredocs and nowdocs
*
* @api
... | php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/src/Rule/SemiStrictExpressions.php | src/Rule/SemiStrictExpressions.php | <?php declare(strict_types=1);
namespace Lkrms\PrettyPHP\Rule;
use Lkrms\PrettyPHP\Catalog\TokenData as Data;
use Lkrms\PrettyPHP\Catalog\WhitespaceFlag as Space;
use Lkrms\PrettyPHP\Concern\TokenRuleTrait;
use Lkrms\PrettyPHP\Contract\TokenRule;
use Lkrms\PrettyPHP\Internal\TokenCollection;
use Lkrms\PrettyPHP\Abstr... | php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/src/Rule/NormaliseNumbers.php | src/Rule/NormaliseNumbers.php | <?php declare(strict_types=1);
namespace Lkrms\PrettyPHP\Rule;
use Lkrms\PrettyPHP\Concern\TokenRuleTrait;
use Lkrms\PrettyPHP\Contract\TokenRule;
use Lkrms\PrettyPHP\AbstractTokenIndex;
use Salient\Utility\Exception\ShouldNotHappenException;
use Salient\Utility\Regex;
use Salient\Utility\Str;
/**
* Normalise integ... | php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/src/Rule/OperatorSpacing.php | src/Rule/OperatorSpacing.php | <?php declare(strict_types=1);
namespace Lkrms\PrettyPHP\Rule;
use Lkrms\PrettyPHP\Catalog\TokenData as Data;
use Lkrms\PrettyPHP\Catalog\TokenFlag as Flag;
use Lkrms\PrettyPHP\Catalog\WhitespaceFlag as Space;
use Lkrms\PrettyPHP\Concern\TokenRuleTrait;
use Lkrms\PrettyPHP\Contract\TokenRule;
use Lkrms\PrettyPHP\Abst... | php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/src/Rule/BlankBeforeReturn.php | src/Rule/BlankBeforeReturn.php | <?php declare(strict_types=1);
namespace Lkrms\PrettyPHP\Rule;
use Lkrms\PrettyPHP\Catalog\TokenFlag as Flag;
use Lkrms\PrettyPHP\Concern\TokenRuleTrait;
use Lkrms\PrettyPHP\Contract\TokenRule;
use Lkrms\PrettyPHP\AbstractTokenIndex;
/**
* Add blank lines before return statements
*
* @api
*/
final class BlankBef... | php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/src/Rule/ProtectStrings.php | src/Rule/ProtectStrings.php | <?php declare(strict_types=1);
namespace Lkrms\PrettyPHP\Rule;
use Lkrms\PrettyPHP\Catalog\TokenData as Data;
use Lkrms\PrettyPHP\Catalog\WhitespaceFlag as Space;
use Lkrms\PrettyPHP\Concern\TokenRuleTrait;
use Lkrms\PrettyPHP\Contract\TokenRule;
use Lkrms\PrettyPHP\AbstractTokenIndex;
use Lkrms\PrettyPHP\Token;
/**... | php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/src/Rule/DeclarationSpacing.php | src/Rule/DeclarationSpacing.php | <?php declare(strict_types=1);
namespace Lkrms\PrettyPHP\Rule;
use Lkrms\PrettyPHP\Catalog\DeclarationType as Type;
use Lkrms\PrettyPHP\Catalog\TokenData as Data;
use Lkrms\PrettyPHP\Catalog\TokenFlag as Flag;
use Lkrms\PrettyPHP\Catalog\WhitespaceFlag as Space;
use Lkrms\PrettyPHP\Concern\DeclarationRuleTrait;
use L... | php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/src/Rule/AlignArrowFunctions.php | src/Rule/AlignArrowFunctions.php | <?php declare(strict_types=1);
namespace Lkrms\PrettyPHP\Rule;
use Lkrms\PrettyPHP\Catalog\TokenFlag as Flag;
use Lkrms\PrettyPHP\Concern\TokenRuleTrait;
use Lkrms\PrettyPHP\Contract\TokenRule;
use Lkrms\PrettyPHP\AbstractTokenIndex;
use Lkrms\PrettyPHP\Token;
/**
* Align arrow function expressions with their defin... | php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/src/Rule/AlignChains.php | src/Rule/AlignChains.php | <?php declare(strict_types=1);
namespace Lkrms\PrettyPHP\Rule;
use Lkrms\PrettyPHP\Catalog\TokenData as Data;
use Lkrms\PrettyPHP\Catalog\TokenFlag as Flag;
use Lkrms\PrettyPHP\Catalog\WhitespaceFlag as Space;
use Lkrms\PrettyPHP\Concern\TokenRuleTrait;
use Lkrms\PrettyPHP\Contract\TokenRule;
use Lkrms\PrettyPHP\Abst... | php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/src/Rule/StandardIndentation.php | src/Rule/StandardIndentation.php | <?php declare(strict_types=1);
namespace Lkrms\PrettyPHP\Rule;
use Lkrms\PrettyPHP\Concern\TokenRuleTrait;
use Lkrms\PrettyPHP\Contract\TokenRule;
/**
* Indent tokens between brackets with inner newlines
*
* @api
*/
final class StandardIndentation implements TokenRule
{
use TokenRuleTrait;
/**
* @i... | php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/src/Rule/Preset/Laravel.php | src/Rule/Preset/Laravel.php | <?php declare(strict_types=1);
namespace Lkrms\PrettyPHP\Rule\Preset;
use Lkrms\PrettyPHP\Catalog\HeredocIndent;
use Lkrms\PrettyPHP\Catalog\WhitespaceFlag as Space;
use Lkrms\PrettyPHP\Concern\TokenRuleTrait;
use Lkrms\PrettyPHP\Contract\Preset;
use Lkrms\PrettyPHP\Contract\TokenRule;
use Lkrms\PrettyPHP\Rule\BlankB... | php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/src/Rule/Preset/Symfony.php | src/Rule/Preset/Symfony.php | <?php declare(strict_types=1);
namespace Lkrms\PrettyPHP\Rule\Preset;
use Lkrms\PrettyPHP\Catalog\HeredocIndent;
use Lkrms\PrettyPHP\Catalog\ImportSortOrder;
use Lkrms\PrettyPHP\Catalog\TokenFlag as Flag;
use Lkrms\PrettyPHP\Catalog\WhitespaceFlag as Space;
use Lkrms\PrettyPHP\Concern\TokenRuleTrait;
use Lkrms\Pretty... | php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/src/Rule/Preset/Drupal.php | src/Rule/Preset/Drupal.php | <?php declare(strict_types=1);
namespace Lkrms\PrettyPHP\Rule\Preset;
use Lkrms\PrettyPHP\Catalog\DeclarationType as Type;
use Lkrms\PrettyPHP\Catalog\HeredocIndent;
use Lkrms\PrettyPHP\Catalog\WhitespaceFlag as Space;
use Lkrms\PrettyPHP\Concern\DeclarationRuleTrait;
use Lkrms\PrettyPHP\Concern\TokenRuleTrait;
use L... | php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/src/Rule/Preset/WordPress.php | src/Rule/Preset/WordPress.php | <?php declare(strict_types=1);
namespace Lkrms\PrettyPHP\Rule\Preset;
use Lkrms\PrettyPHP\Catalog\TokenFlag as Flag;
use Lkrms\PrettyPHP\Catalog\WhitespaceFlag as Space;
use Lkrms\PrettyPHP\Concern\TokenRuleTrait;
use Lkrms\PrettyPHP\Contract\Preset;
use Lkrms\PrettyPHP\Contract\TokenRule;
use Lkrms\PrettyPHP\Rule\Pr... | php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/src/Rule/Preset/Internal/WordPressTokenIndex.php | src/Rule/Preset/Internal/WordPressTokenIndex.php | <?php declare(strict_types=1);
namespace Lkrms\PrettyPHP\Rule\Preset\Internal;
use Lkrms\PrettyPHP\AbstractTokenIndex;
use Salient\Core\Concern\ImmutableTrait;
/**
* @internal
*/
final class WordPressTokenIndex extends AbstractTokenIndex
{
use ImmutableTrait;
private self $Original;
public function _... | php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/src/Rule/Internal/Declaration.php | src/Rule/Internal/Declaration.php | <?php declare(strict_types=1);
namespace Lkrms\PrettyPHP\Rule\Internal;
use Lkrms\PrettyPHP\Catalog\DeclarationType as Type;
use Lkrms\PrettyPHP\Catalog\TokenData as Data;
use Lkrms\PrettyPHP\Catalog\TokenFlag as Flag;
use Lkrms\PrettyPHP\Catalog\WhitespaceFlag as Space;
use Lkrms\PrettyPHP\Token;
use Salient\Utility... | php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/src/Internal/TokenCollection.php | src/Internal/TokenCollection.php | <?php declare(strict_types=1);
namespace Lkrms\PrettyPHP\Internal;
use Lkrms\PrettyPHP\Catalog\TokenData as Data;
use Lkrms\PrettyPHP\Token;
use Salient\Collection\Collection;
use Salient\Utility\Exception\ShouldNotHappenException;
use InvalidArgumentException;
use Stringable;
/**
* @internal
*
* @extends Collect... | php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/src/Internal/Problem.php | src/Internal/Problem.php | <?php declare(strict_types=1);
namespace Lkrms\PrettyPHP\Internal;
use Lkrms\PrettyPHP\Token;
use Salient\Utility\Str;
use Stringable;
/**
* @internal
*/
final class Problem implements Stringable
{
public string $Format;
/** @var array<int|float|string|bool|null> */
public array $Values;
public ?st... | php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/src/Internal/Document.php | src/Internal/Document.php | <?php declare(strict_types=1);
namespace Lkrms\PrettyPHP\Internal;
use Lkrms\PrettyPHP\Token;
/**
* @internal
*/
final class Document
{
/** @var list<Token> */
public array $Tokens;
/** @var array<int,array<int,Token>> */
public array $TokensById;
/** @var array<int,Token> */
public array $... | php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/src/Catalog/TokenFlagMask.php | src/Catalog/TokenFlagMask.php | <?php declare(strict_types=1);
namespace Lkrms\PrettyPHP\Catalog;
/**
* Token flag masks
*
* @api
*/
interface TokenFlagMask
{
public const COMMENT_TYPE =
TokenFlag::CPP_COMMENT
| TokenFlag::SHELL_COMMENT
| TokenFlag::C_COMMENT
| TokenFlag::DOC_COMMENT;
}
| php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/src/Catalog/WhitespaceFlag.php | src/Catalog/WhitespaceFlag.php | <?php declare(strict_types=1);
namespace Lkrms\PrettyPHP\Catalog;
/**
* Token whitespace flags
*
* @api
*/
interface WhitespaceFlag
{
public const SPACE = 1;
public const LINE = 2;
public const BLANK = 4;
public const NO_SPACE = 64;
public const NO_LINE = 128;
public const NO_BLANK = 256;
... | php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/src/Catalog/ImportSortOrder.php | src/Catalog/ImportSortOrder.php | <?php declare(strict_types=1);
namespace Lkrms\PrettyPHP\Catalog;
/**
* Alias/import statement sort orders
*
* @api
*/
interface ImportSortOrder
{
/**
* Do not sort imports
*/
public const NONE = 0;
/**
* Sort imports by name
*/
public const NAME = 1;
/**
* Sort impo... | php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/src/Catalog/TokenFlag.php | src/Catalog/TokenFlag.php | <?php declare(strict_types=1);
namespace Lkrms\PrettyPHP\Catalog;
/**
* Token flags
*
* @api
*/
interface TokenFlag
{
/**
* The token is a C++- or shell-style comment
*/
public const ONELINE_COMMENT = 4;
/**
* The token is a C-style comment or T_DOC_COMMENT
*/
public const MUL... | php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/src/Catalog/DeclarationType.php | src/Catalog/DeclarationType.php | <?php declare(strict_types=1);
namespace Lkrms\PrettyPHP\Catalog;
/**
* Non-anonymous declaration types
*
* @api
*/
interface DeclarationType
{
public const _CASE = 1;
public const _CLASS = 2;
public const _CONST = 4;
public const _DECLARE = 8;
public const _ENUM = 16;
public const _FUNCTI... | php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/src/Catalog/HeredocIndent.php | src/Catalog/HeredocIndent.php | <?php declare(strict_types=1);
namespace Lkrms\PrettyPHP\Catalog;
/**
* Heredoc indentation types
*
* @api
*/
interface HeredocIndent
{
/**
* Do not indent heredocs
*/
public const NONE = 0;
/**
* Apply line indentation to heredocs
*/
public const LINE = 1;
/**
* App... | php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/src/Catalog/TokenData.php | src/Catalog/TokenData.php | <?php declare(strict_types=1);
namespace Lkrms\PrettyPHP\Catalog;
/**
* Token data types
*
* @api
*/
interface TokenData
{
/**
* The non-virtual token a virtual token is bound to
*/
public const BOUND_TO = 0;
/**
* The last non-virtual token before a virtual token, or null if there is ... | php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/src/Catalog/TokenSubId.php | src/Catalog/TokenSubId.php | <?php declare(strict_types=1);
namespace Lkrms\PrettyPHP\Catalog;
/**
* Token sub-ids
*
* @api
*/
interface TokenSubId
{
public const COLON_TERNARY = 0;
public const COLON_ALT_SYNTAX = 1;
public const COLON_NAMED_ARGUMENT = 2;
public const COLON_SWITCH_CASE = 3;
public const COLON_LABEL = 4;
... | php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/src/Catalog/FormatterFlag.php | src/Catalog/FormatterFlag.php | <?php declare(strict_types=1);
namespace Lkrms\PrettyPHP\Catalog;
/**
* Formatter flags
*
* @api
*/
interface FormatterFlag
{
/**
* Enable debug mode
*/
public const DEBUG = 1;
/**
* In debug mode, render output after processing each pass of each rule
*/
public const LOG_PROGR... | php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/src/App/PrettyPHPCommand.php | src/App/PrettyPHPCommand.php | <?php declare(strict_types=1);
namespace Lkrms\PrettyPHP\App;
use Lkrms\PrettyPHP\App\Exception\InvalidConfigurationException;
use Lkrms\PrettyPHP\Catalog\FormatterFlag;
use Lkrms\PrettyPHP\Catalog\HeredocIndent;
use Lkrms\PrettyPHP\Catalog\ImportSortOrder;
use Lkrms\PrettyPHP\Contract\Preset;
use Lkrms\PrettyPHP\Exc... | php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | true |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/src/App/Exception/AbstractAppException.php | src/App/Exception/AbstractAppException.php | <?php declare(strict_types=1);
namespace Lkrms\PrettyPHP\App\Exception;
use Salient\Core\Exception\Exception;
abstract class AbstractAppException extends Exception {}
| php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/src/App/Exception/InvalidConfigurationException.php | src/App/Exception/InvalidConfigurationException.php | <?php declare(strict_types=1);
namespace Lkrms\PrettyPHP\App\Exception;
use Throwable;
class InvalidConfigurationException extends AbstractAppException
{
public function __construct(string $message = '', ?Throwable $previous = null)
{
parent::__construct($message, $previous, 2);
}
}
| php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/src/Concern/RuleTrait.php | src/Concern/RuleTrait.php | <?php declare(strict_types=1);
namespace Lkrms\PrettyPHP\Concern;
use Lkrms\PrettyPHP\Catalog\TokenFlag as Flag;
use Lkrms\PrettyPHP\Catalog\WhitespaceFlag as Space;
use Lkrms\PrettyPHP\Contract\Rule;
use Lkrms\PrettyPHP\Token;
/**
* @api
*
* @phpstan-require-implements Rule
*/
trait RuleTrait
{
use Extensio... | php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/src/Concern/ListRuleTrait.php | src/Concern/ListRuleTrait.php | <?php declare(strict_types=1);
namespace Lkrms\PrettyPHP\Concern;
use Lkrms\PrettyPHP\Contract\ListRule;
/**
* @api
*
* @phpstan-require-implements ListRule
*/
trait ListRuleTrait
{
use RuleTrait;
}
| php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/src/Concern/DeclarationRuleTrait.php | src/Concern/DeclarationRuleTrait.php | <?php declare(strict_types=1);
namespace Lkrms\PrettyPHP\Concern;
use Lkrms\PrettyPHP\Contract\DeclarationRule;
/**
* @api
*
* @phpstan-require-implements DeclarationRule
*/
trait DeclarationRuleTrait
{
use RuleTrait;
/**
* @inheritDoc
*/
public static function getDeclarationTypes(array $a... | php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/src/Concern/FilterTrait.php | src/Concern/FilterTrait.php | <?php declare(strict_types=1);
namespace Lkrms\PrettyPHP\Concern;
use Lkrms\PrettyPHP\Contract\Filter;
use Lkrms\PrettyPHP\GenericToken;
/**
* @api
*
* @phpstan-require-implements Filter
*/
trait FilterTrait
{
use ExtensionTrait;
/** @var list<GenericToken> */
private array $Tokens;
/**
* ... | php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/src/Concern/TokenRuleTrait.php | src/Concern/TokenRuleTrait.php | <?php declare(strict_types=1);
namespace Lkrms\PrettyPHP\Concern;
use Lkrms\PrettyPHP\Contract\TokenRule;
use Lkrms\PrettyPHP\AbstractTokenIndex;
/**
* @api
*
* @phpstan-require-implements TokenRule
*/
trait TokenRuleTrait
{
use RuleTrait;
/**
* @inheritDoc
*/
public static function getTok... | php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/src/Concern/ExtensionTrait.php | src/Concern/ExtensionTrait.php | <?php declare(strict_types=1);
namespace Lkrms\PrettyPHP\Concern;
use Lkrms\PrettyPHP\Contract\Extension;
use Lkrms\PrettyPHP\AbstractTokenIndex;
use Lkrms\PrettyPHP\Formatter;
/**
* @api
*
* @phpstan-require-implements Extension
*/
trait ExtensionTrait
{
private Formatter $Formatter;
private AbstractTok... | php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/src/Concern/StatementRuleTrait.php | src/Concern/StatementRuleTrait.php | <?php declare(strict_types=1);
namespace Lkrms\PrettyPHP\Concern;
use Lkrms\PrettyPHP\Contract\StatementRule;
/**
* @api
*
* @phpstan-require-implements StatementRule
*/
trait StatementRuleTrait
{
use RuleTrait;
}
| php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/src/Concern/BlockRuleTrait.php | src/Concern/BlockRuleTrait.php | <?php declare(strict_types=1);
namespace Lkrms\PrettyPHP\Concern;
use Lkrms\PrettyPHP\Contract\BlockRule;
/**
* @api
*
* @phpstan-require-implements BlockRule
*/
trait BlockRuleTrait
{
use RuleTrait;
}
| php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/phpstan-conditional.php | tests/phpstan-conditional.php | <?php declare(strict_types=1);
$parameters = [
'phpVersion' => \PHP_VERSION_ID,
'tmpDir' => sprintf('build/cache/phpstan/%d.%d', \PHP_MAJOR_VERSION, \PHP_MINOR_VERSION),
];
$dir = dirname(__DIR__);
if (\PHP_VERSION_ID < 80000) {
return [
'parameters' => [
'ignoreErrors' => [
... | php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/integration/Bootstrap/invalid-tokens.php | tests/integration/Bootstrap/invalid-tokens.php | <?php declare(strict_types=1);
defined('T_ATTRIBUTE') || define('T_ATTRIBUTE', 0);
defined('T_MATCH') || define('T_MATCH', 1);
defined('T_NAME_FULLY_QUALIFIED') || define('T_NAME_FULLY_QUALIFIED', 2);
defined('T_NAME_QUALIFIED') || define('T_NAME_QUALIFIED', 3);
defined('T_NAME_RELATIVE') || define('T_NAME_RELATIVE', ... | php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/integration/Bootstrap/BootstrapTest.php | tests/integration/Bootstrap/BootstrapTest.php | <?php declare(strict_types=1);
namespace Lkrms\PrettyPHP\Tests\Bootstrap;
use Lkrms\PrettyPHP\Tests\TestCase;
use Salient\Core\Process;
final class BootstrapTest extends TestCase
{
/**
* @dataProvider bootstrapProvider
*/
public function testBootstrap(string $pattern, string $file): void
{
... | php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/integration/Bootstrap/tokens-with-same-id.php | tests/integration/Bootstrap/tokens-with-same-id.php | <?php declare(strict_types=1);
defined('T_ATTRIBUTE') || define('T_ATTRIBUTE', 10001);
defined('T_MATCH') || define('T_MATCH', 10001);
defined('T_NAME_FULLY_QUALIFIED') || define('T_NAME_FULLY_QUALIFIED', 10001);
defined('T_NAME_QUALIFIED') || define('T_NAME_QUALIFIED', 10001);
defined('T_NAME_RELATIVE') || define('T_... | php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/integration/Bootstrap/invalid-single-character-tokens.php | tests/integration/Bootstrap/invalid-single-character-tokens.php | <?php declare(strict_types=1);
define('T_LOGICAL_NOT', 30001);
define('T_DOUBLE_QUOTE', 30002);
define('T_DOLLAR', 30003);
define('T_MOD', 30004);
define('T_AND', 30005);
define('T_OPEN_PARENTHESIS', 30006);
define('T_CLOSE_PARENTHESIS', 30007);
define('T_MUL', 30008);
define('T_PLUS', 30009);
define('T_COMMA', 30010)... | php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/issues/0069-ternary-coalesce.php | tests/fixtures/Formatter/out/03-tab/issues/0069-ternary-coalesce.php | <?php
$threshold =
$this->UncertaintyThreshold === null
? null
: (is_array($this->UncertaintyThreshold)
? $this->UncertaintyThreshold[$algorithm] ?? null
: $this->UncertaintyThreshold);
| php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/issues/0060-no-blank-lines.php | tests/fixtures/Formatter/out/03-tab/issues/0060-no-blank-lines.php | <?php
date_default_timezone_set('Relevant/Timezone');
global $bad_practice;
define('SOME_VAR', 42);
/**
* comment
*/
class SomeClass {}
| php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/issues/0195-nowdoc-with-space.php | tests/fixtures/Formatter/out/03-tab/issues/0195-nowdoc-with-space.php | <?php
$str = sprintf(
<<<'EOP'
Lorem ipsum... %1$s
EOP,
'You know'
);
| php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/issues/0136-improve-hanging-indentation.php | tests/fixtures/Formatter/out/03-tab/issues/0136-improve-hanging-indentation.php | <?php
fn() =>
$foo ||
$bar; // Remove indentation here
$foo = bar('foo',
'bar') // Add indentation here
->baz()
->qux();
if (
$comments &&
($prev = end($comments)) === $comment->Prev &&
$comment->line - $prev->line < 2 &&
($comment->Flags & TokenFlagMask::COMMENT_TYPE) ===
($prev->Flags & TokenFlagMask:... | php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/issues/0009-align-split-assignments.php | tests/fixtures/Formatter/out/03-tab/issues/0009-align-split-assignments.php | <?php
$alpha->bravo(fn($charlie) => [
'short_key' => 'value',
'very_long_key' => $charlie === SOME_CONST
? $delta
: $echo,
'key' => 'value2'
]);
$foxtrot->golf(fn() => [
'key1' => $value1,
'key_two' => $value2
]);
$alpha
->bravo(fn($charlie) => [
'short_key' => 'value',
'very_long_key' => $charlie === SO... | php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/issues/0142-increment-operator-spacing.php | tests/fixtures/Formatter/out/03-tab/issues/0142-increment-operator-spacing.php | <?php
$foo->Bar++ ? ',' : '';
$foo->{'bar'}++ ? ',' : '';
Foo::$Bar++ ? ',' : '';
$foo['bar']++ ? ',' : '';
foo()++ ? ',' : '';
| php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/issues/0156-ternary-hanging-indent.php | tests/fixtures/Formatter/out/03-tab/issues/0156-ternary-hanging-indent.php | <?php
uasort(
$members,
fn($a, $b) =>
($a->Line ?? \PHP_INT_MAX) <=> ($b->Line ?? \PHP_INT_MAX)
?: ($a->InheritedFrom[0] ?? '') <=> ($b->InheritedFrom[0] ?? '')
?: ($_a = $this->getInheritedMemberData($a, $factory))->Class->getFqcn() <=>
($_b = $this->getInheritedMemberData($b, $factory))->Class->getFqcn(... | php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/issues/0166-anonymous-functions.php | tests/fixtures/Formatter/out/03-tab/issues/0166-anonymous-functions.php | <?php
function (
$foo,
$bar,
$baz
) use (
$a,
$b,
$c
) {};
// Added for completeness:
$foo = function ($bar //
) use ($baz,
$qux) {};
$foo = function ($bar
/* */) use ($baz,
$qux) {};
$foo = function (
$bar,
$baz
) //
use (
$baz,
$qux
) {};
$foo = [
10 =>
function (
$bar,
$baz
) /* */ ... | php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/issues/0012-else-if.php | tests/fixtures/Formatter/out/03-tab/issues/0012-else-if.php | <?php
if ($a) {
} else if ($b) {
} else if ($c) {
} else {
}
if ($a) {
} else if ($b) {
} else if ($c) {
}
if ($a) {
d();
} else if ($b) {
e();
} else if ($c) {
f();
} else {
g();
}
if ($a)
d();
else if ($b)
e();
else if ($c)
f();
else
g();
| php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/issues/0213-region-markers.php | tests/fixtures/Formatter/out/03-tab/issues/0213-region-markers.php | <?php
return function (App $app) {
$app->add(SessionMiddleware::class);
#region Twig
// Create Twig
$twig = Twig::create(__DIR__ . '/../templates', ['cache' => false]);
// Add Twig-View Middleware
$app->add(TwigMiddleware::create($app, $twig));
#endregion Twig
};
| php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/issues/0087-preserve-escaped-carriage-returns.php | tests/fixtures/Formatter/out/03-tab/issues/0087-preserve-escaped-carriage-returns.php | <?php
$string = "\rText after carriage return";
$string = "\rMultiline text after carriage return
";
| php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/issues/0099-enum-comment-indentation.php | tests/fixtures/Formatter/out/03-tab/issues/0099-enum-comment-indentation.php | <?php
enum ExampleEnum
{
/**
* Note.
*/
case Foo;
// Note.
case Bar;
// Note.
case Qux;
}
| php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/issues/0151-ternary-alignment-after-static.php | tests/fixtures/Formatter/out/03-tab/issues/0151-ternary-alignment-after-static.php | <?php
$obj instanceof static
? true
: false;
| php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/issues/0015-hanging-indentation.php | tests/fixtures/Formatter/out/03-tab/issues/0015-hanging-indentation.php | <?php
class A
{
private $b;
protected function c()
{
return $this->b
?? ($this->b = implode(
':', ['a',
'b',
'c',
'd',
'e']
));
}
}
| php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/standalone/class-comments-02.php | tests/fixtures/Formatter/out/03-tab/standalone/class-comments-02.php | <?php
class foo
{
function baz()
{
quux();
} // baz
} // foo
// continuation
class bar
{
function baz()
{
quux();
} // baz
} // bar
// continuation
class qux {} // qux
// continuation
| php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/standalone/native-types-02.php | tests/fixtures/Formatter/out/03-tab/standalone/native-types-02.php | <?php declare(strict_types=1);
class MyClass
{
public string|MyClass|null $Bar;
public const MY_CONSTANT = 'my constant';
public function MyMethod(
$mixed,
?int $nullableInt,
string $string,
MyClass $class,
?MyClass $nullableClass,
?MyClass &$nullableClassByRef,
?MyClass $nullableAndOptionalClass = ... | php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/standalone/numbers-01.php | tests/fixtures/Formatter/out/03-tab/standalone/numbers-01.php | <?php
123;
0123;
0123;
01;
012;
01234;
0x1A;
0x1A;
0x1A;
0x1A;
0x0;
0x0;
0x0;
0xF;
0xFE;
0xFED;
0xFEDC;
0xFEDCB;
0xFEDCBA;
0xFEDCBA9;
0xFEDCBA98;
0xFEDCBA987;
0xFEDCBA9876;
0xFEDCBA98765;
0xFEDCBA987654;
0xFEDCBA9876543;
0xFEDCBA98765432;
0xFEDCBA987654321;
0xFEDCBA9876543210;
0x0;
0xF;
0xFE;
0xFED;
0xFEDC;
0x000F_EDCB... | php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/standalone/lists-01.php | tests/fixtures/Formatter/out/03-tab/standalone/lists-01.php | <?php
use Foo\{Bar,
Baz, Qux};
use Foo2\{Bar as Bar2,
Baz as Baz2};
use Foo3\Bar as Bar3,
Foo3\Baz as Baz3,
Foo3\Qux as Qux3;
use function Foo\BarF,
Foo\BazF,
Foo\QuxF;
use const Foo\BarC,
Foo\BazC,
Foo\QuxC;
const FOO = 1,
BAR = 2,
BAZ = 4;
class Foo implements
Bar3,
Baz3, Qux3
{
use Bar,
Baz,
Qu... | php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/standalone/control-structure-expressions.php | tests/fixtures/Formatter/out/03-tab/standalone/control-structure-expressions.php | <?php
if ($foo) {
baz();
} elseif ($qux) {
quux();
}
if ($foo ||
$bar) {
baz();
} elseif ($foo &&
$qux) {
quux();
}
switch ($foo) {
default:
baz();
break;
}
switch ($foo ||
$bar) {
default:
baz();
break;
}
while ($foo) {
baz();
}
while ($foo ||
$bar) {
baz();
}
do {
baz();
} while ($foo);
do {
... | php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/standalone/functions-anonymous-02.php | tests/fixtures/Formatter/out/03-tab/standalone/functions-anonymous-02.php | <?php
function () {
return;
};
function &() {
return;
};
function (MyClass|string|null $foo,
$bar,
$baz) {
return;
};
function &(MyClass|string|null $foo,
$bar,
$baz) {
return;
};
fn&() =>
null;
$foo = function () {
return;
};
$foo = function &() {
return;
};
$foo = fn&() =>
null;
fn(MyClass|string|null... | php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/standalone/boolean-expressions.php | tests/fixtures/Formatter/out/03-tab/standalone/boolean-expressions.php | <?php
$a = $b
| $c
| $d;
$a = $b
| $c & $d
| $e;
$a = $b
& $c
| $d
& $e;
$a = $b ||
$c ||
$d;
$a = $b ||
$c && $d ||
$e;
$a = $b &&
$c ||
$d &&
$e;
foo(bar() ||
qux() ||
quux());
foo(bar() ||
qux() && quux() ||
quuux());
foo(bar() &&
qux() ||
quux() &&
quuux());
foo(bar() &&
qux() &&
... | php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/standalone/chains-02.php | tests/fixtures/Formatter/out/03-tab/standalone/chains-02.php | <?php
$foo = "B{$A}R"::${baz()}()
->qux()
->quux();
$foo = "B{$A}R"::${baz()}()
->qux();
$foo = "B${A}R"::${baz()}()
->qux()
->quux();
$foo = "B${A}R"::${baz()}()
->qux();
| php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/standalone/class-comments-01.php | tests/fixtures/Formatter/out/03-tab/standalone/class-comments-01.php | <?php
class foo
{
function baz()
{
quux();
} // baz
} // foo
class bar
{
function baz()
{
quux();
} // baz
} // bar
class qux {} // qux
| php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/standalone/property-hooks-rfc.php | tests/fixtures/Formatter/out/03-tab/standalone/property-hooks-rfc.php | <?php
// -- Example #4
class User
{
public string $name {
set {
if (strlen($value) === 0) {
throw new ValueError('Name must be non-empty');
}
$this->name = $value;
}
}
public function __construct(string $name)
{
$this->name = $name;
}
}
// -- Example #6
class Foo
{
public int $runs = 0 {
... | php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/standalone/native-types-01.php | tests/fixtures/Formatter/out/03-tab/standalone/native-types-01.php | <?php declare(strict_types=1);
class MyClass
{
public MyClass $Foo;
public ?int $Bar;
public const MY_CONSTANT = 'my constant';
public function MyMethod(
$mixed,
?int $nullableInt,
string $string,
MyClass $class,
?MyClass $nullableClass,
?MyClass &$nullableClassByRef,
?MyClass $nullableAndOptionalC... | php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/standalone/void-cast.php | tests/fixtures/Formatter/out/03-tab/standalone/void-cast.php | <?php
(void) foo();
(void) bar();
(void) $foo or $bar;
for ((void) foo(); $bar; (void) $baz) {
}
| php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/standalone/class-anonymous-attributes-01.php | tests/fixtures/Formatter/out/03-tab/standalone/class-anonymous-attributes-01.php | <?php
$a = new
#[AttrA]
class extends B implements C, D, E {};
$a = new
#[AttrB(true)]
#[AttrC(101, Types::ANON_CLASS)]
#[AttrD()]
class extends B implements
C,
D,
E {};
$a = new
#[AttrE]
class extends B implements C, D, E
{
#[AttrF(true)]
#[AttrG(102, Types::FUNC)]
function f(string $h, int $i,... | php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/standalone/functions-anonymous-01.php | tests/fixtures/Formatter/out/03-tab/standalone/functions-anonymous-01.php | <?php
function () {
return;
};
function &() {
return;
};
function (?string $foo,
$bar,
$baz) {
return;
};
function &(?string $foo,
$bar,
$baz) {
return;
};
fn&() =>
null;
$foo = function () {
return;
};
$foo = function &() {
return;
};
$foo = fn&() =>
null;
fn(?string $foo,
$bar,
$baz) => null;
fn&(?s... | php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/standalone/static-variables.php | tests/fixtures/Formatter/out/03-tab/standalone/static-variables.php | <?php
function foo()
{
static $bar = 0;
function () use (&$bar) {
$bar++;
};
static $baz = 0;
#[Attr()]
function () use (&$baz) {
$baz++;
};
static $qux = 0;
new class($qux) {
function __construct(&$qux)
{
$qux++;
}
};
static $foo = 0;
}
function bar()
{
static $bar = 0;
function () use (&$b... | php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/standalone/class-anonymous-attributes-02.php | tests/fixtures/Formatter/out/03-tab/standalone/class-anonymous-attributes-02.php | <?php
new
#[AttrA]
class extends B implements C, D, E {};
new
#[AttrB(true)]
#[AttrC(101, Types::ANON_CLASS)]
#[AttrD()]
class extends B implements
C,
D,
E {};
new
#[AttrE]
class extends B implements C, D, E
{
#[AttrF(true)]
#[AttrG(102, Types::FUNC)]
function f(string $h, int $i, $j) {}
#[At... | php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/standalone/numbers-02.php | tests/fixtures/Formatter/out/03-tab/standalone/numbers-02.php | <?php
0123;
0123;
0123;
0123;
01234567;
012345670;
| php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/standalone/declare-statements.php | tests/fixtures/Formatter/out/03-tab/standalone/declare-statements.php | <?php
declare(ticks=1);
declare(ticks=1);
//
declare(ticks=1);
//
declare(ticks=1) {
//
}
declare(ticks=1);
declare(ticks=1);
//
declare(ticks=1);
declare(ticks=1);
declare(ticks=1) {
//
}
declare(ticks=1);
| php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/standalone/embedded-docblocks-02.php | tests/fixtures/Formatter/out/03-tab/standalone/embedded-docblocks-02.php | <?php
$foo = $bar || /*
* comment
*/ $baz;
if ($foo || /*
* comment
*/ $bar) {
}
function baz(
/*
* comment
*/
$foo,
/*
* comment
*/
$bar
/*
* comment
*/
) {}
class Foo
{
/*
* comment
*/
use Bar;
}
$foo = $bar || /*
*... | php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/standalone/class-anonymous-01.php | tests/fixtures/Formatter/out/03-tab/standalone/class-anonymous-01.php | <?php
$a = new class extends B implements C, D, E {};
$a = new class extends B implements
C,
D,
E {};
$a = new class extends B implements C, D, E {
function f(string $h, int $i, $j) {}
function g($k) {}
function z() {}
};
$a = new class extends B implements
C,
D,
E
{
function f(string $h, int $i, $j)
{... | php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/standalone/match-01.php | tests/fixtures/Formatter/out/03-tab/standalone/match-01.php | <?php
$result = match (true) {
str_contains($text, 'Welcome') ||
str_contains($text, 'Hello'),
str_contains($text, 'Hi') || str_contains($text, "G'day") => 'en',
str_contains($text, 'Bienvenue') ||
str_contains($text, 'Bonjour') => 'fr'
};
$result = match (true) {
$senior,
$age >= 65 => 'senior',
$adult,
... | php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/standalone/chains-01.php | tests/fixtures/Formatter/out/03-tab/standalone/chains-01.php | <?php
$foo = bar()
->baz()
->qux();
$foo = bar()
->baz();
$foo = b()
->baz()
->qux();
$foo = b()
->baz();
$foo = b()
->baz()
->qux();
$foo = bar()
->${'baz'}()
->${'qux'}();
$foo = bar()
->${'baz'}();
$_foo = bar()
->${baz()}()
->qux()
->quux();
$_foo = bar()
->${baz()}()
->qux();
$foo = BAR::... | php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/standalone/functions-anonymous-04.php | tests/fixtures/Formatter/out/03-tab/standalone/functions-anonymous-04.php | <?php
function () {
return;
};
function &() {
return;
};
function ((Countable&ArrayAccess)|MyClass|string|null $foo,
$bar,
$baz) {
return;
};
function &((Countable&ArrayAccess)|MyClass|string|null $foo,
$bar,
$baz) {
return;
};
fn&() =>
null;
$foo = function () {
return;
};
$foo = function &() {
return;
... | php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/standalone/functions-anonymous-03.php | tests/fixtures/Formatter/out/03-tab/standalone/functions-anonymous-03.php | <?php
function () {
return;
};
function &() {
return;
};
function (MyClass|string|null $foo,
Countable&ArrayAccess $bar,
$baz) {
return;
};
function &(MyClass|string|null $foo,
Countable&ArrayAccess $bar,
$baz) {
return;
};
fn&() =>
null;
$foo = function () {
return;
};
$foo = function &() {
return;
};
$... | php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/standalone/native-types-04.php | tests/fixtures/Formatter/out/03-tab/standalone/native-types-04.php | <?php declare(strict_types=1);
class MyClass
{
public (Countable&ArrayAccess)|MyClass|string|null $Foo;
public string|MyClass|(Countable&ArrayAccess)|null $Bar;
public const MY_CONSTANT = 'my constant';
public function MyMethod(
$mixed,
?int $nullableInt,
string $string,
Countable&ArrayAccess $intersect... | php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/standalone/class-attributes-01.php | tests/fixtures/Formatter/out/03-tab/standalone/class-attributes-01.php | <?php
#[AttrA]
class A1 extends B implements C, D, E {}
#[AttrB(true)]
#[AttrC(101, Types::ANON_CLASS)]
#[AttrD()]
class A2 extends B implements
C,
D,
E {}
#[AttrE]
class A3 extends B implements C, D, E
{
#[AttrF(true)]
#[AttrG(102, Types::FUNC)]
function f(string $h, int $i, $j) {}
#[AttrH]
function g($k) ... | php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/standalone/embedded-docblocks-01.php | tests/fixtures/Formatter/out/03-tab/standalone/embedded-docblocks-01.php | <?php
$foo = $bar ||
/** comment */
$baz;
if ($foo ||
/** comment */
$bar) {
}
function baz(
/** comment */
$foo,
/** comment */
$bar
/**
* comment
*/
) {}
class Foo
{
/** comment */
use Bar;
}
$foo = $bar ||
/**
* line 1
* line 2
*/
$baz;
if ($foo ||
/**
* line 1
* line 2
*/
$bar) ... | php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/standalone/native-types-03.php | tests/fixtures/Formatter/out/03-tab/standalone/native-types-03.php | <?php declare(strict_types=1);
class MyClass
{
public Countable&ArrayAccess $Foo;
public string|MyClass|null $Bar;
public const MY_CONSTANT = 'my constant';
public function MyMethod(
$mixed,
?int $nullableInt,
string $string,
Countable&ArrayAccess $intersection,
MyClass $class,
?MyClass $nullableCla... | php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/standalone/class-comments-03.php | tests/fixtures/Formatter/out/03-tab/standalone/class-comments-03.php | <?php
class foo {}
class bar {}
class baz {}
/**
* comment
*/
class foo
{
function baz() {}
}
/**
* comment
*/
class bar
{
function baz() {}
}
/**
* comment
*/
class qux {} // qux
// continuation
/**
* comment
*/
class foo
{
function baz() {}
} // foo
// not a continuation
/**
* comment
*/
class bar... | php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/3rdparty/utf-8.php | tests/fixtures/Formatter/out/03-tab/3rdparty/utf-8.php | <?php
$ascii = "\0\x01\x02\x03\x04\x05\x06\x07\x08\t\n\v\f\r\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\e\x1c\x1d\x1e\x1f";
$blank = "\u{00A0}\u{2000}\u{2001}\u{2002}\u{2003}\u{2004}\u{2005}\u{2006}\u{2007}\u{2008}\u{2009}\u{200A}\u{202F}\u{205F}\u{3000}";
$bom = "\u{FEFF}";
$ignorable = "\u{00AD}\u{202A}\u{20... | php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | true |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/3rdparty/php-doc/appendices/migration71/other-changes/001.php | tests/fixtures/Formatter/out/03-tab/3rdparty/php-doc/appendices/migration71/other-changes/001.php | <?php
var_dump('@');
| php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/3rdparty/php-doc/appendices/migration71/other-changes/000.php | tests/fixtures/Formatter/out/03-tab/3rdparty/php-doc/appendices/migration71/other-changes/000.php | <?php
'1b' + 'something';
| php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/3rdparty/php-doc/appendices/migration71/new-features/006.php | tests/fixtures/Formatter/out/03-tab/3rdparty/php-doc/appendices/migration71/new-features/006.php | <?php
$data = [
['id' => 1, 'name' => 'Tom'],
['id' => 2, 'name' => 'Fred'],
];
// list() style
list('id' => $id1, 'name' => $name1) = $data[0];
// [] style
['id' => $id1, 'name' => $name1] = $data[0];
// list() style
foreach ($data as list('id' => $id, 'name' => $name)) {
// logic here with $id and $name
}
// [... | php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
lkrms/pretty-php | https://github.com/lkrms/pretty-php/blob/5d244a4b7a9b484581edbb5df596a4e76ba17fa6/tests/fixtures/Formatter/out/03-tab/3rdparty/php-doc/appendices/migration71/new-features/004.php | tests/fixtures/Formatter/out/03-tab/3rdparty/php-doc/appendices/migration71/new-features/004.php | <?php
function iterator(iterable $iter)
{
foreach ($iter as $val) {
//
}
}
| php | MIT | 5d244a4b7a9b484581edbb5df596a4e76ba17fa6 | 2026-01-05T04:31:39.990954Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.