1
0
Fork 0
forked from blallo/rss-bridge

[core] remove useless static methods

Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
This commit is contained in:
Pierre Mazière 2016-08-23 13:44:23 +02:00
parent 747e54d64a
commit b3af604cc1
2 changed files with 2 additions and 10 deletions

View file

@ -262,7 +262,7 @@ class Bridge{
* @return Bridge object dedicated * @return Bridge object dedicated
*/ */
static public function create($nameBridge){ static public function create($nameBridge){
if( !static::isValidNameBridge($nameBridge) ){ if( !preg_match('@^[A-Z][a-zA-Z0-9-]*$@', $nameBridge)){
throw new \InvalidArgumentException('Name bridge must be at least one uppercase follow or not by alphanumeric or dash characters.'); throw new \InvalidArgumentException('Name bridge must be at least one uppercase follow or not by alphanumeric or dash characters.');
} }
@ -303,10 +303,6 @@ class Bridge{
return $dirBridge; return $dirBridge;
} }
static public function isValidNameBridge($nameBridge){
return preg_match('@^[A-Z][a-zA-Z0-9-]*$@', $nameBridge);
}
/** /**
* Lists the available bridges. * Lists the available bridges.
* @return array List of the bridges * @return array List of the bridges

View file

@ -118,7 +118,7 @@ class Format{
} }
static public function create($nameFormat){ static public function create($nameFormat){
if( !static::isValidNameFormat($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.'); throw new \InvalidArgumentException('Name format must be at least one uppercase follow or not by alphabetic characters.');
} }
@ -155,10 +155,6 @@ class Format{
return $dirFormat; return $dirFormat;
} }
static public function isValidNameFormat($nameFormat){
return preg_match('@^[A-Z][a-zA-Z]*$@', $nameFormat);
}
/** /**
* Read format dir and catch informations about each format depending annotation * Read format dir and catch informations about each format depending annotation
* @return array Informations about each format * @return array Informations about each format