Skip to content

Commit

Permalink
Merge pull request #31 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 Jan 6, 2025
2 parents 1ff5171 + 4ca5b9f commit 5fd3769
Show file tree
Hide file tree
Showing 33 changed files with 375 additions and 11 deletions.
11 changes: 11 additions & 0 deletions src/Configuration/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 DsLuceneBundle\Configuration;

class Configuration implements ConfigurationInterface
Expand Down
11 changes: 11 additions & 0 deletions src/Configuration/ConfigurationInterface.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 DsLuceneBundle\Configuration;

interface ConfigurationInterface
Expand Down
13 changes: 12 additions & 1 deletion 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 DsLuceneBundle\DependencyInjection;

use Symfony\Component\Config\Definition\Builder\TreeBuilder;
Expand All @@ -23,6 +34,6 @@ public function getConfigTreeBuilder(): TreeBuilder
->end()
->end();

return $treeBuilder;
return $treeBuilder;
}
}
15 changes: 13 additions & 2 deletions src/DependencyInjection/DsLuceneExtension.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,22 @@
<?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 DsLuceneBundle\DependencyInjection;

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

class DsLuceneExtension extends Extension
{
Expand Down
11 changes: 11 additions & 0 deletions src/DsLuceneBundle.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 DsLuceneBundle;

use DynamicSearchBundle\Provider\Extension\ProviderBundleInterface;
Expand Down
11 changes: 11 additions & 0 deletions src/DsLuceneEvents.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 DsLuceneBundle;

final class DsLuceneEvents
Expand Down
11 changes: 11 additions & 0 deletions src/Event/AnalyzerEvent.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 DsLuceneBundle\Event;

use Symfony\Contracts\EventDispatcher\Event;
Expand Down
11 changes: 11 additions & 0 deletions src/Exception/LuceneException.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 DsLuceneBundle\Exception;

final class LuceneException extends \Exception
Expand Down
11 changes: 11 additions & 0 deletions src/Factory/AnalyzerFactory.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 DsLuceneBundle\Factory;

use DsLuceneBundle\DsLuceneEvents;
Expand Down
11 changes: 11 additions & 0 deletions src/Index/Field/AbstractType.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 DsLuceneBundle\Index\Field;

use DynamicSearchBundle\Index\IndexFieldInterface;
Expand Down
11 changes: 11 additions & 0 deletions src/Index/Field/BinaryField.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 DsLuceneBundle\Index\Field;

use ZendSearch\Lucene;
Expand Down
11 changes: 11 additions & 0 deletions src/Index/Field/KeywordField.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 DsLuceneBundle\Index\Field;

use ZendSearch\Lucene;
Expand Down
11 changes: 11 additions & 0 deletions src/Index/Field/TextField.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 DsLuceneBundle\Index\Field;

use ZendSearch\Lucene;
Expand Down
11 changes: 11 additions & 0 deletions src/Index/Field/UnIndexedField.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 DsLuceneBundle\Index\Field;

use ZendSearch\Lucene;
Expand Down
11 changes: 11 additions & 0 deletions src/Index/Field/UnStoredField.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 DsLuceneBundle\Index\Field;

use ZendSearch\Lucene;
Expand Down
11 changes: 11 additions & 0 deletions src/Lucene/Analyzer/CaseInsensitive.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 DsLuceneBundle\Lucene\Analyzer;

use ZendSearch\Lucene\Analysis\Analyzer\Common;
Expand Down
11 changes: 11 additions & 0 deletions src/Lucene/Analyzer/Syllable.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 DsLuceneBundle\Lucene\Analyzer;

use Org\Heigl\Hyphenator;
Expand Down
11 changes: 11 additions & 0 deletions src/Lucene/Filter/AsciiFolding/AsciiFoldingFilter.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 DsLuceneBundle\Lucene\Filter\AsciiFolding;

use ZendSearch\Lucene\Analysis\Token;
Expand Down
12 changes: 11 additions & 1 deletion src/Lucene/Filter/Stemming/SnowBallStemmingFilter.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 DsLuceneBundle\Lucene\Filter\Stemming;

use Wamania\Snowball\Stemmer;
Expand All @@ -11,7 +22,6 @@ class SnowBallStemmingFilter implements TokenFilterInterface
public const MIN_TOKEN_LENGTH = 1;

protected ?string $locale = null;

protected array $cache = [];
protected array $mapping = [
'da' => 'Danish',
Expand Down
11 changes: 11 additions & 0 deletions src/Modifier/TermModifier.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 DsLuceneBundle\Modifier;

/**
Expand Down
12 changes: 12 additions & 0 deletions src/Normalizer/DocumentKeyValueNormalizer.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 DsLuceneBundle\Normalizer;

use DsLuceneBundle\Normalizer\Helper\LuceneDocumentDataExtractor;
Expand Down Expand Up @@ -39,6 +50,7 @@ public function normalize(RawResultInterface $rawResult, ContextDefinitionInterf

if (!is_array($data)) {
$message = sprintf('Data needs to be type of "array", "%s" given', is_object($data) ? get_class($data) : gettype($data));

throw new NormalizerException($message, __CLASS__);
}

Expand Down
Loading

0 comments on commit 5fd3769

Please sign in to comment.