aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar logmanoriginal <logmanoriginal@users.noreply.github.com> 2018-11-13 18:27:05 +0100
committerGravatar logmanoriginal <logmanoriginal@users.noreply.github.com> 2018-11-13 18:27:05 +0100
commitc15b25a07d915336696ff5f2c34a75d9b7a2237c (patch)
tree71c7191ba88459da2e500dc8a75619b4d6decd7f
parentc296e73c18d01bf3d6e848fc7bc7c7581301947b (diff)
downloadrss-bridge-c15b25a07d915336696ff5f2c34a75d9b7a2237c.tar.gz
rss-bridge-c15b25a07d915336696ff5f2c34a75d9b7a2237c.tar.zst
rss-bridge-c15b25a07d915336696ff5f2c34a75d9b7a2237c.zip
core: Fix PHPCS violations
-rw-r--r--lib/Bridge.php10
-rw-r--r--lib/Cache.php8
-rw-r--r--lib/Format.php8
3 files changed, 13 insertions, 13 deletions
diff --git a/lib/Bridge.php b/lib/Bridge.php
index 378f2979..57d4d60b 100644
--- a/lib/Bridge.php
+++ b/lib/Bridge.php
@@ -19,7 +19,7 @@ class Bridge {
* @param string $nameBridge Defined bridge name you want use
* @return Bridge object dedicated
*/
- static public function create($nameBridge){
+ public static function create($nameBridge){
if(!preg_match('@^[A-Z][a-zA-Z0-9-]*$@', $nameBridge)) {
$message = <<<EOD
'nameBridge' must start with one uppercase character followed or not by
@@ -45,7 +45,7 @@ EOD;
return false;
}
- static public function setDir($dirBridge){
+ public static function setDir($dirBridge){
if(!is_string($dirBridge)) {
throw new \InvalidArgumentException('Dir bridge must be a string.');
}
@@ -57,7 +57,7 @@ EOD;
self::$dirBridge = $dirBridge;
}
- static public function getDir(){
+ public static function getDir(){
if(is_null(self::$dirBridge)) {
throw new \LogicException(__CLASS__ . ' class need to know bridge path !');
}
@@ -69,7 +69,7 @@ EOD;
* Lists the available bridges.
* @return array List of the bridges
*/
- static public function listBridges(){
+ public static function listBridges(){
static $listBridge = array(); // Initialized on first call
@@ -91,7 +91,7 @@ EOD;
/**
* @return bool Returns true if the given bridge is whitelisted.
*/
- static public function isWhitelisted($name){
+ public static function isWhitelisted($name){
return in_array(Bridge::sanitizeBridgeName($name), Bridge::getWhitelist());
}
diff --git a/lib/Cache.php b/lib/Cache.php
index b3ab4826..51d37c1b 100644
--- a/lib/Cache.php
+++ b/lib/Cache.php
@@ -8,7 +8,7 @@ class Cache {
throw new \LogicException('Please use ' . __CLASS__ . '::create for new object.');
}
- static public function create($nameCache){
+ public static function create($nameCache){
if(!static::isValidNameCache($nameCache)) {
throw new \InvalidArgumentException('Name cache must be at least one
uppercase follow or not by alphanumeric or dash characters.');
@@ -25,7 +25,7 @@ class Cache {
return new $nameCache();
}
- static public function setDir($dirCache){
+ public static function setDir($dirCache){
if(!is_string($dirCache)) {
throw new \InvalidArgumentException('Dir cache must be a string.');
}
@@ -37,7 +37,7 @@ class Cache {
self::$dirCache = $dirCache;
}
- static public function getDir(){
+ public static function getDir(){
$dirCache = self::$dirCache;
if(is_null($dirCache)) {
@@ -47,7 +47,7 @@ class Cache {
return $dirCache;
}
- static public function isValidNameCache($nameCache){
+ public static function isValidNameCache($nameCache){
return preg_match('@^[A-Z][a-zA-Z0-9-]*$@', $nameCache);
}
}
diff --git a/lib/Format.php b/lib/Format.php
index 31d0b638..b7d50910 100644
--- a/lib/Format.php
+++ b/lib/Format.php
@@ -8,7 +8,7 @@ class Format {
throw new \LogicException('Please use ' . __CLASS__ . '::create for new object.');
}
- static public function create($nameFormat){
+ public static function create($nameFormat){
if(!preg_match('@^[A-Z][a-zA-Z]*$@', $nameFormat)) {
throw new \InvalidArgumentException('Name format must be at least
one uppercase follow or not by alphabetic characters.');
@@ -26,7 +26,7 @@ class Format {
return new $nameFormat();
}
- static public function setDir($dirFormat){
+ public static function setDir($dirFormat){
if(!is_string($dirFormat)) {
throw new \InvalidArgumentException('Dir format must be a string.');
}
@@ -38,7 +38,7 @@ class Format {
self::$dirFormat = $dirFormat;
}
- static public function getDir(){
+ public static function getDir(){
$dirFormat = self::$dirFormat;
if(is_null($dirFormat)) {
@@ -52,7 +52,7 @@ class Format {
* Read format dir and catch informations about each format depending annotation
* @return array Informations about each format
*/
- static public function searchInformation(){
+ public static function searchInformation(){
$pathDirFormat = self::getDir();
$listFormat = array();