Skip to content

Commit f6f9730

Browse files
committed
chore(API-1925): Upgrade PHP code style from PSR-2 to PSR-12
1 parent d6d5a29 commit f6f9730

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+132
-124
lines changed

.php_cs.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
return (new PhpCsFixer\Config())
44
->setRules(array(
5-
'@PSR2' => true,
5+
'@PSR12' => true,
66
'linebreak_after_opening_tag' => true,
77
'ordered_imports' => true,
88
))

src/AkeneoPimClientInterface.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,9 +136,9 @@ public function getAssetAttributeOptionApi(): AssetAttributeOptionApiInterface;
136136

137137
public function getAssetMediaFileApi(): AssetMediaFileApiInterface;
138138

139-
public function getProductUuidApi() : ProductUuidApiInterface;
139+
public function getProductUuidApi(): ProductUuidApiInterface;
140140

141-
public function getProductDraftUuidApi() : ProductDraftUuidApiInterface;
141+
public function getProductDraftUuidApi(): ProductDraftUuidApiInterface;
142142

143143
public function getAppCatalogApi(): AppCatalogApiInterface;
144144

src/Api/AppCatalog/AppCatalogApi.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
declare(strict_types=1);
34

45
namespace Akeneo\Pim\ApiClient\Api\AppCatalog;
@@ -16,8 +17,8 @@
1617
*/
1718
class AppCatalogApi implements AppCatalogApiInterface
1819
{
19-
const APP_CATALOGS_URI = 'api/rest/v1/catalogs';
20-
const APP_CATALOG_URI = 'api/rest/v1/catalogs/%s';
20+
public const APP_CATALOGS_URI = 'api/rest/v1/catalogs';
21+
public const APP_CATALOG_URI = 'api/rest/v1/catalogs/%s';
2122

2223
protected ResourceClientInterface $resourceClient;
2324
protected PageFactoryInterface $pageFactory;

src/Api/AppCatalog/AppCatalogApiInterface.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
declare(strict_types=1);
34

45
namespace Akeneo\Pim\ApiClient\Api\AppCatalog;

src/Api/AppCatalog/AppCatalogProductApi.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
declare(strict_types=1);
34

45
namespace Akeneo\Pim\ApiClient\Api\AppCatalog;
@@ -14,7 +15,7 @@
1415
*/
1516
class AppCatalogProductApi implements AppCatalogProductApiInterface
1617
{
17-
const APP_CATALOG_PRODUCT_URI = '/api/rest/v1/catalogs/%s/product-uuids';
18+
public const APP_CATALOG_PRODUCT_URI = '/api/rest/v1/catalogs/%s/product-uuids';
1819

1920
protected ResourceClientInterface $resourceClient;
2021
protected PageFactoryInterface $pageFactory;

src/Api/AppCatalog/AppCatalogProductApiInterface.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
declare(strict_types=1);
34

45
namespace Akeneo\Pim\ApiClient\Api\AppCatalog;

src/Api/AssetApi.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
*/
2323
class AssetApi implements AssetApiInterface
2424
{
25-
const ASSETS_URI = '/api/rest/v1/assets';
26-
const ASSET_URI = '/api/rest/v1/assets/%s';
25+
public const ASSETS_URI = '/api/rest/v1/assets';
26+
public const ASSET_URI = '/api/rest/v1/assets/%s';
2727

2828
/** @var ResourceClientInterface */
2929
private $resourceClient;

src/Api/AssetCategoryApi.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
*/
2323
class AssetCategoryApi implements AssetCategoryApiInterface
2424
{
25-
const ASSET_CATEGORIES_URI = '/api/rest/v1/asset-categories';
26-
const ASSET_CATEGORY_URI = '/api/rest/v1/asset-categories/%s';
25+
public const ASSET_CATEGORIES_URI = '/api/rest/v1/asset-categories';
26+
public const ASSET_CATEGORY_URI = '/api/rest/v1/asset-categories/%s';
2727

2828
/** @var ResourceClientInterface */
2929
private $resourceClient;

src/Api/AssetManager/AssetApi.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111

1212
class AssetApi implements AssetApiInterface
1313
{
14-
const ASSET_URI= 'api/rest/v1/asset-families/%s/assets/%s';
15-
const ASSETS_URI = 'api/rest/v1/asset-families/%s/assets';
14+
public const ASSET_URI= 'api/rest/v1/asset-families/%s/assets/%s';
15+
public const ASSETS_URI = 'api/rest/v1/asset-families/%s/assets';
1616

1717
/** @var ResourceClientInterface */
1818
private $resourceClient;

src/Api/AssetManager/AssetAttributeApi.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88

99
class AssetAttributeApi implements AssetAttributeApiInterface
1010
{
11-
const ASSET_ATTRIBUTE_URI = 'api/rest/v1/asset-families/%s/attributes/%s';
12-
const ASSET_ATTRIBUTES_URI = 'api/rest/v1/asset-families/%s/attributes';
11+
public const ASSET_ATTRIBUTE_URI = 'api/rest/v1/asset-families/%s/attributes/%s';
12+
public const ASSET_ATTRIBUTES_URI = 'api/rest/v1/asset-families/%s/attributes';
1313

1414
/** @var ResourceClientInterface */
1515
private $resourceClient;

0 commit comments

Comments
 (0)