Skip to content

Commit 29a8c79

Browse files
committed
Remove usefulness doc blocks.
1 parent a6a94cb commit 29a8c79

File tree

9 files changed

+9
-63
lines changed

9 files changed

+9
-63
lines changed

src/Creators/BaseCreator.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111
class BaseCreator extends BaseCommand
1212
{
13-
use Utility;
1413
private $creator;
1514
private null|string $choice=null;
1615
const ALL_OPTIONS = ['Current','New','Always keep current','Always replace with new'];

src/Creators/CreatorEntity.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,6 @@ private function writeAttribute(string $entityStubsPath, string $attributeName,
122122
$attributeStub);
123123
}
124124

125-
/**
126-
* Generate getter and setter for given attribute.
127-
*/
128125
private function writeAccessors(string $entityStubsPath, string $attributeName, string $attributeType,string $type): string
129126
{
130127
$accessorStub = file_get_contents($entityStubsPath.$type.'.stub');

src/CustomMySqlQueries.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,6 @@ trait CustomMySqlQueries
4343

4444
/**
4545
* Extract all columns from a given table.
46-
* @param string $tableName
47-
* @return Collection
4846
*/
4947
public function getAllColumnsInTable(string $tableName): Collection
5048
{
@@ -57,7 +55,6 @@ public function getAllColumnsInTable(string $tableName): Collection
5755

5856
/**
5957
* Extract all table names.
60-
* @return Collection
6158
*/
6259
public function getAllTableNames(): Collection
6360
{
@@ -70,8 +67,6 @@ public function getAllTableNames(): Collection
7067

7168
/**
7269
* Extract all foreign keys from a given table. Foreign key's relations must define in MySql!
73-
* @param string $tableName
74-
* @return Collection
7570
*/
7671
public function extractForeignKeys(string $tableName): Collection
7772
{

src/Models/Entity/Entity.php

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@ abstract class Entity implements JsonSerializable, Arrayable
1111
// contain originals value of attributes
1212
private $originals = [];
1313

14-
/**
15-
* @return int
16-
*/
1714
abstract public function getId(): int;
1815

1916
public function __construct()
@@ -44,7 +41,6 @@ public function __isset($name)
4441

4542
/**
4643
* Make all variables of the object as null
47-
* @return $this
4844
*/
4945
public function clearVariables(): self
5046
{
@@ -55,9 +51,6 @@ public function clearVariables(): self
5551
return $this;
5652
}
5753

58-
/**
59-
* @return int
60-
*/
6154
public function getPrimaryKey(): int
6255
{
6356
return $this->getId();
@@ -101,7 +94,6 @@ public function emptyOriginals()
10194

10295
/**
10396
* get an Array of Changed Attributes
104-
* @return array
10597
*/
10698
public function changedAttributesName(): array
10799
{
@@ -117,7 +109,6 @@ public function changedAttributesName(): array
117109

118110
/**
119111
* get an Array of Changed Attributes with new values
120-
* @return array
121112
*/
122113
public function getDirty(): array
123114
{
@@ -133,7 +124,6 @@ public function getDirty(): array
133124

134125
/**
135126
* get an Array of Changed Attributes with original values
136-
* @return array
137127
*/
138128
public function getChanges(): array
139129
{
@@ -148,7 +138,6 @@ public function getChanges(): array
148138

149139
/**
150140
* is any attribute changed?
151-
* @return bool
152141
*/
153142
public function isDirty(): bool
154143
{

src/Models/Factories/IFactory.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,7 @@
88

99
interface IFactory
1010
{
11-
/**
12-
* @param stdClass $entity
13-
* @return Entity
14-
*/
1511
public function makeEntityFromStdClass(stdClass $entity): Entity;
1612

17-
/**
18-
* @param Collection|array $entities
19-
* @return Collection
20-
*/
2113
public function makeCollectionOfEntities(Collection|array $entities): Collection;
2214
}

src/Models/Repositories/MySqlRepository.php

Lines changed: 2 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ public function __construct()
3131

3232
/**
3333
* Notice: this function cannot be used in async jobs because the connection is not serializable!
34-
* @param ConnectionInterface $connection
3534
*/
3635
public function changeDatabaseConnection($connection)
3736
{
@@ -64,14 +63,6 @@ public function newQuery(): Builder
6463
// return $this;
6564
// }
6665

67-
/**
68-
* @param int|null $total
69-
* @param int $offset
70-
* @param int $count
71-
* @param array $orders
72-
* @param array $filters
73-
* @return Collection
74-
*/
7566
public function getAllForGridView(null|int &$total, int $offset = 0, int $count = 0, array $orders = [], array $filters = []): Collection
7667
{
7768
$query = $this->newQuery();
@@ -99,10 +90,6 @@ public function exists($columnValue, $columnName = null)
9990

10091
/**
10192
* this is for validation purpose look at AppServiceProvider
102-
* @param $attribute
103-
* @param $value
104-
* @param null $ignoredPrimaryKey
105-
* @return bool
10693
*/
10794
public function valueExists($attribute, $value, $ignoredPrimaryKey = null)
10895
{
@@ -121,10 +108,7 @@ public function valueExists($attribute, $value, $ignoredPrimaryKey = null)
121108
return $query->exists();
122109
}
123110

124-
/**
125-
* @param Entity $model
126-
*/
127-
public function updateOrCreate($model)
111+
public function updateOrCreate(Entity $model)
128112
{
129113
if ($this->exists($model->getPrimaryKey())) {
130114
$this->update($model);
@@ -136,7 +120,7 @@ public function updateOrCreate($model)
136120
/**
137121
* @param Entity $model
138122
*/
139-
public function createIfNotExists($model)
123+
public function createIfNotExists(Entity $model)
140124
{
141125
if (!$this->exists($model->getPrimaryKey())) {
142126
$this->create($model);
@@ -157,15 +141,6 @@ public function getMaxId()
157141
}
158142
}
159143

160-
/**
161-
* @param Builder $query
162-
* @param int $offset
163-
* @param int $count
164-
* @param int|null $total
165-
* @param array $orders
166-
* @param array $filters
167-
* @return Builder
168-
*/
169144
protected function processGridViewQuery(Builder $query, null|int &$total, int $offset = 0, int $count = 0, array $orders = [], array $filters = []): Builder
170145
{
171146
if ($orders) {

src/Models/Resources/Resource.php

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,9 @@
77

88
abstract class Resource implements IResource
99
{
10-
/**
11-
* @param Entity $entity
12-
* @return array
13-
*/
10+
1411
abstract public function toArray(Entity $entity): array;
1512

16-
/**
17-
* @param Collection $entities
18-
* @return array
19-
*/
2013
public function collectionToArray(Collection $entities): array
2114
{
2215
$entityArray = [];

stubs/Repositories/Mysql/mysql.getAllBy.stub

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11

2+
/**
3+
* This action has been created because '{{ FunctionName }}' exists in foreign keys or indexes
4+
*/
25
public function getAllBy{{ FunctionNamePlural }}(array ${{ AttributeNamePlural }}): Collection
36
{
47
${{ EntityVariableName }} = $this->newQuery()

stubs/Repositories/Mysql/mysql.getOneBy.stub

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11

2+
/**
3+
* This action has been created because '{{ FunctionName }}' exists in foreign keys or indexes
4+
*/
25
public function getOneBy{{ FunctionName }}(int ${{ AttributeName }}): null|{{ EntityName }}
36
{
47
${{ EntityVariableName }} = $this->newQuery()

0 commit comments

Comments
 (0)