Skip to content

Commit

Permalink
Merge pull request #15 from dachcom-digital/coding-standard/refactor-…
Browse files Browse the repository at this point in the history
…master

[CS] Refactor
  • Loading branch information
solverat authored Dec 5, 2024
2 parents 1b0e3f0 + 4cede07 commit 4d81888
Show file tree
Hide file tree
Showing 16 changed files with 180 additions and 6 deletions.
14 changes: 12 additions & 2 deletions src/DependencyInjection/Compiler/SchemaGeneratorAdapterPass.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
<?php

/*
* This source file is available under two different licenses:
* - GNU General Public License version 3 (GPLv3)
* - DACHCOM Commercial License (DCL)
* Full copyright and license information is available in
* LICENSE.md which is distributed with this source code.
*
* @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com)
* @license GPLv3 and DCL
*/

namespace SchemaBundle\DependencyInjection\Compiler;

use SchemaBundle\EventListener\SchemaListener;
Expand All @@ -18,7 +29,6 @@ public function process(ContainerBuilder $container): void
}

foreach ($container->findTaggedServiceIds('schema.generator', true) as $id => $tags) {

$definition = $container->getDefinition(SchemaGeneratorRegistry::class);

if ($this->hasSeoBundle($container)) {
Expand Down Expand Up @@ -46,7 +56,7 @@ public function process(ContainerBuilder $container): void

private function hasSeoBundle(ContainerBuilder $container): bool
{
/** @phpstan-ignore-next-line */
/* @phpstan-ignore-next-line */
return $container->hasParameter('schema.third_party.seo.enabled') && $container->getParameter('schema.third_party.seo.enabled') === true;
}
}
11 changes: 11 additions & 0 deletions src/DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
<?php

/*
* This source file is available under two different licenses:
* - GNU General Public License version 3 (GPLv3)
* - DACHCOM Commercial License (DCL)
* Full copyright and license information is available in
* LICENSE.md which is distributed with this source code.
*
* @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com)
* @license GPLv3 and DCL
*/

namespace SchemaBundle\DependencyInjection;

use Symfony\Component\Config\Definition\Builder\TreeBuilder;
Expand Down
15 changes: 13 additions & 2 deletions src/DependencyInjection/SchemaExtension.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,23 @@
<?php

/*
* This source file is available under two different licenses:
* - GNU General Public License version 3 (GPLv3)
* - DACHCOM Commercial License (DCL)
* Full copyright and license information is available in
* LICENSE.md which is distributed with this source code.
*
* @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com)
* @license GPLv3 and DCL
*/

namespace SchemaBundle\DependencyInjection;

use Symfony\Component\Config\FileLocator;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Extension\PrependExtensionInterface;
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\Config\FileLocator;

class SchemaExtension extends Extension implements PrependExtensionInterface
{
Expand Down
13 changes: 12 additions & 1 deletion src/EventListener/SchemaListener.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,24 @@
<?php

/*
* This source file is available under two different licenses:
* - GNU General Public License version 3 (GPLv3)
* - DACHCOM Commercial License (DCL)
* Full copyright and license information is available in
* LICENSE.md which is distributed with this source code.
*
* @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com)
* @license GPLv3 and DCL
*/

namespace SchemaBundle\EventListener;

use Pimcore\Http\Request\Resolver\PimcoreContextResolver;
use Pimcore\Http\RequestHelper;
use SchemaBundle\Processor\SchemaRequestProcessorInterface;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\HttpKernel\Event\RequestEvent;
use Symfony\Component\HttpKernel\KernelEvents;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;

class SchemaListener implements EventSubscriberInterface
{
Expand Down
11 changes: 11 additions & 0 deletions src/Generator/FragmentGeneratorInterface.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
<?php

/*
* This source file is available under two different licenses:
* - GNU General Public License version 3 (GPLv3)
* - DACHCOM Commercial License (DCL)
* Full copyright and license information is available in
* LICENSE.md which is distributed with this source code.
*
* @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com)
* @license GPLv3 and DCL
*/

namespace SchemaBundle\Generator;

use Spatie\SchemaOrg\BaseType;
Expand Down
11 changes: 11 additions & 0 deletions src/Generator/GeneratorInterface.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
<?php

/*
* This source file is available under two different licenses:
* - GNU General Public License version 3 (GPLv3)
* - DACHCOM Commercial License (DCL)
* Full copyright and license information is available in
* LICENSE.md which is distributed with this source code.
*
* @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com)
* @license GPLv3 and DCL
*/

namespace SchemaBundle\Generator;

use Spatie\SchemaOrg\BaseType;
Expand Down
11 changes: 11 additions & 0 deletions src/Processor/SchemaElementProcessor.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
<?php

/*
* This source file is available under two different licenses:
* - GNU General Public License version 3 (GPLv3)
* - DACHCOM Commercial License (DCL)
* Full copyright and license information is available in
* LICENSE.md which is distributed with this source code.
*
* @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com)
* @license GPLv3 and DCL
*/

namespace SchemaBundle\Processor;

use SchemaBundle\Registry\SchemaGeneratorRegistryInterface;
Expand Down
11 changes: 11 additions & 0 deletions src/Processor/SchemaElementProcessorInterface.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
<?php

/*
* This source file is available under two different licenses:
* - GNU General Public License version 3 (GPLv3)
* - DACHCOM Commercial License (DCL)
* Full copyright and license information is available in
* LICENSE.md which is distributed with this source code.
*
* @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com)
* @license GPLv3 and DCL
*/

namespace SchemaBundle\Processor;

interface SchemaElementProcessorInterface
Expand Down
11 changes: 11 additions & 0 deletions src/Processor/SchemaRequestProcessor.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
<?php

/*
* This source file is available under two different licenses:
* - GNU General Public License version 3 (GPLv3)
* - DACHCOM Commercial License (DCL)
* Full copyright and license information is available in
* LICENSE.md which is distributed with this source code.
*
* @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com)
* @license GPLv3 and DCL
*/

namespace SchemaBundle\Processor;

use Pimcore\Twig\Extension\Templating\HeadMeta;
Expand Down
11 changes: 11 additions & 0 deletions src/Processor/SchemaRequestProcessorInterface.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
<?php

/*
* This source file is available under two different licenses:
* - GNU General Public License version 3 (GPLv3)
* - DACHCOM Commercial License (DCL)
* Full copyright and license information is available in
* LICENSE.md which is distributed with this source code.
*
* @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com)
* @license GPLv3 and DCL
*/

namespace SchemaBundle\Processor;

use Symfony\Component\HttpFoundation\Request;
Expand Down
11 changes: 11 additions & 0 deletions src/Registry/SchemaGeneratorRegistry.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
<?php

/*
* This source file is available under two different licenses:
* - GNU General Public License version 3 (GPLv3)
* - DACHCOM Commercial License (DCL)
* Full copyright and license information is available in
* LICENSE.md which is distributed with this source code.
*
* @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com)
* @license GPLv3 and DCL
*/

namespace SchemaBundle\Registry;

use SchemaBundle\Generator\FragmentGeneratorInterface;
Expand Down
11 changes: 11 additions & 0 deletions src/Registry/SchemaGeneratorRegistryInterface.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
<?php

/*
* This source file is available under two different licenses:
* - GNU General Public License version 3 (GPLv3)
* - DACHCOM Commercial License (DCL)
* Full copyright and license information is available in
* LICENSE.md which is distributed with this source code.
*
* @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com)
* @license GPLv3 and DCL
*/

namespace SchemaBundle\Registry;

use SchemaBundle\Generator\FragmentGeneratorInterface;
Expand Down
11 changes: 11 additions & 0 deletions src/SchemaBundle.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
<?php

/*
* This source file is available under two different licenses:
* - GNU General Public License version 3 (GPLv3)
* - DACHCOM Commercial License (DCL)
* Full copyright and license information is available in
* LICENSE.md which is distributed with this source code.
*
* @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com)
* @license GPLv3 and DCL
*/

namespace SchemaBundle;

use Pimcore\Extension\Bundle\AbstractPimcoreBundle;
Expand Down
11 changes: 11 additions & 0 deletions src/Seo/Middleware/SchemaGraphAdapter.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
<?php

/*
* This source file is available under two different licenses:
* - GNU General Public License version 3 (GPLv3)
* - DACHCOM Commercial License (DCL)
* Full copyright and license information is available in
* LICENSE.md which is distributed with this source code.
*
* @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com)
* @license GPLv3 and DCL
*/

namespace SchemaBundle\Seo\Middleware;

use SeoBundle\Middleware\MiddlewareAdapterInterface;
Expand Down
12 changes: 11 additions & 1 deletion src/Tool/Install.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,20 @@
<?php

/*
* This source file is available under two different licenses:
* - GNU General Public License version 3 (GPLv3)
* - DACHCOM Commercial License (DCL)
* Full copyright and license information is available in
* LICENSE.md which is distributed with this source code.
*
* @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com)
* @license GPLv3 and DCL
*/

namespace SchemaBundle\Tool;

use Pimcore\Extension\Bundle\Installer\SettingsStoreAwareInstaller;

class Install extends SettingsStoreAwareInstaller
{

}
11 changes: 11 additions & 0 deletions src/Twig/Extension/JsonLdExtension.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
<?php

/*
* This source file is available under two different licenses:
* - GNU General Public License version 3 (GPLv3)
* - DACHCOM Commercial License (DCL)
* Full copyright and license information is available in
* LICENSE.md which is distributed with this source code.
*
* @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com)
* @license GPLv3 and DCL
*/

namespace SchemaBundle\Twig\Extension;

use SchemaBundle\Processor\SchemaElementProcessorInterface;
Expand Down

0 comments on commit 4d81888

Please sign in to comment.