diff --git a/README.md b/README.md
index 19824bb..8c50ba7 100644
--- a/README.md
+++ b/README.md
@@ -4,44 +4,59 @@ Medium Posts
 Introduction
 ----
 
-A Drupal module used for publishing posts from Drupal to Medium.com by using Medium API.
+A Drupal module used for publishing posts from Drupal to Medium.com by using
+Medium API.
 
-This module is based on [Medium’s API](https://github.com/Medium/medium-api-docs) and [Medium SDK for PHP](https://github.com/jonathantorres/medium-sdk-php/blob/master/tests/MediumTest.php).
+This module is based on[Medium’s API](https://github.com/Medium/medium-api-docs)
+and [Medium SDK for PHP]
+(https://github.com/jonathantorres/medium-sdk-php/blob/master/tests/MediumTest.php).
 
 Using the module
 ----
 
-As a post author, go to your profile setting page `/user/{uid}/edit`, and find the "MEDIUM PUBLISH SETTINGS" and add your 
-"integration token". You can generate an access token from the [Settings](https://medium.com/me/settings) page of your
+As a post author, go to your profile setting page `/user/{uid}/edit`, and find
+the "MEDIUM PUBLISH SETTINGS" and add your "integration token". You can generate
+an access token from the [Settings](https://medium.com/me/settings) page of your
 Medium account.
 
-As an Administrator, go to module settings page in path `/admin/config/medium_posts`.
+As an Administrator, go to module settings page in path
+`/admin/config/medium_posts`.
 
 ### Content Type
-Select a "content type" to be used as Medium post. By default it will use the Drupal build in `Article` content type. 
-But you are able to use any content type if you like. Medium publish uses `title`, `body` and `field_tags` three fields
-so please make sure the content type have those fields.
+Select a "content type" to be used as Medium post. By default it will use the
+Drupal build in `Article` content type. 
+But you are able to use any content type if you like. Medium publish uses
+`title`, `body` and `field_tags` three fields so please make sure the content
+type have those fields.
 
 ### Publish status on Medium.com
-By default the "publish status" is "public", that means you post will be public immediately after be pushed to 
-medium.com. But you can change the "publish status" to "draft" if you'd like to review it on medium.com.
+By default the "publish status" is "public", that means you post will be public
+immediately after be pushed to medium.com. But you can change the
+"publish status" to "draft" if you'd like to review it on medium.com.
 
 ### Push on content publish
-By default, post will be created on Medium.com on the event of your node content's publishing. But you can disable it and use 'medium_posts.manager' service in your code to push the post on any event.
+By default, post will be created on Medium.com on the event of your node
+content's publishing. But you can disable it and use 'medium_posts.manager'
+service in your code to push the post on any event.
 
 ### Workbench Settings
-Diable above "Push on content publish" and enable this if you are using Workbench Moderation moudle to publish node. It will push your post when contnent is changed to your moderation publish status.
+Diable above "Push on content publish" and enable this if you are using
+Workbench Moderation moudle to publish node. It will push your post when
+contnent is changed to your moderation publish status.
 
 
 Drupal Event
 ----
 
-This module dispatch an event every time a node content is successfully pushed to medium.com.
-So you can subscribe `medium_posts.post_pushed` event in any other module to do further stuff, e.g share the medium post url on social media.
+This module dispatch an event every time a node content is successfully pushed
+to medium.com.
+So you can subscribe `medium_posts.post_pushed` event in any other module to do
+further stuff, e.g share the medium post url on social media.
 
 Todo
 ----
 
 - Add test.
 - Put project on drupal.org.
-- Use [encrypt](https://drupal.org/project/encrypt) module to encrypt token storage.
+- Use [encrypt](https://drupal.org/project/encrypt)
+  module to encrypt token storage.
diff --git a/medium_posts.info.yml b/medium_posts.info.yml
index 04dee3a..9465174 100644
--- a/medium_posts.info.yml
+++ b/medium_posts.info.yml
@@ -4,4 +4,4 @@ description: Publish posts to Medium.com by using Medium API.
 core: 8.x
 package: Medium
 dependencies:
-  - user
\ No newline at end of file
+  - user
diff --git a/medium_posts.install b/medium_posts.install
index 6b57336..c1e7058 100644
--- a/medium_posts.install
+++ b/medium_posts.install
@@ -41,7 +41,7 @@ function medium_posts_schema() {
         'not null' => TRUE,
         'default' => '',
         'description' => 'Published node uuid.',
-      ]
+      ],
     ],
     'primary key' => ['mid'],
     'indexes' => [
diff --git a/medium_posts.routing.yml b/medium_posts.routing.yml
index fd299ce..ad1882b 100644
--- a/medium_posts.routing.yml
+++ b/medium_posts.routing.yml
@@ -4,4 +4,4 @@ medium_posts.settings:
     _form: '\Drupal\medium_posts\Form\MediumPostsSettingsForm'
     _title: 'Medium Posts'
   requirements:
-    _permission: 'administer site configuration'
\ No newline at end of file
+    _permission: 'administer site configuration'
diff --git a/src/Event/MediumPublishEvent.php b/src/Event/MediumPublishEvent.php
index fb05740..3258189 100644
--- a/src/Event/MediumPublishEvent.php
+++ b/src/Event/MediumPublishEvent.php
@@ -13,8 +13,9 @@ use Symfony\Component\EventDispatcher\Event;
 class MediumPublishEvent extends Event {
 
   /**
-   * This event is fired everytime a node content is successfully pushed to
-   * medium.com.
+   * This event is fired everytime a node content is successfully.
+   *
+   * Pushed to medium.com.
    *
    * @Event
    */
@@ -30,7 +31,7 @@ class MediumPublishEvent extends Event {
   /**
    * The medium.com post url for that node.
    *
-   * @var string $url;
+   * @var string
    */
   protected $url;
 
@@ -39,7 +40,7 @@ class MediumPublishEvent extends Event {
    *
    * @param \Drupal\node\NodeInterface $node
    *   The Node entity pushed to Medium.
-   * @param $url
+   * @param string $url
    *   The medium.com post url for that node.
    */
   public function __construct(NodeInterface $node, $url) {
diff --git a/src/EventSubscriber/WorkbenchModerationSubscriber.php b/src/EventSubscriber/WorkbenchModerationSubscriber.php
index e625396..304f0fa 100644
--- a/src/EventSubscriber/WorkbenchModerationSubscriber.php
+++ b/src/EventSubscriber/WorkbenchModerationSubscriber.php
@@ -8,7 +8,7 @@ use Drupal\workbench_moderation\Event\WorkbenchModerationTransitionEvent;
 use Symfony\Component\EventDispatcher\EventSubscriberInterface;
 
 /**
- * Class WorkbenchModerationSubscriber
+ * Class WorkbenchModerationSubscriber.
  *
  * @package Drupal\medium_posts\EventSubscriber
  */
@@ -44,8 +44,8 @@ class WorkbenchModerationSubscriber implements EventSubscriberInterface {
   /**
    * {@inheritdoc}
    */
-  static function getSubscribedEvents() {
-    $events = array();
+  public static function getSubscribedEvents() {
+    $events = [];
     $events['workbench_moderation.state_transition'][] = ['pushToMedium'];
     return $events;
   }
diff --git a/src/Form/MediumPostsSettingsForm.php b/src/Form/MediumPostsSettingsForm.php
index ccbc8f8..297a6c1 100644
--- a/src/Form/MediumPostsSettingsForm.php
+++ b/src/Form/MediumPostsSettingsForm.php
@@ -47,7 +47,7 @@ class MediumPostsSettingsForm extends ConfigFormBase {
       '#options' => [
         'public' => 'public',
         'draft' => 'draft',
-        'unlisted' => 'unlisted'
+        'unlisted' => 'unlisted',
       ],
       '#default_value' => $config->get('publish_status'),
       '#description' => $this->t('The status of the post when the post is created on Medium.com.'),
diff --git a/src/MediumPostsManager.php b/src/MediumPostsManager.php
index c2d1533..4f53c0f 100644
--- a/src/MediumPostsManager.php
+++ b/src/MediumPostsManager.php
@@ -194,12 +194,12 @@ class MediumPostsManager implements MediumPostsManagerInterface {
   /**
    * Record the push response in Drupal.
    *
-   * @param $uuid
+   * @param int $uuid
    *   Node uuid.
-   * @param $post_data
+   * @param array $post_data
    *   Medium response data.
    */
-  protected function log($uuid, $post_data) {
+  protected function log($uuid, array $post_data) {
     $fields = [
       'url' => $post_data->url,
       'medium_post_id' => $post_data->id,
@@ -211,7 +211,7 @@ class MediumPostsManager implements MediumPostsManagerInterface {
       ->execute();
 
     if ($mid) {
-      $message = t('Post <strong>@title</strong> has been pushed to medium.com.', ['@title' =>  $post_data->title]);
+      $message = t('Post <strong>@title</strong> has been pushed to medium.com.', ['@title' => $post_data->title]);
       $this->loggerFactory->get('medium_posts')->info($message);
       drupal_set_message($message, 'status');
     }
@@ -223,7 +223,7 @@ class MediumPostsManager implements MediumPostsManagerInterface {
   /**
    * Get user integration token for medium API connection.
    *
-   * @param $uid
+   * @param int $uid
    *   User uid.
    *
    * @return string|bool
diff --git a/src/MediumPostsManagerInterface.php b/src/MediumPostsManagerInterface.php
index eb3f88b..927ba0b 100644
--- a/src/MediumPostsManagerInterface.php
+++ b/src/MediumPostsManagerInterface.php
@@ -52,4 +52,4 @@ interface MediumPostsManagerInterface {
    */
   public function getMediumPostUrl($uuid);
 
-}
\ No newline at end of file
+}
