Skip to content

Commit ef704b8

Browse files
committed
Add typed class properties
1 parent bbf774d commit ef704b8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+98
-98
lines changed

src/Events/DatasetInferred.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class DatasetInferred implements Event
1818
*
1919
* @var \Rubix\ML\Datasets\Dataset
2020
*/
21-
protected $dataset;
21+
protected \Rubix\ML\Datasets\Dataset $dataset;
2222

2323
/**
2424
* @param \Rubix\ML\Datasets\Dataset $dataset

src/Events/Failure.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ abstract class Failure implements Event
1818
*
1919
* @var \Exception
2020
*/
21-
protected $exception;
21+
protected \Exception $exception;
2222

2323
/**
2424
* @param \Exception $exception

src/Events/MemoryUsageUpdated.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class MemoryUsageUpdated implements Event
1818
*
1919
* @var \Rubix\Server\Models\Memory
2020
*/
21-
protected $memory;
21+
protected \Rubix\Server\Models\Memory $memory;
2222

2323
/**
2424
* @param \Rubix\Server\Models\Memory $memory

src/Events/RequestReceived.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class RequestReceived implements Event
1818
*
1919
* @var \Psr\Http\Message\ServerRequestInterface
2020
*/
21-
protected $request;
21+
protected \Psr\Http\Message\ServerRequestInterface $request;
2222

2323
/**
2424
* @param \Psr\Http\Message\ServerRequestInterface $request

src/Events/ResponseSent.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class ResponseSent implements Event
1818
*
1919
* @var \Psr\Http\Message\ResponseInterface
2020
*/
21-
protected $response;
21+
protected \Psr\Http\Message\ResponseInterface $response;
2222

2323
/**
2424
* @param \Psr\Http\Message\ResponseInterface $response

src/GraphQL/Enums/DataTypeEnum.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class DataTypeEnum extends EnumType
1111
*
1212
* @var self|null
1313
*/
14-
protected static $instance;
14+
protected static ?self $instance = null;
1515

1616
/**
1717
* @return self

src/GraphQL/Enums/EstimatorTypeEnum.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class EstimatorTypeEnum extends EnumType
1111
*
1212
* @var self|null
1313
*/
14-
protected static $instance;
14+
protected static ?self $instance = null;
1515

1616
/**
1717
* @return self

src/GraphQL/InputObjects/DatasetInputObject.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class DatasetInputObject extends InputObjectType
1212
*
1313
* @var self|null
1414
*/
15-
protected static $instance;
15+
protected static ?self $instance = null;
1616

1717
/**
1818
* @return self

src/GraphQL/Objects/EstimatorInterfacesObject.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class EstimatorInterfacesObject extends ObjectType
1212
*
1313
* @var self|null
1414
*/
15-
protected static $instance;
15+
protected static ?self $instance = null;
1616

1717
/**
1818
* @return self

src/GraphQL/Objects/HTTPStatsObject.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class HTTPStatsObject extends ObjectType
1212
*
1313
* @var self|null
1414
*/
15-
protected static $instance;
15+
protected static ?self $instance = null;
1616

1717
/**
1818
* @return self

src/GraphQL/Objects/HyperparameterObject.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class HyperparameterObject extends ObjectType
1111
*
1212
* @var self|null
1313
*/
14-
protected static $instance;
14+
protected static ?self $instance = null;
1515

1616
/**
1717
* @return self

src/GraphQL/Objects/MemoryObject.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class MemoryObject extends ObjectType
1313
*
1414
* @var self|null
1515
*/
16-
protected static $instance;
16+
protected static ?self $instance = null;
1717

1818
/**
1919
* @return self

src/GraphQL/Objects/ModelObject.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class ModelObject extends ObjectType
2020
*
2121
* @var self|null
2222
*/
23-
protected static $instance;
23+
protected static ?self $instance = null;
2424

2525
/**
2626
* @return self

src/GraphQL/Objects/ProbabilityObject.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class ProbabilityObject extends ObjectType
1111
*
1212
* @var self|null
1313
*/
14-
protected static $instance;
14+
protected static ?self $instance = null;
1515

1616
/**
1717
* @return self

src/GraphQL/Objects/ProcessInfoObject.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class ProcessInfoObject extends ObjectType
1212
*
1313
* @var self|null
1414
*/
15-
protected static $instance;
15+
protected static ?self $instance = null;
1616

1717
/**
1818
* @return self

src/GraphQL/Objects/RequestsObject.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class RequestsObject extends ObjectType
1313
*
1414
* @var self|null
1515
*/
16-
protected static $instance;
16+
protected static ?self $instance = null;
1717

1818
/**
1919
* @return self

src/GraphQL/Objects/ServerObject.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class ServerObject extends ObjectType
1616
*
1717
* @var self|null
1818
*/
19-
protected static $instance;
19+
protected static ?self $instance = null;
2020

2121
/**
2222
* @return self

src/GraphQL/Objects/ServerSettingsObject.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class ServerSettingsObject extends ObjectType
1313
*
1414
* @var self|null
1515
*/
16-
protected static $instance;
16+
protected static ?self $instance = null;
1717

1818
/**
1919
* @return self

src/GraphQL/Objects/TransfersObject.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class TransfersObject extends ObjectType
1313
*
1414
* @var self|null
1515
*/
16-
protected static $instance;
16+
protected static ?self $instance = null;
1717

1818
/**
1919
* @return self

src/HTTP/Controllers/DashboardController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class DashboardController extends JSONController
1414
*
1515
* @var \Rubix\Server\Services\SSEChannel
1616
*/
17-
protected $channel;
17+
protected \Rubix\Server\Services\SSEChannel $channel;
1818

1919
/**
2020
* @param \Rubix\Server\Services\SSEChannel $channel

src/HTTP/Controllers/GraphQLController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@ class GraphQLController extends JSONController
2020
*
2121
* @var \Rubix\Server\GraphQL\Schema
2222
*/
23-
protected $schema;
23+
protected \Rubix\Server\GraphQL\Schema $schema;
2424

2525
/**
2626
* The promise adapter.
2727
*
2828
* @var \GraphQL\Executor\Promise\PromiseAdapter
2929
*/
30-
protected $adapter;
30+
protected \GraphQL\Executor\Promise\PromiseAdapter $adapter;
3131

3232
/**
3333
* @param \Rubix\Server\GraphQL\Schema $schema

src/HTTP/Controllers/ModelController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class ModelController extends JSONController
1919
*
2020
* @var \Rubix\Server\Models\Model
2121
*/
22-
protected $model;
22+
protected \Rubix\Server\Models\Model $model;
2323

2424
/**
2525
* @param \Rubix\Server\Models\Model $model

src/HTTP/Controllers/ServerController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class ServerController extends JSONController
1414
*
1515
* @var \Rubix\Server\Models\Server
1616
*/
17-
protected $server;
17+
protected \Rubix\Server\Models\Server $server;
1818

1919
/**
2020
* @param \Rubix\Server\Models\Server $server

src/HTTP/Controllers/StaticAssetsController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,14 @@ class StaticAssetsController extends Controller
3131
*
3232
* @var string
3333
*/
34-
protected $basePath;
34+
protected string $basePath;
3535

3636
/**
3737
* The cache.
3838
*
3939
* @var \Rubix\Server\Services\Caches\Cache
4040
*/
41-
protected $cache;
41+
protected \Rubix\Server\Services\Caches\Cache $cache;
4242

4343
/**
4444
* @param string $basePath

src/HTTP/Middleware/Client/BackoffAndRetry.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,14 @@ class BackoffAndRetry implements Middleware
3939
*
4040
* @var int
4141
*/
42-
protected $maxRetries;
42+
protected int $maxRetries;
4343

4444
/**
4545
* The number of seconds to delay between retries before exponential backoff is applied.
4646
*
4747
* @var float
4848
*/
49-
protected $initialDelay;
49+
protected float $initialDelay;
5050

5151
/**
5252
* @param int $maxRetries

src/HTTP/Middleware/Client/BasicAuthenticator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class BasicAuthenticator implements Middleware
2121
*
2222
* @var string
2323
*/
24-
protected $credentials;
24+
protected string $credentials;
2525

2626
/**
2727
* @param string $username

src/HTTP/Middleware/Client/CompressRequestBody.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,14 @@ class CompressRequestBody implements Middleware
3030
*
3131
* @var int
3232
*/
33-
protected $level;
33+
protected int $level;
3434

3535
/**
3636
* The minimum size of the request body in bytes in order to be compressed.
3737
*
3838
* @var int
3939
*/
40-
protected $threshold;
40+
protected int $threshold;
4141

4242
/**
4343
* @param int $level

src/HTTP/Middleware/Internal/AttachServerHeaders.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class AttachServerHeaders
1515
*
1616
* @var string
1717
*/
18-
protected $serverName;
18+
protected string $serverName;
1919

2020
/**
2121
* @param string $serverName

src/HTTP/Middleware/Internal/CatchServerErrors.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class CatchServerErrors
1818
*
1919
* @var \Rubix\Server\Services\EventBus
2020
*/
21-
protected $eventBus;
21+
protected \Rubix\Server\Services\EventBus $eventBus;
2222

2323
/**
2424
* @param \Rubix\Server\Services\EventBus $eventBus

src/HTTP/Middleware/Internal/CheckRequestBodySize.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class CheckRequestBodySize
1212
*
1313
* @var int
1414
*/
15-
protected $postMaxSize;
15+
protected int $postMaxSize;
1616

1717
/**
1818
* @param int $postMaxSize

src/HTTP/Middleware/Internal/CircuitBreaker.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class CircuitBreaker
1313
*
1414
* @var \Rubix\Server\Models\Server
1515
*/
16-
protected $server;
16+
protected \Rubix\Server\Models\Server $server;
1717

1818
/**
1919
* @param \Rubix\Server\Models\Server $server

src/HTTP/Middleware/Internal/DispatchEvents.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class DispatchEvents
1818
*
1919
* @var \Rubix\Server\Services\EventBus
2020
*/
21-
protected $eventBus;
21+
protected \Rubix\Server\Services\EventBus $eventBus;
2222

2323
/**
2424
* @param \Rubix\Server\Services\EventBus $eventBus

src/HTTP/Middleware/Server/AccessLogGenerator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class AccessLogGenerator implements Middleware
2626
*
2727
* @var \Psr\Log\LoggerInterface
2828
*/
29-
protected $logger;
29+
protected \Psr\Log\LoggerInterface $logger;
3030

3131
/**
3232
* @param \Psr\Log\LoggerInterface $logger

src/HTTP/Middleware/Server/BasicAuthenticator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,14 @@ class BasicAuthenticator implements Middleware
3737
*
3838
* @var string[]
3939
*/
40-
protected $passwords;
40+
protected array $passwords;
4141

4242
/**
4343
* The unique name given to the scope of permissions required for this server.
4444
*
4545
* @var string
4646
*/
47-
protected $realm;
47+
protected string $realm;
4848

4949
/**
5050
* @param string[] $passwords

src/HTTP/Middleware/Server/SharedTokenAuthenticator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,14 @@ class SharedTokenAuthenticator implements Middleware
3131
*
3232
* @var (int|string)[]
3333
*/
34-
protected $tokens;
34+
protected array $tokens;
3535

3636
/**
3737
* The unique name given to the scope of permissions required for this server.
3838
*
3939
* @var string
4040
*/
41-
protected $realm;
41+
protected string $realm;
4242

4343
/**
4444
* @param string[] $tokens

src/HTTP/Middleware/Server/TrustedClients.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class TrustedClients implements Middleware
2424
*
2525
* @var (int|string)[]
2626
*/
27-
protected $ips;
27+
protected array $ips;
2828

2929
/**
3030
* @param string[] $ips

0 commit comments

Comments
 (0)