Skip to content

Commit

Permalink
removed Strict
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed Nov 8, 2023
1 parent 3a52ecf commit 635192f
Show file tree
Hide file tree
Showing 34 changed files with 0 additions and 362 deletions.
3 changes: 0 additions & 3 deletions src/Latte/Compiler/Block.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

namespace Latte\Compiler;

use Latte;
use Latte\Compiler\Nodes\Php\ExpressionNode;
use Latte\Compiler\Nodes\Php\ParameterNode;
use Latte\Compiler\Nodes\Php\Scalar;
Expand All @@ -18,8 +17,6 @@
/** @internal */
final class Block
{
use Latte\Strict;

public string $method;
public string $content;
public string $escaping;
Expand Down
3 changes: 0 additions & 3 deletions src/Latte/Compiler/Escaper.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

namespace Latte\Compiler;

use Latte;
use Latte\Compiler\Nodes\Html\ElementNode;
use Latte\ContentType;
use Latte\Runtime\Filters;
Expand All @@ -20,8 +19,6 @@
*/
final class Escaper
{
use Latte\Strict;

public const
Text = 'text',
JavaScript = 'js',
Expand Down
4 changes: 0 additions & 4 deletions src/Latte/Compiler/Node.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,12 @@

namespace Latte\Compiler;

use Latte;


/**
* @implements \IteratorAggregate<Node>
*/
abstract class Node implements \IteratorAggregate
{
use Latte\Strict;

public ?Position $position = null;


Expand Down
3 changes: 0 additions & 3 deletions src/Latte/Compiler/NodeHelpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

namespace Latte\Compiler;

use Latte;
use Latte\Compiler\Nodes\Php;
use Latte\Compiler\Nodes\Php\Expression;
use Latte\Compiler\Nodes\Php\ExpressionNode;
Expand All @@ -18,8 +17,6 @@

final class NodeHelpers
{
use Latte\Strict;

/** @return Node[] */
public static function find(Node $node, callable $filter): array
{
Expand Down
4 changes: 0 additions & 4 deletions src/Latte/Compiler/NodeTraverser.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,9 @@

namespace Latte\Compiler;

use Latte;


final class NodeTraverser
{
use Latte\Strict;

public const DontTraverseChildren = 1;
public const StopTraversal = 2;

Expand Down
4 changes: 0 additions & 4 deletions src/Latte/Compiler/Position.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,9 @@

namespace Latte\Compiler;

use Latte;


final class Position
{
use Latte\Strict;

public function __construct(
public /*readonly*/ int $line = 1,
public /*readonly*/ int $column = 1,
Expand Down
3 changes: 0 additions & 3 deletions src/Latte/Compiler/PrintContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

namespace Latte\Compiler;

use Latte;
use Latte\Compiler\Nodes\Php as Nodes;
use Latte\Compiler\Nodes\Php\Expression;
use Latte\Compiler\Nodes\Php\Scalar;
Expand All @@ -22,8 +21,6 @@
*/
final class PrintContext
{
use Latte\Strict;

public array $paramsExtraction = [];
public array $blocks = [];

Expand Down
3 changes: 0 additions & 3 deletions src/Latte/Compiler/Tag.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

namespace Latte\Compiler;

use Latte;
use Latte\CompileException;
use Latte\Compiler\Nodes\Html\ElementNode;

Expand All @@ -19,8 +18,6 @@
*/
final class Tag
{
use Latte\Strict;

public const
PrefixInner = 'inner',
PrefixTag = 'tag',
Expand Down
3 changes: 0 additions & 3 deletions src/Latte/Compiler/TagLexer.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

namespace Latte\Compiler;

use Latte;
use Latte\CompileException;


Expand All @@ -18,8 +17,6 @@
*/
final class TagLexer
{
use Latte\Strict;

private const Keywords = [
'and' => Token::Php_LogicalAnd,
'array' => Token::Php_Array,
Expand Down
2 changes: 0 additions & 2 deletions src/Latte/Compiler/TagParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@
*/
final class TagParser extends TagParserData
{
use Latte\Strict;

private const
SchemaExpression = 'e',
SchemaArguments = 'a',
Expand Down
3 changes: 0 additions & 3 deletions src/Latte/Compiler/TemplateGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

namespace Latte\Compiler;

use Latte;
use Latte\ContentType;


Expand All @@ -18,8 +17,6 @@
*/
final class TemplateGenerator
{
use Latte\Strict;

/** @var array<string, ?array{body: string, arguments: string, returns: string, comment: ?string}> */
private array $methods = [];

Expand Down
3 changes: 0 additions & 3 deletions src/Latte/Compiler/TemplateLexer.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,11 @@

namespace Latte\Compiler;

use Latte;
use Latte\CompileException;


final class TemplateLexer
{
use Latte\Strict;

public const
StatePlain = 'Plain',
StateLatteTag = 'LatteTag',
Expand Down
2 changes: 0 additions & 2 deletions src/Latte/Compiler/TemplateParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@

final class TemplateParser
{
use Latte\Strict;

/** @var Block[][] */
public array $blocks = [[]];
public int $blockLayer = Template::LayerTop;
Expand Down
2 changes: 0 additions & 2 deletions src/Latte/Compiler/TemplateParserHtml.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@
*/
final class TemplateParserHtml
{
use Latte\Strict;

/** @var array<string, callable(Tag, TemplateParser): (Node|\Generator|void)> */
private array /*readonly*/ $attrParsers;
private ?Html\ElementNode $element = null;
Expand Down
4 changes: 0 additions & 4 deletions src/Latte/Compiler/Token.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,9 @@

namespace Latte\Compiler;

use Latte;


final class Token
{
use Latte\Strict;

public const
End = 0,
Text = 10000,
Expand Down
3 changes: 0 additions & 3 deletions src/Latte/Compiler/TokenStream.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

namespace Latte\Compiler;

use Latte;
use Latte\CompileException;


Expand All @@ -19,8 +18,6 @@
*/
final class TokenStream
{
use Latte\Strict;

/** @var Token[] */
private array $tokens = [];
private \Iterator /*readonly*/ $source;
Expand Down
2 changes: 0 additions & 2 deletions src/Latte/Engine.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
*/
class Engine
{
use Strict;

public const Version = '3.0.10';
public const VersionId = 30010;

Expand Down
2 changes: 0 additions & 2 deletions src/Latte/Essential/Blueprint.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@
*/
final class Blueprint
{
use Latte\Strict;

public function printClass(Template $template, ?string $name = null): void
{
if (!class_exists(Php\ClassType::class)) {
Expand Down
4 changes: 0 additions & 4 deletions src/Latte/Essential/CachingIterator.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@

namespace Latte\Essential;

use Latte;


/**
* Smarter caching iterator.
Expand All @@ -29,8 +27,6 @@
*/
class CachingIterator extends \CachingIterator implements \Countable
{
use Latte\Strict;

private int $counter = 0;
private ?self $parent = null;

Expand Down
2 changes: 0 additions & 2 deletions src/Latte/Essential/CoreExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@
*/
final class CoreExtension extends Latte\Extension
{
use Latte\Strict;

private array $functions;
private bool $strict;
private Runtime\Template $template;
Expand Down
2 changes: 0 additions & 2 deletions src/Latte/Essential/Passes.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@

final class Passes
{
use Latte\Strict;

/**
* Checks if foreach overrides template variables.
*/
Expand Down
2 changes: 0 additions & 2 deletions src/Latte/Essential/RawPhpExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
*/
final class RawPhpExtension extends Latte\Extension
{
use Latte\Strict;

public function getTags(): array
{
return [
Expand Down
2 changes: 0 additions & 2 deletions src/Latte/Loaders/FileLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
*/
class FileLoader implements Latte\Loader
{
use Latte\Strict;

protected ?string $baseDir = null;


Expand Down
2 changes: 0 additions & 2 deletions src/Latte/Loaders/StringLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
*/
class StringLoader implements Latte\Loader
{
use Latte\Strict;

/** @var string[]|null [name => content] */
private ?array $templates = null;

Expand Down
4 changes: 0 additions & 4 deletions src/Latte/Runtime/Block.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,10 @@

namespace Latte\Runtime;

use Latte;


/** @internal */
final class Block
{
use Latte\Strict;

public ?string $contentType = null;

/** @var callable[] */
Expand Down
2 changes: 0 additions & 2 deletions src/Latte/Runtime/FilterInfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
*/
class FilterInfo
{
use Latte\Strict;

public ?string $contentType = null;


Expand Down
4 changes: 0 additions & 4 deletions src/Latte/Runtime/Html.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,12 @@

namespace Latte\Runtime;

use Latte;


/**
* HTML literal.
*/
class Html implements HtmlStringable
{
use Latte\Strict;

private string $value;


Expand Down
2 changes: 0 additions & 2 deletions src/Latte/Runtime/Template.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
*/
class Template
{
use Latte\Strict;

public const
LayerTop = 0,
LayerSnippet = 'snippet',
Expand Down
2 changes: 0 additions & 2 deletions src/Latte/Sandbox/RuntimeChecker.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
/** @internal */
final class RuntimeChecker
{
use Latte\Strict;

public function __construct(
public Latte\Policy $policy,
) {
Expand Down
2 changes: 0 additions & 2 deletions src/Latte/Sandbox/SandboxExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@
*/
final class SandboxExtension extends Latte\Extension
{
use Latte\Strict;

private ?Latte\Policy $policy;


Expand Down
2 changes: 0 additions & 2 deletions src/Latte/Sandbox/SecurityPolicy.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
*/
class SecurityPolicy implements Latte\Policy
{
use Latte\Strict;

public const All = ['*'];
public const ALL = self::All;

Expand Down
Loading

0 comments on commit 635192f

Please sign in to comment.