Skip to content

Commit

Permalink
Add php-cs-fixer and run config and add unified header comments
Browse files Browse the repository at this point in the history
  • Loading branch information
garbast committed May 25, 2024
1 parent 6c2d407 commit 3a46347
Show file tree
Hide file tree
Showing 50 changed files with 242 additions and 90 deletions.
4 changes: 2 additions & 2 deletions Classes/Cache/CacheFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
declare(strict_types=1);

/*
* This file is part of the "extender" Extension for TYPO3 CMS.
* This file is developed by evoWeb.
*
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
Expand All @@ -15,11 +15,11 @@

namespace Evoweb\Extender\Cache;

use TYPO3\CMS\Core\Core\Bootstrap;
use TYPO3\CMS\Core\Cache\Backend\AbstractBackend;
use TYPO3\CMS\Core\Cache\Backend\FileBackend;
use TYPO3\CMS\Core\Cache\Frontend\FrontendInterface;
use TYPO3\CMS\Core\Cache\Frontend\PhpFrontend;
use TYPO3\CMS\Core\Core\Bootstrap;

class CacheFactory
{
Expand Down
7 changes: 3 additions & 4 deletions Classes/Cache/ClassCacheManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
declare(strict_types=1);

/*
* This file is part of the "extender" Extension for TYPO3 CMS.
* This file is developed by evoWeb.
*
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
Expand Down Expand Up @@ -32,8 +32,7 @@ public function __construct(
protected ClassParser $classParser,
protected ClassComposer $classComposer,
protected ClassRegister $classRegister
) {
}
) {}

/**
* Build merged file and cache for base and extending files
Expand All @@ -45,7 +44,7 @@ public function build(string $cacheEntryIdentifier, string $className): void
{
$fileSegments = [
$this->getBaseClassFileSegments($className),
...$this->getExtendingClassesFileSegments($className)
...$this->getExtendingClassesFileSegments($className),
];

$code = $this->getMergedFileCode($fileSegments);
Expand Down
2 changes: 1 addition & 1 deletion Classes/Command/ClearCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
declare(strict_types=1);

/*
* This file is part of the "extender" Extension for TYPO3 CMS.
* This file is developed by evoWeb.
*
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
Expand Down
2 changes: 1 addition & 1 deletion Classes/Composer/ClassComposer.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
declare(strict_types=1);

/*
* This file is part of the "extender" Extension for TYPO3 CMS.
* This file is developed by evoWeb.
*
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
Expand Down
2 changes: 1 addition & 1 deletion Classes/Composer/Generator/ClassGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
declare(strict_types=1);

/*
* This file is part of the "extender" Extension for TYPO3 CMS.
* This file is developed by evoWeb.
*
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
Expand Down
2 changes: 1 addition & 1 deletion Classes/Composer/Generator/ClassMethodGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
declare(strict_types=1);

/*
* This file is part of the "extender" Extension for TYPO3 CMS.
* This file is developed by evoWeb.
*
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
Expand Down
4 changes: 2 additions & 2 deletions Classes/Composer/Generator/ConstantGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
declare(strict_types=1);

/*
* This file is part of the "extender" Extension for TYPO3 CMS.
* This file is developed by evoWeb.
*
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
Expand All @@ -17,8 +17,8 @@

use Evoweb\Extender\Parser\FileSegments;
use PhpParser\Node\Stmt\Class_;
use PhpParser\Node\Stmt\Namespace_;
use PhpParser\Node\Stmt\ClassConst;
use PhpParser\Node\Stmt\Namespace_;

class ConstantGenerator implements GeneratorInterface
{
Expand Down
2 changes: 1 addition & 1 deletion Classes/Composer/Generator/ConstructorGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
declare(strict_types=1);

/*
* This file is part of the "extender" Extension for TYPO3 CMS.
* This file is developed by evoWeb.
*
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
Expand Down
2 changes: 1 addition & 1 deletion Classes/Composer/Generator/FileCommentGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
declare(strict_types=1);

/*
* This file is part of the "extender" Extension for TYPO3 CMS.
* This file is developed by evoWeb.
*
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
Expand Down
2 changes: 1 addition & 1 deletion Classes/Composer/Generator/GeneratorInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
declare(strict_types=1);

/*
* This file is part of the "extender" Extension for TYPO3 CMS.
* This file is developed by evoWeb.
*
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
Expand Down
2 changes: 1 addition & 1 deletion Classes/Composer/Generator/InitializeObjectGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
declare(strict_types=1);

/*
* This file is part of the "extender" Extension for TYPO3 CMS.
* This file is developed by evoWeb.
*
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
Expand Down
2 changes: 1 addition & 1 deletion Classes/Composer/Generator/NamespaceGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
declare(strict_types=1);

/*
* This file is part of the "extender" Extension for TYPO3 CMS.
* This file is developed by evoWeb.
*
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
Expand Down
2 changes: 1 addition & 1 deletion Classes/Composer/Generator/PropertyGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
declare(strict_types=1);

/*
* This file is part of the "extender" Extension for TYPO3 CMS.
* This file is developed by evoWeb.
*
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
Expand Down
2 changes: 1 addition & 1 deletion Classes/Composer/Generator/TraitGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
declare(strict_types=1);

/*
* This file is part of the "extender" Extension for TYPO3 CMS.
* This file is developed by evoWeb.
*
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
Expand Down
2 changes: 1 addition & 1 deletion Classes/Composer/Generator/UseGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
declare(strict_types=1);

/*
* This file is part of the "extender" Extension for TYPO3 CMS.
* This file is developed by evoWeb.
*
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
Expand Down
4 changes: 1 addition & 3 deletions Classes/Configuration/ClassRegister.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@

class ClassRegister
{
public function __construct(protected array $extendedClasses = [])
{
}
public function __construct(protected array $extendedClasses = []) {}

public function hasBaseClassName(string $className): bool
{
Expand Down
2 changes: 1 addition & 1 deletion Classes/DependencyInjection/RegisterExtenderPass.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
declare(strict_types=1);

/*
* This file is part of the "extender" Extension for TYPO3 CMS.
* This file is developed by evoWeb.
*
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
Expand Down
2 changes: 1 addition & 1 deletion Classes/Event/RegisterAutoloaderEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
declare(strict_types=1);

/*
* This file is part of the "extender" Extension for TYPO3 CMS.
* This file is developed by evoWeb.
*
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
Expand Down
6 changes: 2 additions & 4 deletions Classes/Exception/BaseFileNotFoundException.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
declare(strict_types=1);

/*
* This file is part of the "extender" Extension for TYPO3 CMS.
* This file is developed by evoWeb.
*
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
Expand All @@ -15,6 +15,4 @@

namespace Evoweb\Extender\Exception;

class BaseFileNotFoundException extends \RuntimeException
{
}
class BaseFileNotFoundException extends \RuntimeException {}
6 changes: 2 additions & 4 deletions Classes/Exception/ExtendingFileNotFoundException.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
declare(strict_types=1);

/*
* This file is part of the "extender" Extension for TYPO3 CMS.
* This file is developed by evoWeb.
*
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
Expand All @@ -15,6 +15,4 @@

namespace Evoweb\Extender\Exception;

class ExtendingFileNotFoundException extends \RuntimeException
{
}
class ExtendingFileNotFoundException extends \RuntimeException {}
5 changes: 2 additions & 3 deletions Classes/Loader/ClassLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
declare(strict_types=1);

/*
* This file is part of the "extender" Extension for TYPO3 CMS.
* This file is developed by evoWeb.
*
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
Expand All @@ -27,8 +27,7 @@ public function __construct(
protected FrontendInterface|PhpFrontend $classCache,
protected ClassCacheManager $classCacheManager,
protected ClassRegister $classRegister
) {
}
) {}

/**
* Loads php files containing classes or interfaces part of the
Expand Down
6 changes: 2 additions & 4 deletions Classes/Parser/ClassParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
declare(strict_types=1);

/*
* This file is part of the "extender" Extension for TYPO3 CMS.
* This file is developed by evoWeb.
*
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
Expand Down Expand Up @@ -33,9 +33,7 @@ class ClassParser
Visitor\ClassMethodVisitor::class,
];

public function __construct(protected ParserFactory $parserFactory)
{
}
public function __construct(protected ParserFactory $parserFactory) {}

public function getFileSegments(string $filePath): FileSegments
{
Expand Down
4 changes: 2 additions & 2 deletions Classes/Parser/FileSegments.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
declare(strict_types=1);

/*
* This file is part of the "extender" Extension for TYPO3 CMS.
* This file is developed by evoWeb.
*
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
Expand All @@ -17,8 +17,8 @@

use PhpParser\Node\Name;
use PhpParser\Node\Stmt\Class_;
use PhpParser\Node\Stmt\ClassMethod;
use PhpParser\Node\Stmt\ClassConst;
use PhpParser\Node\Stmt\ClassMethod;
use PhpParser\Node\Stmt\Property;
use PhpParser\Node\Stmt\TraitUse;
use PhpParser\Node\Stmt\UseUse;
Expand Down
6 changes: 2 additions & 4 deletions Classes/Parser/Visitor/AbstractVisitor.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
declare(strict_types=1);

/*
* This file is part of the "extender" Extension for TYPO3 CMS.
* This file is developed by evoWeb.
*
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
Expand All @@ -20,7 +20,5 @@

abstract class AbstractVisitor extends NodeVisitorAbstract
{
public function __construct(protected FileSegments $fileSegment)
{
}
public function __construct(protected FileSegments $fileSegment) {}
}
2 changes: 1 addition & 1 deletion Classes/Parser/Visitor/ClassMethodVisitor.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
declare(strict_types=1);

/*
* This file is part of the "extender" Extension for TYPO3 CMS.
* This file is developed by evoWeb.
*
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
Expand Down
2 changes: 1 addition & 1 deletion Classes/Parser/Visitor/ClassVisitor.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
declare(strict_types=1);

/*
* This file is part of the "extender" Extension for TYPO3 CMS.
* This file is developed by evoWeb.
*
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
Expand Down
2 changes: 1 addition & 1 deletion Classes/Parser/Visitor/ConstantVisitor.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
declare(strict_types=1);

/*
* This file is part of the "extender" Extension for TYPO3 CMS.
* This file is developed by evoWeb.
*
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
Expand Down
2 changes: 1 addition & 1 deletion Classes/Parser/Visitor/ConstructorVisitor.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
declare(strict_types=1);

/*
* This file is part of the "extender" Extension for TYPO3 CMS.
* This file is developed by evoWeb.
*
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
Expand Down
2 changes: 1 addition & 1 deletion Classes/Parser/Visitor/InitializeObjectVisitor.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
declare(strict_types=1);

/*
* This file is part of the "extender" Extension for TYPO3 CMS.
* This file is developed by evoWeb.
*
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
Expand Down
2 changes: 1 addition & 1 deletion Classes/Parser/Visitor/NamespaceVisitor.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
declare(strict_types=1);

/*
* This file is part of the "extender" Extension for TYPO3 CMS.
* This file is developed by evoWeb.
*
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
Expand Down
2 changes: 1 addition & 1 deletion Classes/Parser/Visitor/PropertyVisitor.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
declare(strict_types=1);

/*
* This file is part of the "extender" Extension for TYPO3 CMS.
* This file is developed by evoWeb.
*
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
Expand Down
2 changes: 1 addition & 1 deletion Classes/Parser/Visitor/TraitVisitor.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
declare(strict_types=1);

/*
* This file is part of the "extender" Extension for TYPO3 CMS.
* This file is developed by evoWeb.
*
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
Expand Down
2 changes: 1 addition & 1 deletion Classes/Parser/Visitor/UseVisitor.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
declare(strict_types=1);

/*
* This file is part of the "extender" Extension for TYPO3 CMS.
* This file is developed by evoWeb.
*
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
Expand Down
Loading

0 comments on commit 3a46347

Please sign in to comment.