@@ -36,15 +36,15 @@ |
||
| 36 | 36 | * @param string $pageId Identifier of the page, on which the post will be published |
| 37 | 37 | */ |
| 38 | 38 | public function __construct(Facebook $facebook, string $pageId) |
| 39 | - { |
|
| 39 | + { |
|
| 40 | 40 | $this->facebook = $facebook; |
| 41 | 41 | $this->pageId = $pageId; |
| 42 | - } |
|
| 42 | + } |
|
| 43 | 43 | |
| 44 | 44 | /** |
| 45 | 45 | * {@inheritdoc} |
| 46 | 46 | */ |
| 47 | - public function publish( |
|
| 47 | + public function publish( |
|
| 48 | 48 | string $message, |
| 49 | 49 | string $link = '', |
| 50 | 50 | string $pictureLink = '', |
@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | namespace MartinGeorgiev\SocialPost\Provider\Facebook; |
| 6 | 6 | |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | string $description = '' |
| 53 | 53 | ): bool { |
| 54 | 54 | try { |
| 55 | - $publishPostEndpoint = '/' . $this->pageId. '/feed'; |
|
| 55 | + $publishPostEndpoint = '/' . $this->pageId . '/feed'; |
|
| 56 | 56 | $response = $this->facebook->post($publishPostEndpoint, $this->prepareParams($message, $link, $pictureLink, $caption, $description)); |
| 57 | 57 | $post = $response->getGraphNode(); |
| 58 | 58 | |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | namespace MartinGeorgiev\SocialPost\Provider; |
| 6 | 6 | |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | * @param SocialNetworkPublisher[] $publishers List of instantiated SocialNetworkPublisher's |
| 28 | 28 | */ |
| 29 | 29 | public function __construct(...$publishers) |
| 30 | - { |
|
| 30 | + { |
|
| 31 | 31 | foreach ($publishers as $publisher) { |
| 32 | 32 | if (!($publisher instanceof SocialNetworkPublisher)) { |
| 33 | 33 | throw new InvalidArgumentException(sprintf('At least one of the given publishers is not implementing %s', SocialNetworkPublisher::class)); |
@@ -35,12 +35,12 @@ discard block |
||
| 35 | 35 | |
| 36 | 36 | $this->publishers[] = $publisher; |
| 37 | 37 | } |
| 38 | - } |
|
| 38 | + } |
|
| 39 | 39 | |
| 40 | 40 | /** |
| 41 | 41 | * {@inheritdoc} |
| 42 | 42 | */ |
| 43 | - public function publish( |
|
| 43 | + public function publish( |
|
| 44 | 44 | string $message, |
| 45 | 45 | string $link = '', |
| 46 | 46 | string $pictureLink = '', |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | namespace MartinGeorgiev\SocialPost\Provider; |
| 6 | 6 | |
@@ -30,14 +30,14 @@ |
||
| 30 | 30 | * @param TwitterOAuth $twitter Ready to use instance of TwitterOAuth |
| 31 | 31 | */ |
| 32 | 32 | public function __construct(TwitterOAuth $twitter) |
| 33 | - { |
|
| 33 | + { |
|
| 34 | 34 | $this->twitter = $twitter; |
| 35 | - } |
|
| 35 | + } |
|
| 36 | 36 | |
| 37 | 37 | /** |
| 38 | 38 | * {@inheritdoc} |
| 39 | 39 | */ |
| 40 | - public function publish( |
|
| 40 | + public function publish( |
|
| 41 | 41 | string $message, |
| 42 | 42 | string $link = '', |
| 43 | 43 | string $pictureLink = '', |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | namespace MartinGeorgiev\SocialPost\Provider\Twitter; |
| 6 | 6 | |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | namespace MartinGeorgiev\SocialPost\Provider; |
| 6 | 6 | |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | namespace MartinGeorgiev\SocialPost\DependencyInjection; |
| 6 | 6 | |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | namespace MartinGeorgiev\SocialPost\DependencyInjection\Compiler; |
| 6 | 6 | |
@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | namespace MartinGeorgiev\SocialPost\DependencyInjection; |
| 6 | 6 | |
@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | public function load(array $configs, ContainerBuilder $container) |
| 25 | 25 | { |
| 26 | 26 | $configuration = $this->processConfiguration(new Configuration(), $configs); |
| 27 | - $loader = new YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); |
|
| 27 | + $loader = new YamlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config')); |
|
| 28 | 28 | $loader->load('services.yml'); |
| 29 | 29 | |
| 30 | 30 | $container->setParameter('social_post.configuration.publish_on', $configuration['publish_on']); |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | namespace MartinGeorgiev\SocialPost; |
| 6 | 6 | |