Skip to content

Commit

Permalink
Merge pull request #1663 from spryker-shop/feature/frw-9281/dev-adjus…
Browse files Browse the repository at this point in the history
…ted-project-level-cs-rules

Feature/frw 9281/dev adjusted project level cs rules
  • Loading branch information
gechetspr authored Dec 17, 2024
2 parents b4c1663 + db19fbe commit d2b9648
Show file tree
Hide file tree
Showing 2,164 changed files with 5,366 additions and 997 deletions.
8 changes: 4 additions & 4 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions config/Shared/common/config_logs-ci-errors.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types = 1);

use Monolog\Logger;
use Spryker\Shared\Log\LogConstants;

Expand Down
2 changes: 2 additions & 0 deletions config/Shared/common/config_logs-ci-info.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types = 1);

use Spryker\Shared\Event\EventConstants;
use Spryker\Shared\Log\LogConstants;
use Spryker\Shared\Propel\PropelConstants;
Expand Down
2 changes: 2 additions & 0 deletions config/Shared/common/config_logs-files.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types = 1);

use Spryker\Shared\Event\EventConstants;
use Spryker\Shared\Log\LogConstants;
use Spryker\Shared\Propel\PropelConstants;
Expand Down
2 changes: 2 additions & 0 deletions config/Shared/common/config_oauth.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types = 1);

use Spryker\Shared\Http\HttpConstants;
use Spryker\Shared\Oauth\OauthConstants;
use Spryker\Shared\OauthCryptography\OauthCryptographyConstants;
Expand Down
2 changes: 2 additions & 0 deletions config/Shared/common/config_oms-development.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types = 1);

use Spryker\Shared\DummyMarketplacePayment\DummyMarketplacePaymentConfig;
use Spryker\Shared\DummyPayment\DummyPaymentConfig;
use Spryker\Shared\Kernel\KernelConstants;
Expand Down
2 changes: 2 additions & 0 deletions config/Shared/config_default-ci.mysql.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types = 1);

use Spryker\Shared\Propel\PropelConstants;
use Spryker\Shared\StorageDatabase\StorageDatabaseConfig;
use Spryker\Shared\StorageDatabase\StorageDatabaseConstants;
Expand Down
2 changes: 2 additions & 0 deletions config/Shared/config_default-ci.pgsql.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types = 1);

use Spryker\Shared\Propel\PropelConstants;
use Spryker\Shared\StorageDatabase\StorageDatabaseConfig;
use Spryker\Shared\StorageDatabase\StorageDatabaseConstants;
Expand Down
2 changes: 2 additions & 0 deletions config/Shared/config_default-ci.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types = 1);

use Monolog\Logger;
use Pyz\Shared\Console\ConsoleConstants;
use Spryker\Shared\AppCatalogGui\AppCatalogGuiConstants;
Expand Down
2 changes: 2 additions & 0 deletions config/Shared/config_default-docker.acp.dev.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types = 1);

use Spryker\Shared\AppCatalogGui\AppCatalogGuiConstants;
use Spryker\Shared\Kernel\KernelConstants;
use Spryker\Shared\Store\StoreConstants;
Expand Down
2 changes: 2 additions & 0 deletions config/Shared/config_default-docker.ci.cypress.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types = 1);

// ############################################################################
// ########################## CI CYPRESS CONFIGURATION ########################
// ############################################################################
Expand Down
2 changes: 2 additions & 0 deletions config/Shared/config_default-docker.ci.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types = 1);

// ############################################################################
// ############################## CI CONFIGURATION ############################
// ############################################################################
Expand Down
2 changes: 2 additions & 0 deletions config/Shared/config_default-docker.dev.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types = 1);

use Monolog\Logger;
use Pyz\Shared\Console\ConsoleConstants;
use Spryker\Shared\Api\ApiConstants;
Expand Down
2 changes: 2 additions & 0 deletions config/Shared/config_default-docker.dms-testing.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types = 1);

use Monolog\Logger;
use Spryker\Shared\Api\ApiConstants;
use Spryker\Shared\Application\ApplicationConstants;
Expand Down
2 changes: 2 additions & 0 deletions config/Shared/config_default-docker.prod.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types = 1);

use Spryker\Shared\Application\ApplicationConstants;
use SprykerShop\Shared\ShopApplication\ShopApplicationConstants;

Expand Down
6 changes: 4 additions & 2 deletions config/Shared/config_default.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types = 1);

use Generated\Shared\Transfer\AddPaymentMethodTransfer;
use Generated\Shared\Transfer\AddReviewsTransfer;
use Generated\Shared\Transfer\AppConfigUpdatedTransfer;
Expand Down Expand Up @@ -279,7 +281,7 @@
getenv('SPRYKER_OAUTH_KEY_PUBLIC') ?: '',
) ?: null;
$config[OauthConstants::ENCRYPTION_KEY] = getenv('SPRYKER_OAUTH_ENCRYPTION_KEY') ?: null;
$config[OauthConstants::OAUTH_CLIENT_CONFIGURATION] = json_decode(getenv('SPRYKER_OAUTH_CLIENT_CONFIGURATION'), true) ?: [];
$config[OauthConstants::OAUTH_CLIENT_CONFIGURATION] = getenv('SPRYKER_OAUTH_CLIENT_CONFIGURATION') ? json_decode(getenv('SPRYKER_OAUTH_CLIENT_CONFIGURATION'), true) : [];

// >> ZED REQUEST

Expand Down Expand Up @@ -413,7 +415,7 @@
// >>> STORAGE

$keyValueRegionNamespaces = json_decode(getenv('SPRYKER_KEY_VALUE_REGION_NAMESPACES') ?: '[]', true);
$config[StorageConstants::STORAGE_KV_SOURCE] = strtolower(getenv('SPRYKER_KEY_VALUE_STORE_ENGINE')) ?: 'redis';
$config[StorageConstants::STORAGE_KV_SOURCE] = getenv('SPRYKER_KEY_VALUE_STORE_ENGINE') ? strtolower(getenv('SPRYKER_KEY_VALUE_STORE_ENGINE')) : 'redis';
$config[StorageRedisConstants::STORAGE_REDIS_PERSISTENT_CONNECTION] = true;
$config[StorageRedisConstants::STORAGE_REDIS_SCHEME] = getenv('SPRYKER_KEY_VALUE_STORE_PROTOCOL') ?: 'tcp';
$config[StorageRedisConstants::STORAGE_REDIS_HOST] = getenv('SPRYKER_KEY_VALUE_STORE_HOST');
Expand Down
2 changes: 2 additions & 0 deletions config/Shared/config_local.dist.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types = 1);

use Pyz\Shared\Console\ConsoleConstants;

/*
Expand Down
2 changes: 2 additions & 0 deletions config/Shared/config_propel.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types = 1);

use Spryker\Shared\Propel\PropelConstants;
use Spryker\Zed\Propel\PropelConfig;
use Spryker\Zed\PropelOrm\Business\Builder\ExtensionObjectBuilder;
Expand Down
2 changes: 2 additions & 0 deletions config/Shared/console_env_local.dist.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<?php

declare(strict_types = 1);

return 'development';
2 changes: 2 additions & 0 deletions config/Shared/default_store.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<?php

declare(strict_types = 1);

return 'DE';
2 changes: 2 additions & 0 deletions config/Shared/stores.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types = 1);

$stores = [];

if (getenv('SPRYKER_ACTIVE_STORES')) {
Expand Down
2 changes: 2 additions & 0 deletions config/Zed/cronjobs/jenkins.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types = 1);

/*
* Notes:
*
Expand Down
25 changes: 20 additions & 5 deletions phpcs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,16 @@
<exclude-pattern>*/tests/_output/*</exclude-pattern>
<exclude-pattern>*/tests/*/_data/*</exclude-pattern>

<rule ref="vendor/spryker/code-sniffer/Spryker/ruleset.xml"/>

<rule ref="vendor/spryker/code-sniffer/SprykerStrict/ruleset.xml">
<exclude name="SprykerStrict.TypeHints.ParameterTypeHint"/>
<exclude name="SprykerStrict.TypeHints.PropertyTypeHint"/>
<rule ref="vendor/spryker/code-sniffer/Spryker/ruleset.xml">
<exclude name="Spryker.Commenting.DocBlock"/>
<exclude name="Spryker.Commenting.DocBlockConst"/>
<exclude name="Spryker.Commenting.InlineDocBlock"/>
<exclude name="Spryker.Commenting.DocBlockApiAnnotation"/>
<exclude name="Spryker.Commenting.DocBlockReturnVoid"/>
</rule>

<rule ref="vendor/spryker/code-sniffer/SprykerStrict/ruleset.xml"/>

<!-- Define your own sniffs here -->

<rule ref="Spryker.Internal.SprykerDisallowFunctions">
Expand Down Expand Up @@ -56,5 +59,17 @@
<rule ref="SlevomatCodingStandard.Functions.DisallowTrailingCommaInClosureUse">
<severity>0</severity>
</rule>
<rule ref="SlevomatCodingStandard.TypeHints.DeclareStrictTypes"/>
<rule ref="SlevomatCodingStandard.Operators.DisallowEqualOperators"/>
<rule ref="SlevomatCodingStandard.ControlStructures.EarlyExit"/>
<rule ref="SlevomatCodingStandard.PHP.OptimizedFunctionsWithoutUnpacking"/>
<rule ref="SlevomatCodingStandard.PHP.UselessSemicolon"/>
<rule ref="SlevomatCodingStandard.Variables.DisallowSuperGlobalVariable"/>
<rule ref="SlevomatCodingStandard.Variables.UselessVariable"/>
<rule ref="SlevomatCodingStandard.ControlStructures.UselessTernaryOperator"/>
<rule ref="SlevomatCodingStandard.Functions.UnusedParameter"/>
<rule ref="SlevomatCodingStandard.Variables.UnusedVariable"/>

<!-- Define your own sniffs here -->

</ruleset>
2 changes: 2 additions & 0 deletions src/Orm/Zed/Acl/Persistence/SpyAclGroup.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
* For full license information, please view the LICENSE file that was distributed with this source code.
*/

declare(strict_types = 1);

namespace Orm\Zed\Acl\Persistence;

use Spryker\Zed\Acl\Persistence\Propel\AbstractSpyAclGroup as BaseSpyAclGroup;
Expand Down
2 changes: 2 additions & 0 deletions src/Orm/Zed/Acl/Persistence/SpyAclGroupArchive.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
* For full license information, please view the LICENSE file that was distributed with this source code.
*/

declare(strict_types = 1);

namespace Orm\Zed\Acl\Persistence;

use Spryker\Zed\Acl\Persistence\Propel\AbstractSpyAclGroupArchive as BaseSpyAclGroupArchive;
Expand Down
2 changes: 2 additions & 0 deletions src/Orm/Zed/Acl/Persistence/SpyAclGroupArchiveQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
* For full license information, please view the LICENSE file that was distributed with this source code.
*/

declare(strict_types = 1);

namespace Orm\Zed\Acl\Persistence;

use Spryker\Zed\Acl\Persistence\Propel\AbstractSpyAclGroupArchiveQuery as BaseSpyAclGroupArchiveQuery;
Expand Down
2 changes: 2 additions & 0 deletions src/Orm/Zed/Acl/Persistence/SpyAclGroupQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
* For full license information, please view the LICENSE file that was distributed with this source code.
*/

declare(strict_types = 1);

namespace Orm\Zed\Acl\Persistence;

use Spryker\Zed\Acl\Persistence\Propel\AbstractSpyAclGroupQuery as BaseSpyAclGroupQuery;
Expand Down
2 changes: 2 additions & 0 deletions src/Orm/Zed/Acl/Persistence/SpyAclGroupsHasRoles.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
* For full license information, please view the LICENSE file that was distributed with this source code.
*/

declare(strict_types = 1);

namespace Orm\Zed\Acl\Persistence;

use Spryker\Zed\Acl\Persistence\Propel\AbstractSpyAclGroupsHasRoles as BaseSpyAclGroupsHasRoles;
Expand Down
2 changes: 2 additions & 0 deletions src/Orm/Zed/Acl/Persistence/SpyAclGroupsHasRolesQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
* For full license information, please view the LICENSE file that was distributed with this source code.
*/

declare(strict_types = 1);

namespace Orm\Zed\Acl\Persistence;

use Spryker\Zed\Acl\Persistence\Propel\AbstractSpyAclGroupsHasRolesQuery as BaseSpyAclGroupsHasRolesQuery;
Expand Down
2 changes: 2 additions & 0 deletions src/Orm/Zed/Acl/Persistence/SpyAclRole.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
* For full license information, please view the LICENSE file that was distributed with this source code.
*/

declare(strict_types = 1);

namespace Orm\Zed\Acl\Persistence;

use Spryker\Zed\Acl\Persistence\Propel\AbstractSpyAclRole as BaseSpyAclRole;
Expand Down
2 changes: 2 additions & 0 deletions src/Orm/Zed/Acl/Persistence/SpyAclRoleArchive.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
* For full license information, please view the LICENSE file that was distributed with this source code.
*/

declare(strict_types = 1);

namespace Orm\Zed\Acl\Persistence;

use Spryker\Zed\Acl\Persistence\Propel\AbstractSpyAclRoleArchive as BaseSpyAclRoleArchive;
Expand Down
2 changes: 2 additions & 0 deletions src/Orm/Zed/Acl/Persistence/SpyAclRoleArchiveQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
* For full license information, please view the LICENSE file that was distributed with this source code.
*/

declare(strict_types = 1);

namespace Orm\Zed\Acl\Persistence;

use Spryker\Zed\Acl\Persistence\Propel\AbstractSpyAclRoleArchiveQuery as BaseSpyAclRoleArchiveQuery;
Expand Down
2 changes: 2 additions & 0 deletions src/Orm/Zed/Acl/Persistence/SpyAclRoleQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
* For full license information, please view the LICENSE file that was distributed with this source code.
*/

declare(strict_types = 1);

namespace Orm\Zed\Acl\Persistence;

use Spryker\Zed\Acl\Persistence\Propel\AbstractSpyAclRoleQuery as BaseSpyAclRoleQuery;
Expand Down
2 changes: 2 additions & 0 deletions src/Orm/Zed/Acl/Persistence/SpyAclRule.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
* For full license information, please view the LICENSE file that was distributed with this source code.
*/

declare(strict_types = 1);

namespace Orm\Zed\Acl\Persistence;

use Spryker\Zed\Acl\Persistence\Propel\AbstractSpyAclRule as BaseSpyAclRule;
Expand Down
2 changes: 2 additions & 0 deletions src/Orm/Zed/Acl/Persistence/SpyAclRuleArchive.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
* For full license information, please view the LICENSE file that was distributed with this source code.
*/

declare(strict_types = 1);

namespace Orm\Zed\Acl\Persistence;

use Spryker\Zed\Acl\Persistence\Propel\AbstractSpyAclRuleArchive as BaseSpyAclRuleArchive;
Expand Down
2 changes: 2 additions & 0 deletions src/Orm/Zed/Acl/Persistence/SpyAclRuleArchiveQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
* For full license information, please view the LICENSE file that was distributed with this source code.
*/

declare(strict_types = 1);

namespace Orm\Zed\Acl\Persistence;

use Spryker\Zed\Acl\Persistence\Propel\AbstractSpyAclRuleArchiveQuery as BaseSpyAclRuleArchiveQuery;
Expand Down
2 changes: 2 additions & 0 deletions src/Orm/Zed/Acl/Persistence/SpyAclRuleQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
* For full license information, please view the LICENSE file that was distributed with this source code.
*/

declare(strict_types = 1);

namespace Orm\Zed\Acl\Persistence;

use Spryker\Zed\Acl\Persistence\Propel\AbstractSpyAclRuleQuery as BaseSpyAclRuleQuery;
Expand Down
2 changes: 2 additions & 0 deletions src/Orm/Zed/Acl/Persistence/SpyAclUserHasGroup.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
* For full license information, please view the LICENSE file that was distributed with this source code.
*/

declare(strict_types = 1);

namespace Orm\Zed\Acl\Persistence;

use Spryker\Zed\Acl\Persistence\Propel\AbstractSpyAclUserHasGroup as BaseSpyAclUserHasGroup;
Expand Down
2 changes: 2 additions & 0 deletions src/Orm/Zed/Acl/Persistence/SpyAclUserHasGroupQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
* For full license information, please view the LICENSE file that was distributed with this source code.
*/

declare(strict_types = 1);

namespace Orm\Zed\Acl\Persistence;

use Spryker\Zed\Acl\Persistence\Propel\AbstractSpyAclUserHasGroupQuery as BaseSpyAclUserHasGroupQuery;
Expand Down
2 changes: 2 additions & 0 deletions src/Orm/Zed/AclEntity/Persistence/SpyAclEntityRule.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
* For full license information, please view the LICENSE file that was distributed with this source code.
*/

declare(strict_types = 1);

namespace Orm\Zed\AclEntity\Persistence;

use Orm\Zed\AclEntity\Persistence\Base\SpyAclEntityRule as BaseSpyAclEntityRule;
Expand Down
Loading

0 comments on commit d2b9648

Please sign in to comment.