Skip to content

Commit 39cd98c

Browse files
committed
feat!: mark ObjectManager final
feat!: mark `Store/StoreManager` final feat!: mark `Store/Store` final feat!: mark `Store/StoreGroup` final feat!: mark `Store/Website` final
1 parent e058611 commit 39cd98c

File tree

5 files changed

+6
-10
lines changed

5 files changed

+6
-10
lines changed

src/ObjectManager.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
/**
1111
* Simplistic implementation of Object Manager for testing
1212
*/
13-
class ObjectManager implements ObjectManagerInterface
13+
final class ObjectManager implements ObjectManagerInterface
1414
{
1515
/**
1616
* List of objects instantiated by ObjectManager via get

src/Store/Store.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
/**
1616
* Implementation that imitates real store model behaviour
1717
*/
18-
class Store implements StoreInterface
18+
final class Store implements StoreInterface
1919
{
2020
/**
2121
* Store id

src/Store/StoreGroup.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,16 @@
1515
/**
1616
* Implementation that imitates real store group model behaviour
1717
*/
18-
class StoreGroup implements GroupInterface
18+
final class StoreGroup implements GroupInterface
1919
{
20-
private int $id;
21-
private string $code;
2220
private string $name;
2321
private int $websiteId = 0;
2422
private int $rootCategoryId = 2;
2523
private int $defaultStoreId = 0;
2624
private ?GroupExtensionInterface $extensionAttributes = null;
2725

28-
private function __construct(int $id, string $code)
26+
private function __construct(private int $id, private string $code)
2927
{
30-
$this->id = $id;
31-
$this->code = $code;
3228
$this->name = sprintf('Store Group %s', ucfirst($code));
3329
}
3430

src/Store/StoreManager.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
*
1111
* Manages the collection of websites, store groups, and stores.
1212
*/
13-
class StoreManager implements StoreManagerInterface
13+
final class StoreManager implements StoreManagerInterface
1414
{
1515
/**
1616
* Collection of websites by id

src/Store/Website.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
/**
1616
* Implementation that imitates real store model behaviour
1717
*/
18-
class Website implements WebsiteInterface
18+
final class Website implements WebsiteInterface
1919
{
2020
private string $name;
2121
private int $defaultGroupId = 0;

0 commit comments

Comments
 (0)