Skip to content

Commit 2649b0c

Browse files
committed
[UC-3] Move trait to plugin root & replace import namespace & add os header
1 parent ee2c4da commit 2649b0c

7 files changed

Lines changed: 56 additions & 8 deletions

File tree

src/Api/AbstractClient.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,17 @@
11
<?php
22

3+
/*
4+
* This file has been created by developers from BitBag.
5+
* Feel free to contact us once you face any issues or want to start
6+
* You can find more information about us on https://bitbag.io and write us
7+
* an email on hello@bitbag.io.
8+
*/
9+
310
declare(strict_types=1);
411

512
namespace BitBag\SyliusUserComPlugin\Api;
613

7-
use BitBag\SyliusUserComPlugin\Entity\UserComApiAwareInterface;
14+
use BitBag\SyliusUserComPlugin\Trait\UserComApiAwareInterface;
815
use Psr\Log\LoggerInterface;
916
use Symfony\Component\HttpFoundation\Response;
1017
use Symfony\Contracts\HttpClient\HttpClientInterface;

src/Api/UserApi.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,17 @@
11
<?php
22

3+
/*
4+
* This file has been created by developers from BitBag.
5+
* Feel free to contact us once you face any issues or want to start
6+
* You can find more information about us on https://bitbag.io and write us
7+
* an email on hello@bitbag.io.
8+
*/
9+
310
declare(strict_types=1);
411

512
namespace BitBag\SyliusUserComPlugin\Api;
613

7-
use BitBag\SyliusUserComPlugin\Entity\UserComApiAwareInterface;
14+
use BitBag\SyliusUserComPlugin\Trait\UserComApiAwareInterface;
815
use Symfony\Component\HttpFoundation\Request;
916

1017
final class UserApi extends AbstractClient implements UserApiInterface
@@ -76,7 +83,6 @@ public function createUser(UserComApiAwareInterface $resource, array $data): ?ar
7683
'json' => $data,
7784
'headers' => [
7885
'Content-Type' => 'application/json',
79-
'User-Agent' => 'BitBag SyliusUserComPlugin',
8086
],
8187
]),
8288
);

src/Api/UserApiInterface.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,17 @@
11
<?php
22

3+
/*
4+
* This file has been created by developers from BitBag.
5+
* Feel free to contact us once you face any issues or want to start
6+
* You can find more information about us on https://bitbag.io and write us
7+
* an email on hello@bitbag.io.
8+
*/
9+
310
declare(strict_types=1);
411

512
namespace BitBag\SyliusUserComPlugin\Api;
613

7-
use BitBag\SyliusUserComPlugin\Entity\UserComApiAwareInterface;
14+
use BitBag\SyliusUserComPlugin\Trait\UserComApiAwareInterface;
815

916
interface UserApiInterface
1017
{

tests/Application/src/Entity/UserComApiAwareInterface.php renamed to src/Trait/UserComApiAwareInterface.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
11
<?php
22

3+
/*
4+
* This file has been created by developers from BitBag.
5+
* Feel free to contact us once you face any issues or want to start
6+
* You can find more information about us on https://bitbag.io and write us
7+
* an email on hello@bitbag.io.
8+
*/
9+
310
declare(strict_types=1);
411

5-
namespace BitBag\SyliusUserComPlugin\Entity;
12+
namespace BitBag\SyliusUserComPlugin\Trait;
613

714
interface UserComApiAwareInterface
815
{

tests/Application/src/Entity/UserComApiAwareTrait.php renamed to src/Trait/UserComApiAwareTrait.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
11
<?php
22

3+
/*
4+
* This file has been created by developers from BitBag.
5+
* Feel free to contact us once you face any issues or want to start
6+
* You can find more information about us on https://bitbag.io and write us
7+
* an email on hello@bitbag.io.
8+
*/
9+
310
declare(strict_types=1);
411

5-
namespace BitBag\SyliusUserComPlugin\Entity;
12+
namespace BitBag\SyliusUserComPlugin\Trait;
613

714
trait UserComApiAwareTrait
815
{

tests/Application/src/Entity/Channel.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,17 @@
11
<?php
22

3+
/*
4+
* This file has been created by developers from BitBag.
5+
* Feel free to contact us once you face any issues or want to start
6+
* You can find more information about us on https://bitbag.io and write us
7+
* an email on hello@bitbag.io.
8+
*/
9+
310
declare(strict_types=1);
411

512
namespace Tests\BitBag\SyliusUserComPlugin\Entity;
613

7-
use BitBag\SyliusUserComPlugin\Entity\UserComApiAwareTrait;
14+
use BitBag\SyliusUserComPlugin\Trait\UserComApiAwareTrait;
815
use Sylius\Component\Core\Model\Channel as BaseChannel;
916

1017
class Channel extends BaseChannel implements ChannelInterface

tests/Application/src/Entity/ChannelInterface.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,18 @@
11
<?php
22

3+
/*
4+
* This file has been created by developers from BitBag.
5+
* Feel free to contact us once you face any issues or want to start
6+
* You can find more information about us on https://bitbag.io and write us
7+
* an email on hello@bitbag.io.
8+
*/
9+
310
declare(strict_types=1);
411

512
namespace Tests\BitBag\SyliusUserComPlugin\Entity;
613

7-
use BitBag\SyliusUserComPlugin\Entity\UserComApiAwareInterface;
814
use Sylius\Component\Core\Model\ChannelInterface as BaseChannelInterface;
15+
use BitBag\SyliusUserComPlugin\Trait\UserComApiAwareInterface;
916

1017
interface ChannelInterface extends BaseChannelInterface, UserComApiAwareInterface
1118
{

0 commit comments

Comments
 (0)