Skip to content

Commit 4f3e6d2

Browse files
committed
fix(controller): traits aren't parents
1 parent ca920e2 commit 4f3e6d2

1 file changed

Lines changed: 11 additions & 35 deletions

File tree

app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitTaxTypeApiController.php

Lines changed: 11 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
<?php
2-
3-
namespace App\Http\Controllers;
1+
<?php namespace App\Http\Controllers;
42

53
/**
64
* Copyright 2019 OpenStack Foundation
@@ -23,7 +21,6 @@
2321
use models\oauth2\IResourceServerContext;
2422
use models\summit\ISummitRepository;
2523
use models\summit\Summit;
26-
use models\utils\IBaseRepository;
2724
use models\utils\IEntity;
2825
use ModelSerializers\SerializerRegistry;
2926
use Illuminate\Http\Response;
@@ -36,15 +33,6 @@
3633
*/
3734
final class OAuth2SummitTaxTypeApiController extends OAuth2ProtectedController
3835
{
39-
/**
40-
* @var ISummitRepository
41-
*/
42-
private $summit_repository;
43-
44-
/**
45-
* @var ISummitTaxTypeService
46-
*/
47-
private $service;
4836

4937
use GetAllBySummit;
5038

@@ -55,6 +43,15 @@ final class OAuth2SummitTaxTypeApiController extends OAuth2ProtectedController
5543
use UpdateSummitChildElement;
5644

5745
use DeleteSummitChildElement;
46+
/**
47+
* @var ISummitRepository
48+
*/
49+
private $summit_repository;
50+
51+
/**
52+
* @var ISummitTaxTypeService
53+
*/
54+
private $service;
5855

5956
#[OA\Get(
6057
path: '/api/v1/summits/{id}/tax-types',
@@ -103,10 +100,6 @@ final class OAuth2SummitTaxTypeApiController extends OAuth2ProtectedController
103100
new OA\Response(response: Response::HTTP_INTERNAL_SERVER_ERROR, description: "Server Error"),
104101
]
105102
)]
106-
public function getAllBySummit($summit_id)
107-
{
108-
return parent::getAllBySummit($summit_id);
109-
}
110103

111104
#[OA\Post(
112105
path: '/api/v1/summits/{id}/tax-types',
@@ -149,10 +142,6 @@ public function getAllBySummit($summit_id)
149142
new OA\Response(response: Response::HTTP_INTERNAL_SERVER_ERROR, description: "Server Error"),
150143
]
151144
)]
152-
public function add($summit_id)
153-
{
154-
return parent::add($summit_id);
155-
}
156145

157146
#[OA\Get(
158147
path: '/api/v1/summits/{id}/tax-types/{tax_id}',
@@ -192,10 +181,6 @@ public function add($summit_id)
192181
new OA\Response(response: Response::HTTP_INTERNAL_SERVER_ERROR, description: "Server Error"),
193182
]
194183
)]
195-
public function get($summit_id, $tax_id)
196-
{
197-
return parent::get($summit_id, $tax_id);
198-
}
199184

200185
#[OA\Put(
201186
path: '/api/v1/summits/{id}/tax-types/{tax_id}',
@@ -239,10 +224,6 @@ public function get($summit_id, $tax_id)
239224
new OA\Response(response: Response::HTTP_INTERNAL_SERVER_ERROR, description: "Server Error"),
240225
]
241226
)]
242-
public function update($summit_id, $tax_id)
243-
{
244-
return parent::update($summit_id, $tax_id);
245-
}
246227

247228
#[OA\Delete(
248229
path: '/api/v1/summits/{id}/tax-types/{tax_id}',
@@ -277,10 +258,6 @@ public function update($summit_id, $tax_id)
277258
new OA\Response(response: Response::HTTP_INTERNAL_SERVER_ERROR, description: "Server Error"),
278259
]
279260
)]
280-
public function delete($summit_id, $tax_id)
281-
{
282-
return parent::delete($summit_id, $tax_id);
283-
}
284261

285262
/**
286263
* @return array
@@ -510,7 +487,6 @@ public function removeTaxFromTicketType($summit_id, $tax_id, $ticket_type_id)
510487
$summit = SummitFinderStrategyFactory::build($this->getSummitRepository(), $this->getResourceServerContext())->find($summit_id);
511488
if (is_null($summit))
512489
return $this->error404();
513-
514490
$child = $this->service->removeTaxTypeFromTicketType($summit, $tax_id, $ticket_type_id);
515491
return $this->updated(SerializerRegistry::getInstance()->getSerializer($child)->serialize());
516492
} catch (ValidationException $ex1) {
@@ -524,4 +500,4 @@ public function removeTaxFromTicketType($summit_id, $tax_id, $ticket_type_id)
524500
return $this->error500($ex);
525501
}
526502
}
527-
}
503+
}

0 commit comments

Comments
 (0)