Skip to content

Commit

Permalink
Merge pull request #28 from slunak/run-php-cs-fixer
Browse files Browse the repository at this point in the history
Run php-cs-fixer on src
  • Loading branch information
slunak authored Aug 8, 2024
2 parents cd36580 + 8e6344a commit c5c44cf
Show file tree
Hide file tree
Showing 14 changed files with 61 additions and 61 deletions.
8 changes: 4 additions & 4 deletions src/Api/Licensing/License.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,16 @@
class License
{
/** License for Android devices */
const OS_ANDROID = 'Android';
public const OS_ANDROID = 'Android';

/** License for iOS devices */
const OS_IOS = 'iOS';
public const OS_IOS = 'iOS';

/** License for Desktop devices */
const OS_DESKTOP = 'Desktop';
public const OS_DESKTOP = 'Desktop';

/** License for any device type */
const OS_ANY = null;
public const OS_ANY = null;

/**
* @var Application
Expand Down
18 changes: 9 additions & 9 deletions src/Api/Message/Attachment.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,42 +27,42 @@ class Attachment
/**
* Windows OS/2 Bitmap Graphics.
*/
const MIME_TYPE_JPEG = 'image/jpeg';
public const MIME_TYPE_JPEG = 'image/jpeg';

/**
* Portable Network Graphics.
*/
const MIME_TYPE_PNG = 'image/png';
public const MIME_TYPE_PNG = 'image/png';

/**
* Graphics Interchange Format (GIF).
*/
const MIME_TYPE_GIF = 'image/gif';
public const MIME_TYPE_GIF = 'image/gif';

/**
* Windows OS/2 Bitmap Graphics
*/
const MIME_TYPE_BMP = 'image/bmp';
public const MIME_TYPE_BMP = 'image/bmp';

/**
* Icon format
*/
const MIME_TYPE_ICO = 'image/vnd.microsoft.icon';
public const MIME_TYPE_ICO = 'image/vnd.microsoft.icon';

/**
* Scalable Vector Graphics (SVG)
*/
const MIME_TYPE_SVG = 'image/svg+xml';
public const MIME_TYPE_SVG = 'image/svg+xml';

/**
* Tagged Image File Format (TIFF)
*/
const MIME_TYPE_TIFF = 'image/tiff';
public const MIME_TYPE_TIFF = 'image/tiff';

/**
* WEBP image
*/
const MIME_TYPE_WEBP = 'image/webp';
public const MIME_TYPE_WEBP = 'image/webp';

/**
* MIME type.
Expand Down Expand Up @@ -128,7 +128,7 @@ public function setMimeType(string $mimeType): void
if (!in_array($mimeType, $this->getSupportedAttachmentTypes())) {
throw new InvalidArgumentException(sprintf('Attachment type "%s" is not supported.', $mimeType));
}

$this->mimeType = $mimeType;
}

Expand Down
10 changes: 5 additions & 5 deletions src/Api/Message/Priority.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@ class Priority
* messages will be considered lowest priority and will not generate any notification.
* On iOS, the application badge number will be increased.
*/
const LOWEST = -2;
public const LOWEST = -2;

/**
* Low priority.
* Messages with a priority parameter of -1 will be considered low priority and will not generate any sound or vibration,
* but will still generate a popup/scrolling notification depending on the client operating system.
* Messages delivered during a user's quiet hours are sent as though they had a priority of (-1).
*/
const LOW = -1;
public const LOW = -1;

/**
* Normal Priority.
Expand All @@ -51,7 +51,7 @@ class Priority
* If a user has quiet hours set and your message is received during those times,
* your message will be delivered as though it had a priority of -1.
*/
const NORMAL = 0;
public const NORMAL = 0;

/**
* High Priority.
Expand All @@ -60,7 +60,7 @@ class Priority
* High-priority should only be used when necessary and appropriate.
* High-priority messages are highlighted in red in the device clients.
*/
const HIGH = 1;
public const HIGH = 1;

/**
* Emergency Priority.
Expand All @@ -73,7 +73,7 @@ class Priority
* To send an emergency-priority notification, the priority parameter must be set to 2
* and the "retry" and "expire" parameters must be supplied.
*/
const EMERGENCY = 2;
public const EMERGENCY = 2;

/**
* Priority of the message.
Expand Down
46 changes: 23 additions & 23 deletions src/Api/Message/Sound.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,73 +19,73 @@
class Sound
{
/** Pushover (default) */
const PUSHOVER = 'pushover';
public const PUSHOVER = 'pushover';

/** Bike */
const BIKE = 'bike';
public const BIKE = 'bike';

/** Bugle */
const BUGLE = 'bugle';
public const BUGLE = 'bugle';

/** Cash Register */
const CASHREGISTER = 'cashregister';
public const CASHREGISTER = 'cashregister';

/** Classical */
const CLASSICAL = 'classical';
public const CLASSICAL = 'classical';

/** Cosmic */
const COSMIC = 'cosmic';
public const COSMIC = 'cosmic';

/** Falling */
const FALLING = 'falling';
public const FALLING = 'falling';

/** Gamelan */
const GAMELAN = 'gamelan';
public const GAMELAN = 'gamelan';

/** Incoming */
const INCOMING = 'incoming';
public const INCOMING = 'incoming';

/** Intermission */
const INTERMISSION = 'intermission';
public const INTERMISSION = 'intermission';

/** Magic */
const MAGIC = 'magic';
public const MAGIC = 'magic';

/** Mechanical */
const MECHANICAL = 'mechanical';
public const MECHANICAL = 'mechanical';

/** Piano Bar */
const PIANOBAR = 'pianobar';
public const PIANOBAR = 'pianobar';

/** Siren */
const SIREN = 'siren';
public const SIREN = 'siren';

/** Space Alarm */
const SPACEALARM = 'spacealarm';
public const SPACEALARM = 'spacealarm';

/** Tug Boat */
const TUGBOAT = 'tugboat';
public const TUGBOAT = 'tugboat';

/** Alien Alarm (long) */
const ALIEN = 'alien';
public const ALIEN = 'alien';

/** Climb (long) */
const CLIMB = 'climb';
public const CLIMB = 'climb';

/** Persistent (long) */
const PERSISTENT = 'persistent';
public const PERSISTENT = 'persistent';

/** Pushover Echo (long) */
const ECHO = 'echo';
public const ECHO = 'echo';

/** Up Down (long) */
const UPDOWN = 'updown';
public const UPDOWN = 'updown';

/** Vibrate Only */
const VIBRATE = 'vibrate';
public const VIBRATE = 'vibrate';

/** None (silent) */
const NONE = 'none';
public const NONE = 'none';

/**
* Notification Sound
Expand Down
2 changes: 1 addition & 1 deletion src/Client/AssignLicenseClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
*/
class AssignLicenseClient extends Client implements ClientInterface
{
const API_PATH = "licenses/assign.json";
public const API_PATH = "licenses/assign.json";

/**
* @inheritDoc
Expand Down
2 changes: 1 addition & 1 deletion src/Client/CheckLicenseClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
*/
class CheckLicenseClient extends Client implements ClientInterface
{
const API_PATH = "licenses.json";
public const API_PATH = "licenses.json";

/**
* @var License
Expand Down
4 changes: 2 additions & 2 deletions src/Client/Curl/Curl.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ class Curl
/**
* API base URL.
*/
const API_BASE_URL = 'https://api.pushover.net';
public const API_BASE_URL = 'https://api.pushover.net';

/**
* API version.
*/
const API_VERSION = '1';
public const API_VERSION = '1';

/**
* Performs curl request.
Expand Down
2 changes: 1 addition & 1 deletion src/Client/GlancesClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
*/
class GlancesClient extends Client implements ClientInterface
{
const API_PATH = "glances.json";
public const API_PATH = "glances.json";

/**
* @inheritDoc
Expand Down
16 changes: 8 additions & 8 deletions src/Client/GroupsClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@
*/
class GroupsClient extends Client implements ClientInterface
{
const ACTION_RETRIEVE_GROUP = "retrieve_group";
const ACTION_ADD_USER = "add_user";
const ACTION_REMOVE_USER = "delete_user";
const ACTION_DISABLE_USER = "disable_user";
const ACTION_ENABLE_USER = "enable_user";
const ACTION_RENAME_GROUP = "rename";
const ACTION_CREATE_GROUP = "create";
public const ACTION_RETRIEVE_GROUP = "retrieve_group";
public const ACTION_ADD_USER = "add_user";
public const ACTION_REMOVE_USER = "delete_user";
public const ACTION_DISABLE_USER = "disable_user";
public const ACTION_ENABLE_USER = "enable_user";
public const ACTION_RENAME_GROUP = "rename";
public const ACTION_CREATE_GROUP = "create";

/**
* @var Group
Expand Down Expand Up @@ -57,7 +57,7 @@ public function buildApiUrl()
if ($this->action == self::ACTION_CREATE_GROUP) {
return Curl::API_BASE_URL."/".Curl::API_VERSION."/groups.json";
}

if ($this->action == self::ACTION_RETRIEVE_GROUP) {
return Curl::API_BASE_URL."/".Curl::API_VERSION."/groups/".$this->group->getKey().".json?token=".$this->group->getApplication()->getToken();
}
Expand Down
2 changes: 1 addition & 1 deletion src/Client/MessageClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class MessageClient extends Client implements ClientInterface
/**
* The path part of the API URL.
*/
const API_PATH = 'messages.json';
public const API_PATH = 'messages.json';

public function __construct()
{
Expand Down
4 changes: 2 additions & 2 deletions src/Client/Request/Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ class Request implements RequestInterface
/**
* HTTP GET method.
*/
const GET = "GET";
public const GET = "GET";

/**
* HTTP POST method.
*/
const POST = "POST";
public const POST = "POST";

/**
* @var string Either GET or POST.
Expand Down
4 changes: 2 additions & 2 deletions src/Client/Response/CreateGroupResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ public function __construct($curlResponse)
private function processCurlResponse($curlResponse): void
{
$decodedCurlResponse = $this->processInitialCurlResponse($curlResponse);
$this->groupKey = property_exists($decodedCurlResponse,'group') ? $decodedCurlResponse->group : null;
$this->groupKey = property_exists($decodedCurlResponse, 'group') ? $decodedCurlResponse->group : null;
}

/**
* @return string Group key obtained
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Client/SubscriptionClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
*/
class SubscriptionClient extends Client implements ClientInterface
{
const API_PATH = "subscriptions/migrate.json";
public const API_PATH = "subscriptions/migrate.json";

/**
* @inheritDoc
Expand Down
2 changes: 1 addition & 1 deletion src/Client/UserGroupValidationClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

class UserGroupValidationClient extends Client implements ClientInterface
{
const API_PATH = "users/validate.json";
public const API_PATH = "users/validate.json";

/**
* @inheritDoc
Expand Down

0 comments on commit c5c44cf

Please sign in to comment.