Skip to content

Commit e6c9063

Browse files
authored
Merge pull request #24 from madrussa/fix_return_types
Fix return types
2 parents df0c010 + 4e23b80 commit e6c9063

File tree

2 files changed

+15
-16
lines changed

2 files changed

+15
-16
lines changed

src/Kitar/Dynamodb/Model/Model.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ public static function find($key)
110110
}
111111

112112
if (is_string($key) || is_numeric($key)) {
113-
$model = new static;
113+
$model = new static();
114114
$model->setAttribute($model->getKeyName(), $key);
115115
$key = $model->getKey();
116116
}
@@ -122,7 +122,7 @@ public static function find($key)
122122
* Get all of the models from the database.
123123
*
124124
* @param array $columns
125-
* @return Illuminate\Database\Eloquent\Collection
125+
* @return \Illuminate\Database\Eloquent\Collection
126126
*/
127127
public static function all($columns = [])
128128
{

src/Kitar/Dynamodb/Query/Builder.php

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414

1515
class Builder extends BaseBuilder
1616
{
17-
1817
/**
1918
* Name of the index.
2019
* @var string|null
@@ -91,29 +90,29 @@ class Builder extends BaseBuilder
9190

9291
/**
9392
* Dedicated query for building FilterExpression.
94-
* @var Kitar\Dynamodb\Query\Builder
93+
* @var \Kitar\Dynamodb\Query\Builder
9594
*/
9695
protected $filter_query;
9796

9897
/**
9998
* Dedicated query for building ConditionExpression.
100-
* @var Kitar\Dynamodb\Query\Builder
99+
* @var \Kitar\Dynamodb\Query\Builder
101100
*/
102101
protected $condition_query;
103102

104103
/**
105104
* Dedicated query for building KeyConditionExpression.
106-
* @var Kitar\Dynamodb\Query\Builder
105+
* @var \Kitar\Dynamodb\Query\Builder
107106
*/
108107
protected $key_condition_query;
109108

110109
/**
111110
* Create a new query builder instance.
112111
*
113-
* @param Kitar\Dynamodb\Connection $connection
114-
* @param Kitar\Dynamodb\Query\Grammar $grammar
115-
* @param Kitar\Dynamodb\Query\Processor $processor
116-
* @param Kitar\Dynamodb\Query\ExpressionAttributes|null $expression_attributes
112+
* @param \Kitar\Dynamodb\Connection $connection
113+
* @param \Kitar\Dynamodb\Query\Grammar $grammar
114+
* @param \Kitar\Dynamodb\Query\Processor $processor
115+
* @param \Kitar\Dynamodb\Query\ExpressionAttributes|null $expression_attributes
117116
* @param bool $is_nested_query
118117
* @return void
119118
*/
@@ -125,7 +124,7 @@ public function __construct(Connection $connection, Grammar $grammar, Processor
125124

126125
$this->processor = $processor;
127126

128-
$this->expression_attributes = $expression_attributes ?? new ExpressionAttributes;
127+
$this->expression_attributes = $expression_attributes ?? new ExpressionAttributes();
129128

130129
if (! $is_nested_query) {
131130
$this->initializeDedicatedQueries();
@@ -336,7 +335,7 @@ public function decrement($column, $amount = 1, array $extra = [])
336335
* @param $symbol
337336
* @param int $amount
338337
* @param array $extra
339-
* @return array|\Aws\Result|Aws\Result|Illuminate\Support\Collection
338+
* @return array|\Aws\Result|Aws\Result|\Illuminate\Support\Collection
340339
*/
341340
protected function incrementOrDecrement($column, $symbol, $amount = 1, array $extra = [])
342341
{
@@ -350,7 +349,7 @@ protected function incrementOrDecrement($column, $symbol, $amount = 1, array $ex
350349
/**
351350
* Query.
352351
*
353-
* @return Illuminate\Support\Collection|array
352+
* @return \Illuminate\Support\Collection|array
354353
*/
355354
public function query()
356355
{
@@ -361,7 +360,7 @@ public function query()
361360
* Scan.
362361
*
363362
* @param array $columns
364-
* @return Illuminate\Support\Collection|array
363+
* @return \Illuminate\Support\Collection|array
365364
*/
366365
public function scan($columns = [])
367366
{
@@ -518,12 +517,12 @@ public function newQuery()
518517
* @param string $query_method
519518
* @param array $params
520519
* @param string $processor_method
521-
* @return array|Illuminate\Support\Collection|Aws\Result
520+
* @return array|\Illuminate\Support\Collection|\Aws\Result
522521
*/
523522
protected function process($query_method, $processor_method)
524523
{
525524
// Compile columns and wheres attributes.
526-
// These attributes needs to intaract with ExpressionAttributes during compile,
525+
// These attributes needs to interact with ExpressionAttributes during compile,
527526
// so it need to run before compileExpressionAttributes.
528527
$params = array_merge(
529528
$this->grammar->compileProjectionExpression($this->columns, $this->expression_attributes),

0 commit comments

Comments
 (0)