Merge pull request #1148 from pterodactyl/feature/doc-block-improvements

@throws docblock improvements
This commit is contained in:
Dane Everitt 2018-05-20 16:25:59 -07:00 committed by GitHub
commit 00df0b66a6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
23 changed files with 47 additions and 15 deletions

View file

@ -59,6 +59,7 @@ class EmailSettingsCommand extends Command
/**
* Handle command execution.
* @throws \Pterodactyl\Exceptions\PterodactylException
*/
public function handle()
{

View file

@ -65,6 +65,7 @@ class ApiController extends Controller
* Render view allowing an admin to create a new application API key.
*
* @return \Illuminate\View\View
* @throws \ReflectionException
*/
public function create(): View
{

View file

@ -103,7 +103,6 @@ class LocationController extends Controller
* @return \Illuminate\Http\RedirectResponse
*
* @throws \Throwable
* @throws \Watson\Validating\ValidationException
*/
public function create(LocationFormRequest $request)
{
@ -121,7 +120,6 @@ class LocationController extends Controller
* @return \Illuminate\Http\RedirectResponse
*
* @throws \Throwable
* @throws \Watson\Validating\ValidationException
*/
public function update(LocationFormRequest $request, Location $location)
{

View file

@ -94,6 +94,7 @@ class EggVariableController extends Controller
*
* @return \Illuminate\Http\RedirectResponse
* @throws \Pterodactyl\Exceptions\Model\DataValidationException
* @throws \Pterodactyl\Exceptions\Service\Egg\Variable\BadValidationRuleException
* @throws \Pterodactyl\Exceptions\Service\Egg\Variable\ReservedVariableNameException
*/
public function store(EggVariableFormRequest $request, Egg $egg): RedirectResponse

View file

@ -462,6 +462,7 @@ class ServersController extends Controller
*
* @param \Pterodactyl\Models\Server $server
* @return \Illuminate\Http\RedirectResponse
* @throws \Pterodactyl\Exceptions\Http\Connection\DaemonConnectionException
*/
public function rebuildContainer(Server $server)
{
@ -540,7 +541,8 @@ class ServersController extends Controller
* @param \Pterodactyl\Models\Server $server
* @return \Illuminate\Http\RedirectResponse
*
* @throws \Pterodactyl\Exceptions\DisplayException
* @throws \Illuminate\Validation\ValidationException
* @throws \Pterodactyl\Exceptions\Http\Connection\DaemonConnectionException
* @throws \Pterodactyl\Exceptions\Model\DataValidationException
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
*/

View file

@ -76,6 +76,8 @@ class AdvancedController extends Controller
/**
* @param \Pterodactyl\Http\Requests\Admin\Settings\AdvancedSettingsFormRequest $request
* @return \Illuminate\Http\RedirectResponse
* @throws \Pterodactyl\Exceptions\Model\DataValidationException
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
*/
public function update(AdvancedSettingsFormRequest $request): RedirectResponse
{

View file

@ -74,6 +74,8 @@ class IndexController extends Controller
*
* @param \Pterodactyl\Http\Requests\Admin\Settings\BaseSettingsFormRequest $request
* @return \Illuminate\Http\RedirectResponse
* @throws \Pterodactyl\Exceptions\Model\DataValidationException
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
*/
public function update(BaseSettingsFormRequest $request): RedirectResponse
{

View file

@ -83,7 +83,9 @@ class MailController extends Controller
* @param \Pterodactyl\Http\Requests\Admin\Settings\MailSettingsFormRequest $request
* @return \Illuminate\Http\RedirectResponse
*
* @throws \Pterodactyl\Exceptions\DisplayException
* @throws DisplayException
* @throws \Pterodactyl\Exceptions\Model\DataValidationException
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
*/
public function update(MailSettingsFormRequest $request): RedirectResponse
{

View file

@ -10,6 +10,8 @@ class StoreApplicationApiKeyRequest extends AdminFormRequest
{
/**
* @return array
* @throws \ReflectionException
* @throws \ReflectionException
*/
public function rules()
{

View file

@ -82,6 +82,7 @@ class EggVariable extends Model implements CleansAttributes, ValidableContract
];
/**
* @param $value
* @return bool
*/
public function getRequiredAttribute($value)

View file

@ -17,8 +17,6 @@ class AuthServiceProvider extends ServiceProvider
/**
* Register any application authentication / authorization services.
*
* @param \Illuminate\Contracts\Auth\Access\Gate $gate
*/
public function boot()
{

View file

@ -12,6 +12,7 @@ class CommandRepository extends BaseRepository implements CommandRepositoryInter
*
* @param string $command
* @return \Psr\Http\Message\ResponseInterface
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function send(string $command): ResponseInterface
{

View file

@ -12,6 +12,7 @@ class ConfigurationRepository extends BaseRepository implements ConfigurationRep
*
* @param array $overrides
* @return \Psr\Http\Message\ResponseInterface
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function update(array $overrides = []): ResponseInterface
{

View file

@ -14,7 +14,7 @@ class FileRepository extends BaseRepository implements FileRepositoryInterface
* @param string $path
* @return \stdClass
*
* @throws \GuzzleHttp\Exception\RequestException
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function getFileStat(string $path): stdClass
{
@ -35,7 +35,7 @@ class FileRepository extends BaseRepository implements FileRepositoryInterface
* @param string $path
* @return string
*
* @throws \GuzzleHttp\Exception\RequestException
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function getContent(string $path): string
{
@ -57,7 +57,7 @@ class FileRepository extends BaseRepository implements FileRepositoryInterface
* @param string $content
* @return \Psr\Http\Message\ResponseInterface
*
* @throws \GuzzleHttp\Exception\RequestException
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function putContent(string $path, string $content): ResponseInterface
{
@ -78,7 +78,7 @@ class FileRepository extends BaseRepository implements FileRepositoryInterface
* @param string $path
* @return array
*
* @throws \GuzzleHttp\Exception\RequestException
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function getDirectory(string $path): array
{

View file

@ -14,7 +14,8 @@ class PowerRepository extends BaseRepository implements PowerRepositoryInterface
* @param string $signal
* @return \Psr\Http\Message\ResponseInterface
*
* @throws \Pterodactyl\Exceptions\Repository\Daemon\InvalidPowerSignalException
* @throws InvalidPowerSignalException
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function sendSignal(string $signal): ResponseInterface
{

View file

@ -15,7 +15,7 @@ class ServerRepository extends BaseRepository implements ServerRepositoryInterfa
* @param array $overrides
* @return \Psr\Http\Message\ResponseInterface
*
* @throws \GuzzleHttp\Exception\RequestException
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function create(array $structure, array $overrides = []): ResponseInterface
{
@ -33,6 +33,7 @@ class ServerRepository extends BaseRepository implements ServerRepositoryInterfa
*
* @param array $data
* @return \Psr\Http\Message\ResponseInterface
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function update(array $data): ResponseInterface
{
@ -46,6 +47,7 @@ class ServerRepository extends BaseRepository implements ServerRepositoryInterfa
*
* @param array|null $data
* @return \Psr\Http\Message\ResponseInterface
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function reinstall(array $data = null): ResponseInterface
{
@ -58,6 +60,7 @@ class ServerRepository extends BaseRepository implements ServerRepositoryInterfa
* Mark a server as needing a container rebuild the next time the server is booted.
*
* @return \Psr\Http\Message\ResponseInterface
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function rebuild(): ResponseInterface
{
@ -68,6 +71,7 @@ class ServerRepository extends BaseRepository implements ServerRepositoryInterfa
* Suspend a server on the daemon.
*
* @return \Psr\Http\Message\ResponseInterface
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function suspend(): ResponseInterface
{
@ -78,6 +82,7 @@ class ServerRepository extends BaseRepository implements ServerRepositoryInterfa
* Un-suspend a server on the daemon.
*
* @return \Psr\Http\Message\ResponseInterface
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function unsuspend(): ResponseInterface
{
@ -88,6 +93,7 @@ class ServerRepository extends BaseRepository implements ServerRepositoryInterfa
* Delete a server on the daemon.
*
* @return \Psr\Http\Message\ResponseInterface
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function delete(): ResponseInterface
{
@ -98,6 +104,7 @@ class ServerRepository extends BaseRepository implements ServerRepositoryInterfa
* Return details on a specific server.
*
* @return \Psr\Http\Message\ResponseInterface
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function details(): ResponseInterface
{
@ -110,7 +117,7 @@ class ServerRepository extends BaseRepository implements ServerRepositoryInterfa
* @param string|array $key
* @return \Psr\Http\Message\ResponseInterface
*
* @throws \GuzzleHttp\Exception\RequestException
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function revokeAccessKey($key): ResponseInterface
{

View file

@ -70,6 +70,7 @@ class AdminAcl
* Return a list of all resource constants defined in this ACL.
*
* @return array
* @throws \ReflectionException
*/
public static function getResourceList(): array
{

View file

@ -46,6 +46,7 @@ class AllocationTransformer extends BaseTransformer
*
* @param \Pterodactyl\Models\Allocation $allocation
* @return \League\Fractal\Resource\Item|\League\Fractal\Resource\NullResource
* @throws \Pterodactyl\Exceptions\Transformer\InvalidTransformerLevelException
*/
public function includeNode(Allocation $allocation)
{
@ -65,6 +66,7 @@ class AllocationTransformer extends BaseTransformer
*
* @param \Pterodactyl\Models\Allocation $allocation
* @return \League\Fractal\Resource\Item|\League\Fractal\Resource\NullResource
* @throws \Pterodactyl\Exceptions\Transformer\InvalidTransformerLevelException
*/
public function includeServer(Allocation $allocation)
{

View file

@ -55,6 +55,7 @@ class DatabaseHostTransformer extends BaseTransformer
*
* @param \Pterodactyl\Models\DatabaseHost $model
* @return \League\Fractal\Resource\Collection|\League\Fractal\Resource\NullResource
* @throws \Pterodactyl\Exceptions\Transformer\InvalidTransformerLevelException
*/
public function includeDatabases(DatabaseHost $model)
{

View file

@ -70,6 +70,7 @@ class EggTransformer extends BaseTransformer
*
* @param \Pterodactyl\Models\Egg $model
* @return \League\Fractal\Resource\Item|\League\Fractal\Resource\NullResource
* @throws \Pterodactyl\Exceptions\Transformer\InvalidTransformerLevelException
*/
public function includeNest(Egg $model)
{
@ -87,6 +88,7 @@ class EggTransformer extends BaseTransformer
*
* @param \Pterodactyl\Models\Egg $model
* @return \League\Fractal\Resource\Collection|\League\Fractal\Resource\NullResource
* @throws \Pterodactyl\Exceptions\Transformer\InvalidTransformerLevelException
*/
public function includeServers(Egg $model)
{
@ -154,6 +156,7 @@ class EggTransformer extends BaseTransformer
*
* @param \Pterodactyl\Models\Egg $model
* @return \League\Fractal\Resource\Collection|\League\Fractal\Resource\NullResource
* @throws \Pterodactyl\Exceptions\Transformer\InvalidTransformerLevelException
*/
public function includeVariables(Egg $model)
{

View file

@ -52,6 +52,7 @@ class NodeTransformer extends BaseTransformer
*
* @param \Pterodactyl\Models\Node $node
* @return \League\Fractal\Resource\Collection|\League\Fractal\Resource\NullResource
* @throws \Pterodactyl\Exceptions\Transformer\InvalidTransformerLevelException
*/
public function includeAllocations(Node $node)
{
@ -71,6 +72,7 @@ class NodeTransformer extends BaseTransformer
*
* @param \Pterodactyl\Models\Node $node
* @return \League\Fractal\Resource\Item|\League\Fractal\Resource\NullResource
* @throws \Pterodactyl\Exceptions\Transformer\InvalidTransformerLevelException
*/
public function includeLocation(Node $node)
{
@ -90,6 +92,7 @@ class NodeTransformer extends BaseTransformer
*
* @param \Pterodactyl\Models\Node $node
* @return \League\Fractal\Resource\Collection|\League\Fractal\Resource\NullResource
* @throws \Pterodactyl\Exceptions\Transformer\InvalidTransformerLevelException
*/
public function includeServers(Node $node)
{

View file

@ -85,6 +85,7 @@ class ServerDatabaseTransformer extends BaseTransformer
*
* @param \Pterodactyl\Models\Database $model
* @return \League\Fractal\Resource\Item|\League\Fractal\Resource\NullResource
* @throws \Pterodactyl\Exceptions\Transformer\InvalidTransformerLevelException
*/
public function includeHost(Database $model)
{

View file

@ -40,6 +40,7 @@ class ServerVariableTransformer extends BaseTransformer
*
* @param \Pterodactyl\Models\ServerVariable $variable
* @return \League\Fractal\Resource\Item|\League\Fractal\Resource\NullResource
* @throws \Pterodactyl\Exceptions\Transformer\InvalidTransformerLevelException
*/
public function includeParent(ServerVariable $variable)
{