mirror of
https://github.com/Bubka/2FAuth.git
synced 2024-12-23 23:49:53 +01:00
Update phpdocs
This commit is contained in:
parent
037ebaa8ba
commit
afaa1a0a7a
@ -24,7 +24,8 @@ class QrCodeController extends Controller
|
||||
/**
|
||||
* Create a new controller instance.
|
||||
*
|
||||
* @param QrCodeService $qrcodeService
|
||||
* @param \App\Services\QrCodeService $qrcodeService
|
||||
* @param \App\Services\TwoFAccountService $twofaccountService
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(QrCodeService $qrcodeService, TwoFAccountService $twofaccountService)
|
||||
|
@ -73,7 +73,6 @@ public function show(TwoFAccount $twofaccount)
|
||||
* Store a newly created resource in storage.
|
||||
*
|
||||
* @param \App\Http\Requests\TwoFAccountDynamicRequest $request
|
||||
*
|
||||
* @return \App\Http\Resources\TwoFAccountReadResource
|
||||
*/
|
||||
public function store(TwoFAccountDynamicRequest $request)
|
||||
@ -138,7 +137,6 @@ public function reorder(TwoFAccountReorderRequest $request)
|
||||
* Preview account using an uri, without any db moves
|
||||
*
|
||||
* @param \App\Http\Requests\TwoFAccountUriRequest $request
|
||||
*
|
||||
* @return \App\Http\Resources\TwoFAccountStoreResource
|
||||
*/
|
||||
public function preview(TwoFAccountUriRequest $request)
|
||||
@ -153,6 +151,7 @@ public function preview(TwoFAccountUriRequest $request)
|
||||
* Get a One-Time Password
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param int $id
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
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.
|
||||
*
|
||||
* @param \App\TwoFAccount $twofaccount
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function count(Request $request)
|
||||
@ -204,7 +203,6 @@ public function count(Request $request)
|
||||
* Withdraw one or more accounts from their group
|
||||
*
|
||||
* @param \App\Http\Requests\TwoFAccountBatchRequest $request
|
||||
* @param array $ids accounts ids to unassign
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function withdraw(TwoFAccountBatchRequest $request)
|
||||
@ -263,6 +261,9 @@ public function batchDestroy(TwoFAccountBatchRequest $request)
|
||||
|
||||
/**
|
||||
* 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
|
||||
{
|
||||
|
@ -12,6 +12,8 @@ class GroupService
|
||||
|
||||
/**
|
||||
* Returns all existing groups
|
||||
*
|
||||
* @return Collection
|
||||
*/
|
||||
public function getAll() : Collection
|
||||
{
|
||||
@ -40,7 +42,6 @@ public function getAll() : Collection
|
||||
* Creates a group
|
||||
*
|
||||
* @param array $data
|
||||
*
|
||||
* @return Group The created group
|
||||
*/
|
||||
public function create(array $data) : Group
|
||||
@ -60,7 +61,6 @@ public function create(array $data) : Group
|
||||
*
|
||||
* @param Group $group The group
|
||||
* @param array $data The parameters
|
||||
*
|
||||
* @return Group The updated 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
|
||||
*
|
||||
* @param int|array $ids group ids to delete
|
||||
*
|
||||
* @return int The number of deleted
|
||||
*/
|
||||
public function delete($ids) : int
|
||||
@ -93,7 +92,6 @@ public function delete($ids) : int
|
||||
*
|
||||
* @param array|int $ids accounts ids to assign
|
||||
* @param Group $group The target group
|
||||
*
|
||||
* @return Group The updated 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
|
||||
*
|
||||
* @param Group $group The group
|
||||
*
|
||||
* @return Collection The assigned accounts
|
||||
*/
|
||||
public function getAccounts(Group $group) : Collection
|
||||
@ -128,7 +125,7 @@ public function getAccounts(Group $group) : Collection
|
||||
/**
|
||||
* Determines the destination group
|
||||
*
|
||||
* @return int The group ID
|
||||
* @return Group The group
|
||||
*/
|
||||
private function destinationGroup() : Group
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user