Skip to content

Commit 849e447

Browse files
craiglondonbizley
andauthored
Update PHPDoc blocks (#196)
* Update PHPDoc blocks * PHPDocs: Remove @param and @return comments from actionSql() * PHPDocs: Remove @param and @return comments where the param and return is already implied in the code --------- Co-authored-by: Bizley <[email protected]>
1 parent c3c0998 commit 849e447

File tree

3 files changed

+16
-8
lines changed

3 files changed

+16
-8
lines changed

src/TableMapper.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,6 @@ private function getIndexes(string $table): array
123123

124124
/**
125125
* Returns a primary key of the table.
126-
* @return PrimaryKeyInterface|null
127126
* @throws NotSupportedException
128127
*/
129128
private function getPrimaryKey(string $table): ?PrimaryKeyInterface

src/controllers/MigrationController.php

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,11 @@
88
use bizley\migration\table\BlueprintInterface;
99
use bizley\migration\table\ForeignKeyInterface;
1010
use bizley\migration\TableMissingException;
11+
use ErrorException;
12+
use Exception;
1113
use Yii;
1214
use yii\base\Action;
13-
use yii\base\Exception;
15+
use yii\base\Exception as BaseException;
1416
use yii\base\InvalidConfigException;
1517
use yii\base\NotSupportedException;
1618
use yii\console\ExitCode;
@@ -163,8 +165,8 @@ public function optionAliases(): array
163165
* Sets the workingPath and workingNamespace and makes sure DB connection is prepared.
164166
* @param Action<self> $action the action to be executed.
165167
* @return bool whether the action should continue to be executed.
168+
* @throws BaseException
166169
* @throws InvalidConfigException
167-
* @throws Exception
168170
*/
169171
public function beforeAction($action): bool // BC declaration
170172
{
@@ -586,7 +588,11 @@ public function actionUpdate(string $inputTable): int
586588
return ExitCode::OK;
587589
}
588590

589-
/** @since 4.4.0 */
591+
/**
592+
* @since 4.4.0
593+
* @throws ErrorException
594+
* @throws InvalidConfigException
595+
*/
590596
public function actionSql(string $migrationName, string $method = 'up'): int
591597
{
592598
$method = \strtolower($method);
@@ -615,7 +621,7 @@ public function actionSql(string $migrationName, string $method = 'up'): int
615621

616622
/**
617623
* Prepares path directory. If directory doesn't exist it's being created.
618-
* @throws Exception
624+
* @throws BaseException
619625
*/
620626
private function preparePathDirectory(string $path): string
621627
{
@@ -632,7 +638,7 @@ private function preparePathDirectory(string $path): string
632638
/**
633639
* Stores the content in a file under the given path.
634640
* @param mixed $content
635-
* @throws \Throwable
641+
* @throws BaseException
636642
*/
637643
public function storeFile(string $path, $content): void
638644
{
@@ -662,6 +668,7 @@ private function fixHistory(string $migrationClassName): void
662668
/**
663669
* Generates migration for postponed foreign keys.
664670
* @param array<ForeignKeyInterface> $postponedForeignKeys
671+
* @throws BaseException
665672
* @throws DbException
666673
* @throws InvalidConfigException
667674
* @throws NotSupportedException
@@ -692,6 +699,7 @@ private function generateMigrationForForeignKeys(array $postponedForeignKeys, st
692699

693700
/**
694701
* Generates updating migration based on a blueprint.
702+
* @throws BaseException
695703
* @throws DbException
696704
* @throws InvalidConfigException
697705
* @throws NotSupportedException
@@ -721,6 +729,7 @@ private function generateMigrationWithBlueprint(BlueprintInterface $blueprint, s
721729
/**
722730
* Generates creating migration based on a table structure.
723731
* @param array<string> $referencesToPostpone
732+
* @throws BaseException
724733
* @throws DbException
725734
* @throws InvalidConfigException
726735
* @throws NotSupportedException
@@ -897,7 +906,8 @@ private function getAllTableNames(Connection $db): array
897906
* via the server's filesystem.
898907
* Note: On Windows, this function fails silently when applied on a regular file.
899908
* @param string $path the path to the file or directory.
900-
* @throws \Exception
909+
* @throws BaseException
910+
* @throws Exception
901911
*/
902912
private function setFileModeAndOwnership(string $path): void
903913
{

src/table/TimestampColumn.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ public function setDefault($default): void
2929
/**
3030
* Checks if schema supports length for this column.
3131
* In case of MySQL the engine version must be 5.6.4 or newer.
32-
* @return bool
3332
*/
3433
private function isSchemaLengthSupporting(?string $schema, ?string $engineVersion): bool
3534
{

0 commit comments

Comments
 (0)