@@ -25,8 +25,8 @@ |
||
| 25 | 25 | } |
| 26 | 26 | |
| 27 | 27 | public function setOptions($options){ |
| 28 | - $this->options = $options; |
|
| 29 | - return $this; |
|
| 28 | + $this->options = $options; |
|
| 29 | + return $this; |
|
| 30 | 30 | } |
| 31 | 31 | |
| 32 | 32 | public function getOptions(){ |
@@ -18,18 +18,18 @@ discard block |
||
| 18 | 18 | /** |
| 19 | 19 | * @param bool $options |
| 20 | 20 | */ |
| 21 | - public function __construct($options,$uri = array()) |
|
| 21 | + public function __construct($options, $uri = array()) |
|
| 22 | 22 | { |
| 23 | 23 | $this->setOptions($options); |
| 24 | 24 | $this->setURI($uri); |
| 25 | 25 | } |
| 26 | 26 | |
| 27 | - public function setOptions($options){ |
|
| 27 | + public function setOptions($options) { |
|
| 28 | 28 | $this->options = $options; |
| 29 | 29 | return $this; |
| 30 | 30 | } |
| 31 | 31 | |
| 32 | - public function getOptions(){ |
|
| 32 | + public function getOptions() { |
|
| 33 | 33 | return $this->options; |
| 34 | 34 | } |
| 35 | 35 | |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | |
| 43 | 43 | public function getURI() |
| 44 | 44 | { |
| 45 | - if(!isset($this->uri) or empty($this->uri)){ |
|
| 45 | + if (!isset($this->uri) or empty($this->uri)) { |
|
| 46 | 46 | $this->uri = array(self::OPTIONS_ALLOW_FROM_URI_DEFAULT); |
| 47 | 47 | } |
| 48 | 48 | return $this->uri; |
@@ -54,13 +54,13 @@ discard block |
||
| 54 | 54 | */ |
| 55 | 55 | public function getValue() |
| 56 | 56 | { |
| 57 | - $retour=''; |
|
| 58 | - if($this->getOptions()==self::OPTIONS_ALLOW_FROM){ |
|
| 57 | + $retour = ''; |
|
| 58 | + if ($this->getOptions() == self::OPTIONS_ALLOW_FROM) { |
|
| 59 | 59 | $urls = $this->getURI(); |
| 60 | - foreach($urls as $url){ |
|
| 61 | - $retour.= $this->options.' '.$url.';'; |
|
| 60 | + foreach ($urls as $url) { |
|
| 61 | + $retour .= $this->options . ' ' . $url . ';'; |
|
| 62 | 62 | } |
| 63 | - }else{ |
|
| 63 | + } else { |
|
| 64 | 64 | $retour = $this->options; |
| 65 | 65 | } |
| 66 | 66 | return $retour; |
@@ -60,7 +60,7 @@ |
||
| 60 | 60 | foreach($urls as $url){ |
| 61 | 61 | $retour.= $this->options.' '.$url.';'; |
| 62 | 62 | } |
| 63 | - }else{ |
|
| 63 | + } else{ |
|
| 64 | 64 | $retour = $this->options; |
| 65 | 65 | } |
| 66 | 66 | return $retour; |