aboutsummaryrefslogtreecommitdiff
path: root/model/Room.php
diff options
context:
space:
mode:
authordedeibel2017-12-11 20:03:35 +0100
committerdedeibel2017-12-11 20:03:35 +0100
commit0b73843d5e0d0ac22a46db28090e707566668ae4 (patch)
tree52a824f118f99f14d7079d2c05e9f3035350e1ee /model/Room.php
parent46852c4f9c77ab77b9bcc18c901f9f8640d9f305 (diff)
Leading Spaces to Tabs
Diffstat (limited to '')
-rw-r--r--model/Room.php70
1 files changed, 35 insertions, 35 deletions
diff --git a/model/Room.php b/model/Room.php
index dd63038..24d87cb 100644
--- a/model/Room.php
+++ b/model/Room.php
@@ -179,35 +179,35 @@ class Room
return $this->getConference()->get('ROOMS.'.$this->getSlug().'.TRANSLATION');
}
- private function getTranslationEndpoints() {
- return array_map(
- function ($translation) {
- return $translation['endpoint'];
- },
- $this->getTranslations()
- );
- }
-
- private function isTranslationEndpoint($endpoint) {
- return in_array($endpoint, $this->getTranslationEndpoints());
- }
-
- private function findTranslationLabel($language) {
- foreach($this->getTranslations() as $translation) {
- if ($translation['endpoint'] === $language) {
- return $translation['label'];
- }
- }
- return null;
- }
+ private function getTranslationEndpoints() {
+ return array_map(
+ function ($translation) {
+ return $translation['endpoint'];
+ },
+ $this->getTranslations()
+ );
+ }
+
+ private function isTranslationEndpoint($endpoint) {
+ return in_array($endpoint, $this->getTranslationEndpoints());
+ }
+
+ private function findTranslationLabel($language) {
+ foreach($this->getTranslations() as $translation) {
+ if ($translation['endpoint'] === $language) {
+ return $translation['label'];
+ }
+ }
+ return null;
+ }
public function hasTranslation() {
return count($this->getTranslations()) > 0;
}
- public function isValidLanguage($language) {
- return ($language === 'native' || $this->isTranslationEndpoint($language));
- }
+ public function isValidLanguage($language) {
+ return ($language === 'native' || $this->isTranslationEndpoint($language));
+ }
public function getSelectionNames()
{
@@ -343,17 +343,17 @@ class Room
if(!in_array($selection, $selections))
throw new NotFoundException('Selection '.$selection.' in Room '.$this->getSlug());
- $translation_label = null;
- if ($language !== 'native' && $language !== 'stereo') {
- if (! $this->hasTranslation()) {
- throw new NotFoundException('Translated Streams of Room '. $this->getSlug());
- }
- if (! $this->isValidLanguage($language)) {
- throw new NotFoundException('Selected translation');
- }
-
- $translation_label = $this->findTranslationLabel($language);
- }
+ $translation_label = null;
+ if ($language !== 'native' && $language !== 'stereo') {
+ if (! $this->hasTranslation()) {
+ throw new NotFoundException('Translated Streams of Room '. $this->getSlug());
+ }
+ if (! $this->isValidLanguage($language)) {
+ throw new NotFoundException('Selected translation');
+ }
+
+ $translation_label = $this->findTranslationLabel($language);
+ }
return $this->createStreamObject($selection, $language, $translation_label);
}