Skip to content

Commit

Permalink
Add typed class properties
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewdalpino committed May 22, 2021
1 parent bbf774d commit ef704b8
Show file tree
Hide file tree
Showing 62 changed files with 98 additions and 98 deletions.
2 changes: 1 addition & 1 deletion src/Events/DatasetInferred.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class DatasetInferred implements Event
*
* @var \Rubix\ML\Datasets\Dataset
*/
protected $dataset;
protected \Rubix\ML\Datasets\Dataset $dataset;

/**
* @param \Rubix\ML\Datasets\Dataset $dataset
Expand Down
2 changes: 1 addition & 1 deletion src/Events/Failure.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ abstract class Failure implements Event
*
* @var \Exception
*/
protected $exception;
protected \Exception $exception;

/**
* @param \Exception $exception
Expand Down
2 changes: 1 addition & 1 deletion src/Events/MemoryUsageUpdated.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class MemoryUsageUpdated implements Event
*
* @var \Rubix\Server\Models\Memory
*/
protected $memory;
protected \Rubix\Server\Models\Memory $memory;

/**
* @param \Rubix\Server\Models\Memory $memory
Expand Down
2 changes: 1 addition & 1 deletion src/Events/RequestReceived.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class RequestReceived implements Event
*
* @var \Psr\Http\Message\ServerRequestInterface
*/
protected $request;
protected \Psr\Http\Message\ServerRequestInterface $request;

/**
* @param \Psr\Http\Message\ServerRequestInterface $request
Expand Down
2 changes: 1 addition & 1 deletion src/Events/ResponseSent.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class ResponseSent implements Event
*
* @var \Psr\Http\Message\ResponseInterface
*/
protected $response;
protected \Psr\Http\Message\ResponseInterface $response;

/**
* @param \Psr\Http\Message\ResponseInterface $response
Expand Down
2 changes: 1 addition & 1 deletion src/GraphQL/Enums/DataTypeEnum.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class DataTypeEnum extends EnumType
*
* @var self|null
*/
protected static $instance;
protected static ?self $instance = null;

/**
* @return self
Expand Down
2 changes: 1 addition & 1 deletion src/GraphQL/Enums/EstimatorTypeEnum.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class EstimatorTypeEnum extends EnumType
*
* @var self|null
*/
protected static $instance;
protected static ?self $instance = null;

/**
* @return self
Expand Down
2 changes: 1 addition & 1 deletion src/GraphQL/InputObjects/DatasetInputObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class DatasetInputObject extends InputObjectType
*
* @var self|null
*/
protected static $instance;
protected static ?self $instance = null;

/**
* @return self
Expand Down
2 changes: 1 addition & 1 deletion src/GraphQL/Objects/EstimatorInterfacesObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class EstimatorInterfacesObject extends ObjectType
*
* @var self|null
*/
protected static $instance;
protected static ?self $instance = null;

/**
* @return self
Expand Down
2 changes: 1 addition & 1 deletion src/GraphQL/Objects/HTTPStatsObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class HTTPStatsObject extends ObjectType
*
* @var self|null
*/
protected static $instance;
protected static ?self $instance = null;

/**
* @return self
Expand Down
2 changes: 1 addition & 1 deletion src/GraphQL/Objects/HyperparameterObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class HyperparameterObject extends ObjectType
*
* @var self|null
*/
protected static $instance;
protected static ?self $instance = null;

/**
* @return self
Expand Down
2 changes: 1 addition & 1 deletion src/GraphQL/Objects/MemoryObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class MemoryObject extends ObjectType
*
* @var self|null
*/
protected static $instance;
protected static ?self $instance = null;

/**
* @return self
Expand Down
2 changes: 1 addition & 1 deletion src/GraphQL/Objects/ModelObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class ModelObject extends ObjectType
*
* @var self|null
*/
protected static $instance;
protected static ?self $instance = null;

/**
* @return self
Expand Down
2 changes: 1 addition & 1 deletion src/GraphQL/Objects/ProbabilityObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class ProbabilityObject extends ObjectType
*
* @var self|null
*/
protected static $instance;
protected static ?self $instance = null;

/**
* @return self
Expand Down
2 changes: 1 addition & 1 deletion src/GraphQL/Objects/ProcessInfoObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class ProcessInfoObject extends ObjectType
*
* @var self|null
*/
protected static $instance;
protected static ?self $instance = null;

/**
* @return self
Expand Down
2 changes: 1 addition & 1 deletion src/GraphQL/Objects/RequestsObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class RequestsObject extends ObjectType
*
* @var self|null
*/
protected static $instance;
protected static ?self $instance = null;

/**
* @return self
Expand Down
2 changes: 1 addition & 1 deletion src/GraphQL/Objects/ServerObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class ServerObject extends ObjectType
*
* @var self|null
*/
protected static $instance;
protected static ?self $instance = null;

/**
* @return self
Expand Down
2 changes: 1 addition & 1 deletion src/GraphQL/Objects/ServerSettingsObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class ServerSettingsObject extends ObjectType
*
* @var self|null
*/
protected static $instance;
protected static ?self $instance = null;

/**
* @return self
Expand Down
2 changes: 1 addition & 1 deletion src/GraphQL/Objects/TransfersObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class TransfersObject extends ObjectType
*
* @var self|null
*/
protected static $instance;
protected static ?self $instance = null;

/**
* @return self
Expand Down
2 changes: 1 addition & 1 deletion src/HTTP/Controllers/DashboardController.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class DashboardController extends JSONController
*
* @var \Rubix\Server\Services\SSEChannel
*/
protected $channel;
protected \Rubix\Server\Services\SSEChannel $channel;

/**
* @param \Rubix\Server\Services\SSEChannel $channel
Expand Down
4 changes: 2 additions & 2 deletions src/HTTP/Controllers/GraphQLController.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ class GraphQLController extends JSONController
*
* @var \Rubix\Server\GraphQL\Schema
*/
protected $schema;
protected \Rubix\Server\GraphQL\Schema $schema;

/**
* The promise adapter.
*
* @var \GraphQL\Executor\Promise\PromiseAdapter
*/
protected $adapter;
protected \GraphQL\Executor\Promise\PromiseAdapter $adapter;

/**
* @param \Rubix\Server\GraphQL\Schema $schema
Expand Down
2 changes: 1 addition & 1 deletion src/HTTP/Controllers/ModelController.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class ModelController extends JSONController
*
* @var \Rubix\Server\Models\Model
*/
protected $model;
protected \Rubix\Server\Models\Model $model;

/**
* @param \Rubix\Server\Models\Model $model
Expand Down
2 changes: 1 addition & 1 deletion src/HTTP/Controllers/ServerController.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class ServerController extends JSONController
*
* @var \Rubix\Server\Models\Server
*/
protected $server;
protected \Rubix\Server\Models\Server $server;

/**
* @param \Rubix\Server\Models\Server $server
Expand Down
4 changes: 2 additions & 2 deletions src/HTTP/Controllers/StaticAssetsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,14 @@ class StaticAssetsController extends Controller
*
* @var string
*/
protected $basePath;
protected string $basePath;

/**
* The cache.
*
* @var \Rubix\Server\Services\Caches\Cache
*/
protected $cache;
protected \Rubix\Server\Services\Caches\Cache $cache;

/**
* @param string $basePath
Expand Down
4 changes: 2 additions & 2 deletions src/HTTP/Middleware/Client/BackoffAndRetry.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,14 @@ class BackoffAndRetry implements Middleware
*
* @var int
*/
protected $maxRetries;
protected int $maxRetries;

/**
* The number of seconds to delay between retries before exponential backoff is applied.
*
* @var float
*/
protected $initialDelay;
protected float $initialDelay;

/**
* @param int $maxRetries
Expand Down
2 changes: 1 addition & 1 deletion src/HTTP/Middleware/Client/BasicAuthenticator.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class BasicAuthenticator implements Middleware
*
* @var string
*/
protected $credentials;
protected string $credentials;

/**
* @param string $username
Expand Down
4 changes: 2 additions & 2 deletions src/HTTP/Middleware/Client/CompressRequestBody.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@ class CompressRequestBody implements Middleware
*
* @var int
*/
protected $level;
protected int $level;

/**
* The minimum size of the request body in bytes in order to be compressed.
*
* @var int
*/
protected $threshold;
protected int $threshold;

/**
* @param int $level
Expand Down
2 changes: 1 addition & 1 deletion src/HTTP/Middleware/Internal/AttachServerHeaders.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class AttachServerHeaders
*
* @var string
*/
protected $serverName;
protected string $serverName;

/**
* @param string $serverName
Expand Down
2 changes: 1 addition & 1 deletion src/HTTP/Middleware/Internal/CatchServerErrors.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class CatchServerErrors
*
* @var \Rubix\Server\Services\EventBus
*/
protected $eventBus;
protected \Rubix\Server\Services\EventBus $eventBus;

/**
* @param \Rubix\Server\Services\EventBus $eventBus
Expand Down
2 changes: 1 addition & 1 deletion src/HTTP/Middleware/Internal/CheckRequestBodySize.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class CheckRequestBodySize
*
* @var int
*/
protected $postMaxSize;
protected int $postMaxSize;

/**
* @param int $postMaxSize
Expand Down
2 changes: 1 addition & 1 deletion src/HTTP/Middleware/Internal/CircuitBreaker.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class CircuitBreaker
*
* @var \Rubix\Server\Models\Server
*/
protected $server;
protected \Rubix\Server\Models\Server $server;

/**
* @param \Rubix\Server\Models\Server $server
Expand Down
2 changes: 1 addition & 1 deletion src/HTTP/Middleware/Internal/DispatchEvents.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class DispatchEvents
*
* @var \Rubix\Server\Services\EventBus
*/
protected $eventBus;
protected \Rubix\Server\Services\EventBus $eventBus;

/**
* @param \Rubix\Server\Services\EventBus $eventBus
Expand Down
2 changes: 1 addition & 1 deletion src/HTTP/Middleware/Server/AccessLogGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class AccessLogGenerator implements Middleware
*
* @var \Psr\Log\LoggerInterface
*/
protected $logger;
protected \Psr\Log\LoggerInterface $logger;

/**
* @param \Psr\Log\LoggerInterface $logger
Expand Down
4 changes: 2 additions & 2 deletions src/HTTP/Middleware/Server/BasicAuthenticator.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,14 @@ class BasicAuthenticator implements Middleware
*
* @var string[]
*/
protected $passwords;
protected array $passwords;

/**
* The unique name given to the scope of permissions required for this server.
*
* @var string
*/
protected $realm;
protected string $realm;

/**
* @param string[] $passwords
Expand Down
4 changes: 2 additions & 2 deletions src/HTTP/Middleware/Server/SharedTokenAuthenticator.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,14 @@ class SharedTokenAuthenticator implements Middleware
*
* @var (int|string)[]
*/
protected $tokens;
protected array $tokens;

/**
* The unique name given to the scope of permissions required for this server.
*
* @var string
*/
protected $realm;
protected string $realm;

/**
* @param string[] $tokens
Expand Down
2 changes: 1 addition & 1 deletion src/HTTP/Middleware/Server/TrustedClients.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class TrustedClients implements Middleware
*
* @var (int|string)[]
*/
protected $ips;
protected array $ips;

/**
* @param string[] $ips
Expand Down
Loading

0 comments on commit ef704b8

Please sign in to comment.