Skip to content

Commit 58aa9e7

Browse files
github-actions[bot]DACHCOM Bot
and
DACHCOM Bot
authored
[CS] Refactor (#16)
Co-authored-by: DACHCOM Bot <bot@dachcom.ch>
1 parent e02c300 commit 58aa9e7

15 files changed

+175
-9
lines changed

src/Builder/SocialPostBuilder.php

+11
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
<?php
22

3+
/*
4+
* This source file is available under two different licenses:
5+
* - GNU General Public License version 3 (GPLv3)
6+
* - DACHCOM Commercial License (DCL)
7+
* Full copyright and license information is available in
8+
* LICENSE.md which is distributed with this source code.
9+
*
10+
* @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com)
11+
* @license GPLv3 and DCL
12+
*/
13+
314
namespace SocialData\Connector\Facebook\Builder;
415

516
use Carbon\Carbon;

src/Client/FacebookClient.php

+11-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
<?php
22

3+
/*
4+
* This source file is available under two different licenses:
5+
* - GNU General Public License version 3 (GPLv3)
6+
* - DACHCOM Commercial License (DCL)
7+
* Full copyright and license information is available in
8+
* LICENSE.md which is distributed with this source code.
9+
*
10+
* @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com)
11+
* @license GPLv3 and DCL
12+
*/
13+
314
namespace SocialData\Connector\Facebook\Client;
415

516
use GuzzleHttp\Client;
@@ -85,5 +96,4 @@ protected function getGuzzleClient(): Client
8596
'base_uri' => sprintf('https://graph.facebook.com/%s/', self::GRAPH_VERSION)
8697
]);
8798
}
88-
8999
}

src/Controller/Admin/FacebookController.php

+13
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
<?php
22

3+
/*
4+
* This source file is available under two different licenses:
5+
* - GNU General Public License version 3 (GPLv3)
6+
* - DACHCOM Commercial License (DCL)
7+
* Full copyright and license information is available in
8+
* LICENSE.md which is distributed with this source code.
9+
*
10+
* @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com)
11+
* @license GPLv3 and DCL
12+
*/
13+
314
namespace SocialData\Connector\Facebook\Controller\Admin;
415

516
use Carbon\Carbon;
@@ -185,9 +196,11 @@ public function debugTokenAction(Request $request): JsonResponse
185196
} else {
186197
$normalizedData[$rowKey] = Carbon::parse($rowValue)->toDayDateTimeString();
187198
}
199+
188200
break;
189201
case 'issued_at':
190202
$normalizedData[$rowKey] = Carbon::parse($rowValue)->toDayDateTimeString();
203+
191204
break;
192205
default:
193206
$normalizedData[$rowKey] = $rowValue;

src/Definition/ConnectorDefinition.php

+11
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
<?php
22

3+
/*
4+
* This source file is available under two different licenses:
5+
* - GNU General Public License version 3 (GPLv3)
6+
* - DACHCOM Commercial License (DCL)
7+
* Full copyright and license information is available in
8+
* LICENSE.md which is distributed with this source code.
9+
*
10+
* @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com)
11+
* @license GPLv3 and DCL
12+
*/
13+
314
namespace SocialData\Connector\Facebook\Definition;
415

516
use SocialData\Connector\Facebook\Model\EngineConfiguration;

src/DependencyInjection/Configuration.php

+11
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
<?php
22

3+
/*
4+
* This source file is available under two different licenses:
5+
* - GNU General Public License version 3 (GPLv3)
6+
* - DACHCOM Commercial License (DCL)
7+
* Full copyright and license information is available in
8+
* LICENSE.md which is distributed with this source code.
9+
*
10+
* @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com)
11+
* @license GPLv3 and DCL
12+
*/
13+
314
namespace SocialData\Connector\Facebook\DependencyInjection;
415

516
use Symfony\Component\Config\Definition\Builder\TreeBuilder;

src/DependencyInjection/SocialDataFacebookConnectorExtension.php

+11
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
<?php
22

3+
/*
4+
* This source file is available under two different licenses:
5+
* - GNU General Public License version 3 (GPLv3)
6+
* - DACHCOM Commercial License (DCL)
7+
* Full copyright and license information is available in
8+
* LICENSE.md which is distributed with this source code.
9+
*
10+
* @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com)
11+
* @license GPLv3 and DCL
12+
*/
13+
314
namespace SocialData\Connector\Facebook\DependencyInjection;
415

516
use Symfony\Component\Config\FileLocator;

src/EventListener/Admin/AssetListener.php

+11
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
<?php
22

3+
/*
4+
* This source file is available under two different licenses:
5+
* - GNU General Public License version 3 (GPLv3)
6+
* - DACHCOM Commercial License (DCL)
7+
* Full copyright and license information is available in
8+
* LICENSE.md which is distributed with this source code.
9+
*
10+
* @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com)
11+
* @license GPLv3 and DCL
12+
*/
13+
314
namespace SocialData\Connector\Facebook\EventListener\Admin;
415

516
use Pimcore\Event\BundleManager\PathsEvent;

src/Form/Admin/Type/FacebookEngineType.php

+11
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
<?php
22

3+
/*
4+
* This source file is available under two different licenses:
5+
* - GNU General Public License version 3 (GPLv3)
6+
* - DACHCOM Commercial License (DCL)
7+
* Full copyright and license information is available in
8+
* LICENSE.md which is distributed with this source code.
9+
*
10+
* @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com)
11+
* @license GPLv3 and DCL
12+
*/
13+
314
namespace SocialData\Connector\Facebook\Form\Admin\Type;
415

516
use SocialData\Connector\Facebook\Model\EngineConfiguration;

src/Form/Admin/Type/FacebookFeedType.php

+11
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
<?php
22

3+
/*
4+
* This source file is available under two different licenses:
5+
* - GNU General Public License version 3 (GPLv3)
6+
* - DACHCOM Commercial License (DCL)
7+
* Full copyright and license information is available in
8+
* LICENSE.md which is distributed with this source code.
9+
*
10+
* @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com)
11+
* @license GPLv3 and DCL
12+
*/
13+
314
namespace SocialData\Connector\Facebook\Form\Admin\Type;
415

516
use SocialData\Connector\Facebook\Model\FeedConfiguration;

src/Model/EngineConfiguration.php

+11
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
<?php
22

3+
/*
4+
* This source file is available under two different licenses:
5+
* - GNU General Public License version 3 (GPLv3)
6+
* - DACHCOM Commercial License (DCL)
7+
* Full copyright and license information is available in
8+
* LICENSE.md which is distributed with this source code.
9+
*
10+
* @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com)
11+
* @license GPLv3 and DCL
12+
*/
13+
314
namespace SocialData\Connector\Facebook\Model;
415

516
use SocialData\Connector\Facebook\Form\Admin\Type\FacebookEngineType;

src/Model/FeedConfiguration.php

+11
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
<?php
22

3+
/*
4+
* This source file is available under two different licenses:
5+
* - GNU General Public License version 3 (GPLv3)
6+
* - DACHCOM Commercial License (DCL)
7+
* Full copyright and license information is available in
8+
* LICENSE.md which is distributed with this source code.
9+
*
10+
* @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com)
11+
* @license GPLv3 and DCL
12+
*/
13+
314
namespace SocialData\Connector\Facebook\Model;
415

516
use SocialData\Connector\Facebook\Form\Admin\Type\FacebookFeedType;

src/QueryBuilder/FacebookQueryBuilder.php

+16-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
<?php
22

3+
/*
4+
* This source file is available under two different licenses:
5+
* - GNU General Public License version 3 (GPLv3)
6+
* - DACHCOM Commercial License (DCL)
7+
* Full copyright and license information is available in
8+
* LICENSE.md which is distributed with this source code.
9+
*
10+
* @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com)
11+
* @license GPLv3 and DCL
12+
*/
13+
314
namespace SocialData\Connector\Facebook\QueryBuilder;
415

516
final class FacebookQueryBuilder
@@ -13,17 +24,17 @@ public function __construct(?string $graphEndpoint = '')
1324
}
1425
}
1526

16-
public function node(string $graphNodeName): FacebookQueryBuilder
27+
public function node(string $graphNodeName): self
1728
{
18-
return new FacebookQueryBuilder($graphNodeName);
29+
return new self($graphNodeName);
1930
}
2031

2132
public function edge(string $edgeName, array $fields = []): GraphEdge
2233
{
2334
return new GraphEdge($edgeName, $fields);
2435
}
2536

26-
public function fields(mixed $fields): FacebookQueryBuilder
37+
public function fields(mixed $fields): self
2738
{
2839
if (!is_array($fields)) {
2940
$fields = func_get_args();
@@ -34,14 +45,14 @@ public function fields(mixed $fields): FacebookQueryBuilder
3445
return $this;
3546
}
3647

37-
public function limit(int $limit): FacebookQueryBuilder
48+
public function limit(int $limit): self
3849
{
3950
$this->graphNode->limit($limit);
4051

4152
return $this;
4253
}
4354

44-
public function modifiers(array $data): FacebookQueryBuilder
55+
public function modifiers(array $data): self
4556
{
4657
$this->graphNode->modifiers($data);
4758

src/QueryBuilder/GraphEdge.php

+11
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
<?php
22

3+
/*
4+
* This source file is available under two different licenses:
5+
* - GNU General Public License version 3 (GPLv3)
6+
* - DACHCOM Commercial License (DCL)
7+
* Full copyright and license information is available in
8+
* LICENSE.md which is distributed with this source code.
9+
*
10+
* @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com)
11+
* @license GPLv3 and DCL
12+
*/
13+
314
namespace SocialData\Connector\Facebook\QueryBuilder;
415

516
class GraphEdge extends GraphNode

src/QueryBuilder/GraphNode.php

+14-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
<?php
22

3+
/*
4+
* This source file is available under two different licenses:
5+
* - GNU General Public License version 3 (GPLv3)
6+
* - DACHCOM Commercial License (DCL)
7+
* Full copyright and license information is available in
8+
* LICENSE.md which is distributed with this source code.
9+
*
10+
* @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com)
11+
* @license GPLv3 and DCL
12+
*/
13+
314
namespace SocialData\Connector\Facebook\QueryBuilder;
415

516
class GraphNode
@@ -23,7 +34,7 @@ public function __construct(string $name, array $fields = [], int $limit = 0)
2334
}
2435
}
2536

26-
public function modifiers(array $data): GraphNode
37+
public function modifiers(array $data): self
2738
{
2839
$this->modifiers = array_merge($this->modifiers, $data);
2940

@@ -40,7 +51,7 @@ public function getModifier(string $key): mixed
4051
return $this->modifiers[$key] ?? null;
4152
}
4253

43-
public function limit(int $limit): GraphNode
54+
public function limit(int $limit): self
4455
{
4556
return $this->modifiers([
4657
static::PARAM_LIMIT => $limit,
@@ -52,7 +63,7 @@ public function getLimit(): ?int
5263
return $this->getModifier(static::PARAM_LIMIT);
5364
}
5465

55-
public function fields(mixed $fields): GraphNode
66+
public function fields(mixed $fields): self
5667
{
5768
if (!is_array($fields)) {
5869
$fields = func_get_args();

src/SocialDataFacebookConnectorBundle.php

+11
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
<?php
22

3+
/*
4+
* This source file is available under two different licenses:
5+
* - GNU General Public License version 3 (GPLv3)
6+
* - DACHCOM Commercial License (DCL)
7+
* Full copyright and license information is available in
8+
* LICENSE.md which is distributed with this source code.
9+
*
10+
* @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com)
11+
* @license GPLv3 and DCL
12+
*/
13+
314
namespace SocialData\Connector\Facebook;
415

516
use Pimcore\Extension\Bundle\Traits\PackageVersionTrait;

0 commit comments

Comments
 (0)