Skip to content

Commit

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

FRW-9281 Adjusted project level CS rules.
  • Loading branch information
asmarovydlo authored Dec 27, 2024
2 parents ad98315 + 9027c24 commit c71da12
Show file tree
Hide file tree
Showing 1,439 changed files with 3,270 additions and 360 deletions.
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\SecuritySystemUser\SecuritySystemUserConstants;
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\DummyPayment\DummyPaymentConfig;
use Spryker\Shared\Kernel\KernelConstants;
use Spryker\Shared\Nopayment\NopaymentConfig;
Expand Down
2 changes: 2 additions & 0 deletions config/Shared/common/config_services-devvm.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types = 1);

use Pyz\Shared\Scheduler\SchedulerConfig;
use Spryker\Shared\Event\EventConstants;
use Spryker\Shared\Propel\PropelConstants;
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
3 changes: 2 additions & 1 deletion 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 Expand Up @@ -50,7 +52,6 @@
$glueBackendHost = $dynamicStoreEnabled ? 'gluebackend.eu.spryker.test' : 'gluebackend.de.spryker.test';
$glueStorefrontHost = $dynamicStoreEnabled ? 'gluestorefront.eu.spryker.test' : 'gluestorefront.de.spryker.test';
$backofficeHost = $dynamicStoreEnabled ? 'backoffice.eu.spryker.test' : 'backoffice.de.spryker.test';
$merchantPortalHost = $dynamicStoreEnabled ? 'mp.eu.spryker.test' : 'mp.de.spryker.test';
$backendGatewayHost = $dynamicStoreEnabled ? 'backend-gateway.eu.spryker.test' : 'backend-gateway.de.spryker.test';
$backendApiHost = $dynamicStoreEnabled ? 'backend-api.eu.spryker.test' : 'backend-api.de.spryker.test';

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.demo.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types = 1);

// ############################################################################
// ############################## DEMO/TESTING 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 Spryker\Shared\AppCatalogGui\AppCatalogGuiConstants;
use Spryker\Shared\Application\ApplicationConstants;
Expand Down
2 changes: 2 additions & 0 deletions config/Shared/config_default-docker.production.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\Application\ApplicationConstants;
use Spryker\Shared\Customer\CustomerConstants;
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 @@ -278,7 +280,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 @@ -380,7 +382,7 @@

// >>> STORAGE

$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);

/**
* Here go your local configs which should not be version controlled (tokens, passwords, keys, ...)
*/
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 getenv('SPRYKER_DEFAULT_STORE') ?: '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: 19 additions & 6 deletions phpcs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,15 @@
<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>

<!-- Define your own sniffs here -->
<rule ref="vendor/spryker/code-sniffer/SprykerStrict/ruleset.xml"/>

<rule ref="Spryker.Internal.SprykerDisallowFunctions">
<properties>
Expand Down Expand Up @@ -57,4 +58,16 @@
<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/ApiKey/Persistence/SpyApiKey.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\ApiKey\Persistence;

use Spryker\Zed\ApiKey\Persistence\Propel\AbstractSpyApiKey as BaseSpyApiKey;
Expand Down
2 changes: 2 additions & 0 deletions src/Orm/Zed/ApiKey/Persistence/SpyApiKeyQuery.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\ApiKey\Persistence;

use Spryker\Zed\ApiKey\Persistence\Propel\AbstractSpyApiKeyQuery as BaseSpyApiKeyQuery;
Expand Down
2 changes: 2 additions & 0 deletions src/Orm/Zed/Asset/Persistence/SpyAsset.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\Asset\Persistence;

use Spryker\Zed\Asset\Persistence\Propel\AbstractSpyAsset as BaseSpyAsset;
Expand Down
2 changes: 2 additions & 0 deletions src/Orm/Zed/Asset/Persistence/SpyAssetQuery.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\Asset\Persistence;

use Spryker\Zed\Asset\Persistence\Propel\AbstractSpyAssetQuery as BaseSpyAssetQuery;
Expand Down
Loading

0 comments on commit c71da12

Please sign in to comment.