aboutsummaryrefslogtreecommitdiff
path: root/model
diff options
context:
space:
mode:
authordedeibel2017-12-11 20:03:35 +0100
committerdedeibel2017-12-11 20:03:35 +0100
commit0b73843d5e0d0ac22a46db28090e707566668ae4 (patch)
tree52a824f118f99f14d7079d2c05e9f3035350e1ee /model
parent46852c4f9c77ab77b9bcc18c901f9f8640d9f305 (diff)
Leading Spaces to Tabs
Diffstat (limited to 'model')
-rw-r--r--model/Room.php70
-rw-r--r--model/RoomSelection.php6
-rw-r--r--model/Stream.php6
3 files changed, 41 insertions, 41 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);
}
diff --git a/model/RoomSelection.php b/model/RoomSelection.php
index a83b5c6..c21ea7e 100644
--- a/model/RoomSelection.php
+++ b/model/RoomSelection.php
@@ -18,15 +18,15 @@ class RoomSelection
return $this->selection;
}
- private function getSelectionPath() {
+ private function getSelectionPath() {
$path = [$this->getRoom()->getConference()->getSlug(), $this->getRoom()->getSlug()];
$selection = $this->getRoom()->getSelectionNames();
if ($selection[0] != $this->getSelection())
$path[] = $this->getSelection();
- return joinpath($path);
- }
+ return joinpath($path);
+ }
public function getLink()
{
diff --git a/model/Stream.php b/model/Stream.php
index 28cb0f8..99abaf1 100644
--- a/model/Stream.php
+++ b/model/Stream.php
@@ -32,9 +32,9 @@ class Stream
public function isTranslated()
{
- return !empty($this->getLanguage()) &&
- $this->getLanguage() !== 'native' &&
- $this->getLanguage() !== 'stereo';
+ return !empty($this->getLanguage()) &&
+ $this->getLanguage() !== 'native' &&
+ $this->getLanguage() !== 'stereo';
}
public function getVideoSize()