for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
class Notifications_NotifyMyAndroid implements IPushNotification {
You can fix this by adding a namespace to your class:
namespace YourVendor; class YourClass { }
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.
private $apiKey;
public function __construct($apikey){
$this->apiKey = $apikey;
}
static $priorities = array(
$priorities
The PSR-2 coding standard requires that all properties in a class have their visibility explicitly declared. If you declare a property using
class A { var $property; }
the property is implicitly global.
To learn more about the PSR-2, please see the PHP-FIG site on the PSR-2.
0 => 'info',
2 => 'error',
);
public static function getName(){
return "notifymyandroid.com";
public static function getParameters(){
return array(
'apikey' => 'API key',
public function notify($message, $severity = 'info', $event = null){
curl_setopt_array($ch = curl_init(), array(
CURLOPT_URL => "https://www.notifymyandroid.com/publicapi/notify",
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POSTFIELDS => http_build_query($data = array(
"apikey" => $this->apiKey,
"application" => "CryptoGlance",
"description" => $message,
"content-type" => "text/html",
"event" => $event,
"priority" => array_search($severity, self::$priorities),
)),
));
curl_exec($ch);
curl_close($ch);
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.