@@ -14,7 +14,6 @@ |
||
| 14 | 14 | * long as it does not already exist in the output directory. |
| 15 | 15 | * |
| 16 | 16 | */ |
| 17 | -class RegionTypeQuery extends BaseRegionTypeQuery |
|
| 18 | -{ |
|
| 17 | +class RegionTypeQuery extends BaseRegionTypeQuery { |
|
| 19 | 18 | |
| 20 | 19 | } |
@@ -14,7 +14,6 @@ |
||
| 14 | 14 | * long as it does not already exist in the output directory. |
| 15 | 15 | * |
| 16 | 16 | */ |
| 17 | -class SessionQuery extends BaseSessionQuery |
|
| 18 | -{ |
|
| 17 | +class SessionQuery extends BaseSessionQuery { |
|
| 19 | 18 | |
| 20 | 19 | } |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | $obj->setVerb($options['verb']); |
| 44 | 44 | $obj->setObject($this->getActivityObject($options['object'])); |
| 45 | 45 | if (isset($options['target'])) { |
| 46 | - $obj->setTarget($this->getActivityObject($options['target'])); |
|
| 46 | + $obj->setTarget($this->getActivityObject($options['target'])); |
|
| 47 | 47 | } |
| 48 | 48 | $obj->save(); |
| 49 | 49 | } |
@@ -54,15 +54,15 @@ discard block |
||
| 54 | 54 | private function findActivityObject(ActivityObject $ao) { |
| 55 | 55 | $q = ActivityObjectQuery::create()->filterByClassName($ao->getClassName())->filterByType($ao->getType())->filterByReferenceId($ao->getId()); |
| 56 | 56 | if (method_exists($ao, 'getVersion')) { |
| 57 | - $version = $ao->getVersion(); |
|
| 58 | - if (!empty($version)) { |
|
| 59 | - $q = $q->filterByVersion($version); |
|
| 60 | - } |
|
| 57 | + $version = $ao->getVersion(); |
|
| 58 | + if (!empty($version)) { |
|
| 59 | + $q = $q->filterByVersion($version); |
|
| 60 | + } |
|
| 61 | 61 | } |
| 62 | 62 | $result = $q->findOne(); |
| 63 | 63 | if ($result) { |
| 64 | - $result->setDisplayName($ao->getDisplayName()); |
|
| 65 | - return $result; |
|
| 64 | + $result->setDisplayName($ao->getDisplayName()); |
|
| 65 | + return $result; |
|
| 66 | 66 | } |
| 67 | 67 | return $ao; |
| 68 | 68 | } |
@@ -72,10 +72,10 @@ discard block |
||
| 72 | 72 | */ |
| 73 | 73 | private function getActivityObject($obj) { |
| 74 | 74 | if ($obj instanceof ActivityObject) { |
| 75 | - return $obj; |
|
| 75 | + return $obj; |
|
| 76 | 76 | } |
| 77 | 77 | if ($obj instanceof ActivityObjectInterface) { |
| 78 | - return $this->findActivityObject($obj->toActivityObject()); |
|
| 78 | + return $this->findActivityObject($obj->toActivityObject()); |
|
| 79 | 79 | } |
| 80 | 80 | } |
| 81 | 81 | } |
@@ -30,7 +30,7 @@ |
||
| 30 | 30 | $localization = LocalizationQuery::create()->findOneById($id); |
| 31 | 31 | |
| 32 | 32 | if ($localization === null) { |
| 33 | - throw new ResourceNotFoundException('Localization with id ' . $id . ' does not exist'); |
|
| 33 | + throw new ResourceNotFoundException('Localization with id '.$id.' does not exist'); |
|
| 34 | 34 | } |
| 35 | 35 | |
| 36 | 36 | // run response |
@@ -30,7 +30,7 @@ |
||
| 30 | 30 | $group = GroupQuery::create()->findOneById($id); |
| 31 | 31 | |
| 32 | 32 | if ($group === null) { |
| 33 | - throw new ResourceNotFoundException('Group with id ' . $id . ' does not exist'); |
|
| 33 | + throw new ResourceNotFoundException('Group with id '.$id.' does not exist'); |
|
| 34 | 34 | } |
| 35 | 35 | |
| 36 | 36 | // run response |
@@ -30,7 +30,7 @@ |
||
| 30 | 30 | $action = ActionQuery::create()->findOneById($id); |
| 31 | 31 | |
| 32 | 32 | if ($action === null) { |
| 33 | - throw new ResourceNotFoundException('Action with id ' . $id . ' does not exist'); |
|
| 33 | + throw new ResourceNotFoundException('Action with id '.$id.' does not exist'); |
|
| 34 | 34 | } |
| 35 | 35 | |
| 36 | 36 | // run response |
@@ -30,7 +30,7 @@ |
||
| 30 | 30 | $user = UserQuery::create()->findOneById($id); |
| 31 | 31 | |
| 32 | 32 | if ($user === null) { |
| 33 | - throw new ResourceNotFoundException('User with id ' . $id . ' does not exist'); |
|
| 33 | + throw new ResourceNotFoundException('User with id '.$id.' does not exist'); |
|
| 34 | 34 | } |
| 35 | 35 | |
| 36 | 36 | // run response |
@@ -79,7 +79,7 @@ |
||
| 79 | 79 | // sorting |
| 80 | 80 | $sort = $params->getSort(Api::getSerializer()->getSortFields()); |
| 81 | 81 | foreach ($sort as $field => $order) { |
| 82 | - $method = 'orderBy' . NameUtils::toStudlyCase($field); |
|
| 82 | + $method = 'orderBy'.NameUtils::toStudlyCase($field); |
|
| 83 | 83 | $query->$method($order); |
| 84 | 84 | } |
| 85 | 85 | |
@@ -29,7 +29,7 @@ |
||
| 29 | 29 | // sorting |
| 30 | 30 | $sort = $params->getSort(RegionArea::getSerializer()->getSortFields()); |
| 31 | 31 | foreach ($sort as $field => $order) { |
| 32 | - $method = 'orderBy' . NameUtils::toStudlyCase($field); |
|
| 32 | + $method = 'orderBy'.NameUtils::toStudlyCase($field); |
|
| 33 | 33 | $query->$method($order); |
| 34 | 34 | } |
| 35 | 35 | |