Update phpdocs

This commit is contained in:
Bubka 2021-09-22 22:59:56 +02:00
parent 037ebaa8ba
commit afaa1a0a7a
3 changed files with 10 additions and 11 deletions

View File

@ -24,7 +24,8 @@ class QrCodeController extends Controller
/** /**
* Create a new controller instance. * Create a new controller instance.
* *
* @param QrCodeService $qrcodeService * @param \App\Services\QrCodeService $qrcodeService
* @param \App\Services\TwoFAccountService $twofaccountService
* @return void * @return void
*/ */
public function __construct(QrCodeService $qrcodeService, TwoFAccountService $twofaccountService) public function __construct(QrCodeService $qrcodeService, TwoFAccountService $twofaccountService)

View File

@ -73,7 +73,6 @@ public function show(TwoFAccount $twofaccount)
* Store a newly created resource in storage. * Store a newly created resource in storage.
* *
* @param \App\Http\Requests\TwoFAccountDynamicRequest $request * @param \App\Http\Requests\TwoFAccountDynamicRequest $request
*
* @return \App\Http\Resources\TwoFAccountReadResource * @return \App\Http\Resources\TwoFAccountReadResource
*/ */
public function store(TwoFAccountDynamicRequest $request) public function store(TwoFAccountDynamicRequest $request)
@ -138,7 +137,6 @@ public function reorder(TwoFAccountReorderRequest $request)
* Preview account using an uri, without any db moves * Preview account using an uri, without any db moves
* *
* @param \App\Http\Requests\TwoFAccountUriRequest $request * @param \App\Http\Requests\TwoFAccountUriRequest $request
*
* @return \App\Http\Resources\TwoFAccountStoreResource * @return \App\Http\Resources\TwoFAccountStoreResource
*/ */
public function preview(TwoFAccountUriRequest $request) public function preview(TwoFAccountUriRequest $request)
@ -153,6 +151,7 @@ public function preview(TwoFAccountUriRequest $request)
* Get a One-Time Password * Get a One-Time Password
* *
* @param \Illuminate\Http\Request $request * @param \Illuminate\Http\Request $request
* @param int $id
* @return \Illuminate\Http\Response * @return \Illuminate\Http\Response
*/ */
public function otp(Request $request, $id = null) public function otp(Request $request, $id = null)
@ -190,7 +189,7 @@ public function otp(Request $request, $id = null)
/** /**
* A simple and light method to get the account count. * A simple and light method to get the account count.
* *
* @param \App\TwoFAccount $twofaccount * @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response * @return \Illuminate\Http\Response
*/ */
public function count(Request $request) public function count(Request $request)
@ -204,7 +203,6 @@ public function count(Request $request)
* Withdraw one or more accounts from their group * Withdraw one or more accounts from their group
* *
* @param \App\Http\Requests\TwoFAccountBatchRequest $request * @param \App\Http\Requests\TwoFAccountBatchRequest $request
* @param array $ids accounts ids to unassign
* @return \Illuminate\Http\Response * @return \Illuminate\Http\Response
*/ */
public function withdraw(TwoFAccountBatchRequest $request) public function withdraw(TwoFAccountBatchRequest $request)
@ -263,6 +261,9 @@ public function batchDestroy(TwoFAccountBatchRequest $request)
/** /**
* Checks ids length * Checks ids length
*
* @param string $ids comma-separated ids
* @return bool whether or not the number of ids is acceptable
*/ */
private function tooManyIds(string $ids) : bool private function tooManyIds(string $ids) : bool
{ {

View File

@ -12,6 +12,8 @@ class GroupService
/** /**
* Returns all existing groups * Returns all existing groups
*
* @return Collection
*/ */
public function getAll() : Collection public function getAll() : Collection
{ {
@ -40,7 +42,6 @@ public function getAll() : Collection
* Creates a group * Creates a group
* *
* @param array $data * @param array $data
*
* @return Group The created group * @return Group The created group
*/ */
public function create(array $data) : Group public function create(array $data) : Group
@ -60,7 +61,6 @@ public function create(array $data) : Group
* *
* @param Group $group The group * @param Group $group The group
* @param array $data The parameters * @param array $data The parameters
*
* @return Group The updated group * @return Group The updated group
*/ */
public function update(Group $group, array $data) : Group public function update(Group $group, array $data) : Group
@ -77,7 +77,6 @@ public function update(Group $group, array $data) : Group
* Deletes one or more groups * Deletes one or more groups
* *
* @param int|array $ids group ids to delete * @param int|array $ids group ids to delete
*
* @return int The number of deleted * @return int The number of deleted
*/ */
public function delete($ids) : int public function delete($ids) : int
@ -93,7 +92,6 @@ public function delete($ids) : int
* *
* @param array|int $ids accounts ids to assign * @param array|int $ids accounts ids to assign
* @param Group $group The target group * @param Group $group The target group
*
* @return Group The updated group * @return Group The updated group
*/ */
public function assign(mixed $ids, Group $group = null) : Group public function assign(mixed $ids, Group $group = null) : Group
@ -114,7 +112,6 @@ public function assign(mixed $ids, Group $group = null) : Group
* Finds twofaccounts assigned to the group * Finds twofaccounts assigned to the group
* *
* @param Group $group The group * @param Group $group The group
*
* @return Collection The assigned accounts * @return Collection The assigned accounts
*/ */
public function getAccounts(Group $group) : Collection public function getAccounts(Group $group) : Collection
@ -128,7 +125,7 @@ public function getAccounts(Group $group) : Collection
/** /**
* Determines the destination group * Determines the destination group
* *
* @return int The group ID * @return Group The group
*/ */
private function destinationGroup() : Group private function destinationGroup() : Group
{ {