Skip to content

Commit

Permalink
chore: style fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
atymic authored Feb 21, 2023
1 parent 38f9845 commit 13a7b7d
Show file tree
Hide file tree
Showing 11 changed files with 72 additions and 120 deletions.
11 changes: 4 additions & 7 deletions src/OneSignalButton.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ class OneSignalButton
protected $icon;

/**
* @param string $id
*
* @param string $id
* @return static
*/
public static function create($id)
Expand All @@ -24,7 +23,7 @@ public static function create($id)
}

/**
* @param string $id
* @param string $id
*/
public function __construct($id)
{
Expand All @@ -34,8 +33,7 @@ public function __construct($id)
/**
* Set the message icon.
*
* @param string $value
*
* @param string $value
* @return $this
*/
public function icon($value)
Expand All @@ -48,8 +46,7 @@ public function icon($value)
/**
* Set the message subject.
*
* @param string $value
*
* @param string $value
* @return $this
*/
public function text($value)
Expand Down
13 changes: 6 additions & 7 deletions src/OneSignalChannel.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ public function __construct(OneSignalClient $oneSignal)
/**
* Send the given notification.
*
* @param mixed $notifiable
* @param \Illuminate\Notifications\Notification $notification
*
* @param mixed $notifiable
* @param \Illuminate\Notifications\Notification $notification
* @return \Psr\Http\Message\ResponseInterface
*
* @throws \NotificationChannels\OneSignal\Exceptions\CouldNotSendNotification
*/
public function send($notifiable, Notification $notification)
Expand All @@ -45,10 +45,9 @@ public function send($notifiable, Notification $notification)
}

/**
* @param mixed $notifiable
* @param \Illuminate\Notifications\Notification $notification
* @param mixed $targeting
*
* @param mixed $notifiable
* @param \Illuminate\Notifications\Notification $notification
* @param mixed $targeting
* @return array
*/
protected function payload($notifiable, $notification, $userIds)
Expand Down
32 changes: 12 additions & 20 deletions src/OneSignalMessage.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ class OneSignalMessage
protected $payload = [];

/**
* @param string $body
*
* @param string $body
* @return static
*/
public static function create($body = '')
Expand All @@ -29,7 +28,7 @@ public static function create($body = '')
}

/**
* @param string $body
* @param string $body
*/
public function __construct($body = '')
{
Expand All @@ -39,8 +38,7 @@ public function __construct($body = '')
/**
* Set the message body.
*
* @param mixed $value
*
* @param mixed $value
* @return $this
*/
public function setBody($value)
Expand All @@ -51,8 +49,7 @@ public function setBody($value)
/**
* Set the message subject.
*
* @param mixed $value
*
* @param mixed $value
* @return $this
*/
public function setSubject($value)
Expand All @@ -63,8 +60,7 @@ public function setSubject($value)
/**
* Set the message template_id.
*
* @param string $value
*
* @param string $value
* @return $this
*/
public function setTemplate($value)
Expand All @@ -75,8 +71,7 @@ public function setTemplate($value)
}

/**
* @param mixed $value
*
* @param mixed $value
* @return array
*/
protected function parseValueToArray($value)
Expand All @@ -87,9 +82,8 @@ protected function parseValueToArray($value)
/**
* Set additional data.
*
* @param string $key
* @param mixed $value
*
* @param string $key
* @param mixed $value
* @return $this
*/
public function setData(string $key, $value)
Expand All @@ -100,9 +94,8 @@ public function setData(string $key, $value)
/**
* Set parameters.
*
* @param string $key
* @param mixed $value
*
* @param string $key
* @param mixed $value
* @return $this
*/
public function setParameter(string $key, $value)
Expand All @@ -115,9 +108,8 @@ public function setParameter(string $key, $value)
/**
* Get parameters.
*
* @param string $key
* @param mixed $default
*
* @param string $key
* @param mixed $default
* @return mixed
*/
public function getParameter(string $key, $default = null)
Expand Down
22 changes: 8 additions & 14 deletions src/OneSignalPayloadFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,9 @@ class OneSignalPayloadFactory
/**
* Make a one signal notification payload.
*
* @param mixed $notifiable
* @param \Illuminate\Notifications\Notification $notification
* @param mixed $targeting
*
* @param mixed $notifiable
* @param \Illuminate\Notifications\Notification $notification
* @param mixed $targeting
* @return array
*/
public static function make($notifiable, Notification $notification, $targeting): array
Expand Down Expand Up @@ -43,8 +42,7 @@ public static function make($notifiable, Notification $notification, $targeting)
}

/**
* @param mixed $targeting
*
* @param mixed $targeting
* @return bool
*/
protected static function isTargetingIncludedSegments($targeting)
Expand All @@ -53,8 +51,7 @@ protected static function isTargetingIncludedSegments($targeting)
}

/**
* @param mixed $targeting
*
* @param mixed $targeting
* @return bool
*/
protected static function isTargetingExternalUserIds($targeting)
Expand All @@ -63,8 +60,7 @@ protected static function isTargetingExternalUserIds($targeting)
}

/**
* @param mixed $targeting
*
* @param mixed $targeting
* @return bool
*/
protected static function isTargetingExcludedSegments($targeting)
Expand All @@ -73,8 +69,7 @@ protected static function isTargetingExcludedSegments($targeting)
}

/**
* @param mixed $targeting
*
* @param mixed $targeting
* @return bool
*/
protected static function isTargetingEmail($targeting)
Expand All @@ -83,8 +78,7 @@ protected static function isTargetingEmail($targeting)
}

/**
* @param mixed $targeting
*
* @param mixed $targeting
* @return bool
*/
protected static function isTargetingTags($targeting)
Expand Down
14 changes: 5 additions & 9 deletions src/OneSignalWebButton.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ class OneSignalWebButton
protected $url;

/**
* @param string $id
*
* @param string $id
* @return static
*/
public static function create($id)
Expand All @@ -27,7 +26,7 @@ public static function create($id)
}

/**
* @param string $id
* @param string $id
*/
public function __construct($id)
{
Expand All @@ -37,8 +36,7 @@ public function __construct($id)
/**
* Set the message icon.
*
* @param string $value
*
* @param string $value
* @return $this
*/
public function icon($value)
Expand All @@ -51,8 +49,7 @@ public function icon($value)
/**
* Set the message subject.
*
* @param string $value
*
* @param string $value
* @return $this
*/
public function text($value)
Expand All @@ -65,8 +62,7 @@ public function text($value)
/**
* Set the message url.
*
* @param string $value
*
* @param string $value
* @return $this
*/
public function url($value)
Expand Down
26 changes: 9 additions & 17 deletions src/Traits/Categories/AppearanceHelpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ trait AppearanceHelpers
/**
* Set the iOS badge increment count.
*
* @param int $count
*
* @param int $count
* @return $this
*/
public function incrementIosBadgeCount(int $count = 1)
Expand All @@ -20,8 +19,7 @@ public function incrementIosBadgeCount(int $count = 1)
/**
* Set the iOS badge decrement count.
*
* @param int $count
*
* @param int $count
* @return $this
*/
public function decrementIosBadgeCount(int $count = 1)
Expand All @@ -33,8 +31,7 @@ public function decrementIosBadgeCount(int $count = 1)
/**
* Set the iOS badge count.
*
* @param int $count
*
* @param int $count
* @return $this
*/
public function setIosBadgeCount(int $count)
Expand All @@ -46,8 +43,7 @@ public function setIosBadgeCount(int $count)
/**
* Set the iOS Sound.
*
* @param string $soundUrl
*
* @param string $soundUrl
* @return $this
*/
public function setIosSound(string $soundUrl)
Expand All @@ -58,8 +54,7 @@ public function setIosSound(string $soundUrl)
/**
* Set the Android Sound.
*
* @param string $soundUrl
*
* @param string $soundUrl
* @return $this
*/
public function setAndroidSound(string $soundUrl)
Expand All @@ -70,8 +65,7 @@ public function setAndroidSound(string $soundUrl)
/**
* Set the Windows Sound.
*
* @param string $soundUrl
*
* @param string $soundUrl
* @return $this
*/
public function setWindowsSound(string $soundUrl)
Expand All @@ -83,8 +77,7 @@ public function setWindowsSound(string $soundUrl)
/**
* Set the Sound for all Systems.
*
* @param string $soundUrl
*
* @param string $soundUrl
* @return $this
*/
public function setSound(string $soundUrl)
Expand All @@ -97,7 +90,7 @@ public function setSound(string $soundUrl)
/**
* Set the message icon.
*
* @param string $iconPath
* @param string $iconPath
*
* @deprecated use setIcon instead
*
Expand All @@ -111,8 +104,7 @@ public function icon(string $iconPath)
/**
* Set the message icon.
*
* @param string $iconPath
*
* @param string $iconPath
* @return $this
*/
public function setIcon(string $iconPath)
Expand Down
Loading

0 comments on commit 13a7b7d

Please sign in to comment.