@@ -44,49 +44,49 @@ class Configuration
4444 private $ migrationsDatabase ;
4545
4646 /**
47- * The migration database name to track versions in
47+ * The migration database name to track versions in.
4848 *
4949 * @var string
5050 */
5151 private $ migrationsDatabaseName ;
5252
5353 /**
54- * Flag for whether or not the migration collection has been created
54+ * Flag for whether or not the migration collection has been created.
5555 *
56- * @var boolean
56+ * @var bool
5757 */
5858 private $ migrationCollectionCreated = false ;
5959
6060 /**
61- * The migration collection name to track versions in
61+ * The migration collection name to track versions in.
6262 *
6363 * @var string
6464 */
6565 private $ migrationsCollectionName = 'antimattr_migration_versions ' ;
6666
6767 /**
68- * The path to a directory where new migration classes will be written
68+ * The path to a directory where new migration classes will be written.
6969 *
7070 * @var string
7171 */
7272 private $ migrationsDirectory ;
7373
7474 /**
75- * Namespace the migration classes live in
75+ * Namespace the migration classes live in.
7676 *
7777 * @var string
7878 */
7979 private $ migrationsNamespace ;
8080
81- /**
82- * The path to a directory where mongo console scripts are
81+ /**
82+ * The path to a directory where mongo console scripts are.
8383 *
8484 * @var string
8585 */
8686 private $ migrationsScriptDirectory ;
8787
8888 /**
89- * Used by Console Commands and Output Writer
89+ * Used by Console Commands and Output Writer.
9090 *
9191 * @var string
9292 */
@@ -116,7 +116,7 @@ public function __construct(Connection $connection, OutputWriter $outputWriter =
116116 }
117117
118118 /**
119- * Returns a timestamp version as a formatted date
119+ * Returns a timestamp version as a formatted date.
120120 *
121121 * @param string $version
122122 *
@@ -244,7 +244,7 @@ public function getMigrationsDirectory()
244244 }
245245
246246 /**
247- * Set the migrations namespace
247+ * Set the migrations namespace.
248248 *
249249 * @param string $migrationsNamespace The migrations namespace
250250 */
@@ -312,15 +312,15 @@ public function getName()
312312 }
313313
314314 /**
315- * @return integer
315+ * @return int
316316 */
317317 public function getNumberOfAvailableMigrations ()
318318 {
319319 return count ($ this ->migrations );
320320 }
321321
322322 /**
323- * @return integer
323+ * @return int
324324 */
325325 public function getNumberOfExecutedMigrations ()
326326 {
@@ -343,8 +343,8 @@ public function getOutputWriter()
343343 * Register a single migration version to be executed by a AbstractMigration
344344 * class.
345345 *
346- * @param string $version The version of the migration in the format YYYYMMDDHHMMSS.
347- * @param string $class The migration class to execute for the version.
346+ * @param string $version The version of the migration in the format YYYYMMDDHHMMSS
347+ * @param string $class The migration class to execute for the version
348348 *
349349 * @return Version
350350 *
@@ -393,9 +393,9 @@ public function registerMigrations(array $migrations)
393393 * with the pattern VersionYYYYMMDDHHMMSS.php as the filename and registers
394394 * them as migrations.
395395 *
396- * @param string $path The root directory to where some migration classes live.
396+ * @param string $path The root directory to where some migration classes live
397397 *
398- * @return Version[] The array of migrations registered.
398+ * @return Version[] The array of migrations registered
399399 */
400400 public function registerMigrationsFromDirectory ($ path )
401401 {
@@ -419,11 +419,11 @@ public function registerMigrationsFromDirectory($path)
419419 /**
420420 * Returns the Version instance for a given version in the format YYYYMMDDHHMMSS.
421421 *
422- * @param string $version The version string in the format YYYYMMDDHHMMSS.
422+ * @param string $version The version string in the format YYYYMMDDHHMMSS
423423 *
424424 * @return AntiMattr\MongoDB\Migrations\Version
425425 *
426- * @throws AntiMattr\MongoDB\Migrations\Exception\UnknownVersionException Throws exception if migration version does not exist.
426+ * @throws AntiMattr\MongoDB\Migrations\Exception\UnknownVersionException Throws exception if migration version does not exist
427427 */
428428 public function getVersion ($ version )
429429 {
@@ -439,19 +439,19 @@ public function getVersion($version)
439439 *
440440 * @param string $version
441441 *
442- * @return boolean
442+ * @return bool
443443 */
444444 public function hasVersion ($ version )
445445 {
446446 return isset ($ this ->migrations [$ version ]);
447447 }
448448
449449 /**
450- * Check if a version has been migrated or not yet
450+ * Check if a version has been migrated or not yet.
451451 *
452452 * @param AntiMattr\MongoDB\Migrations\Version $version
453453 *
454- * @return boolean
454+ * @return bool
455455 */
456456 public function hasVersionMigrated (Version $ version )
457457 {
@@ -495,7 +495,7 @@ public function getCurrentVersion()
495495 /**
496496 * Returns the latest available migration version.
497497 *
498- * @return string The version string in the format YYYYMMDDHHMMSS.
498+ * @return string The version string in the format YYYYMMDDHHMMSS
499499 */
500500 public function getLatestVersion ()
501501 {
@@ -508,7 +508,7 @@ public function getLatestVersion()
508508 /**
509509 * Create the migration collection to track migrations with.
510510 *
511- * @return boolean Whether or not the collection was created.
511+ * @return bool Whether or not the collection was created
512512 */
513513 public function createMigrationCollection ()
514514 {
@@ -527,10 +527,10 @@ public function createMigrationCollection()
527527 * Returns the array of migrations to executed based on the given direction
528528 * and target version number.
529529 *
530- * @param string $direction The direction we are migrating.
531- * @param string $to The version to migrate to.
530+ * @param string $direction The direction we are migrating
531+ * @param string $to The version to migrate to
532532 *
533- * @return Version[] $migrations The array of migrations we can execute.
533+ * @return Version[] $migrations The array of migrations we can execute
534534 */
535535 public function getMigrationsToExecute ($ direction , $ to )
536536 {
@@ -560,17 +560,17 @@ public function getMigrationsToExecute($direction, $to)
560560 * Check if we should execute a migration for a given direction and target
561561 * migration version.
562562 *
563- * @param string $direction The direction we are migrating.
564- * @param Version $version The Version instance to check.
565- * @param string $to The version we are migrating to.
566- * @param array $migrated Migrated versions array.
563+ * @param string $direction The direction we are migrating
564+ * @param Version $version The Version instance to check
565+ * @param string $to The version we are migrating to
566+ * @param array $migrated Migrated versions array
567567 *
568- * @return boolean
568+ * @return bool
569569 */
570570 private function shouldExecuteMigration ($ direction , Version $ version , $ to , $ migrated )
571571 {
572572 if ($ direction === 'down ' ) {
573- if ( ! in_array ($ version ->getVersion (), $ migrated )) {
573+ if (! in_array ($ version ->getVersion (), $ migrated )) {
574574 return false ;
575575 }
576576
@@ -587,7 +587,7 @@ private function shouldExecuteMigration($direction, Version $version, $to, $migr
587587 }
588588
589589 /**
590- * Validation that this instance has all the required properties configured
590+ * Validation that this instance has all the required properties configured.
591591 *
592592 * @throws AntiMattr\MongoDB\Migrations\Exception\ConfigurationValidationException
593593 */
@@ -641,6 +641,5 @@ public function getDetailsMap()
641641 'num_available_migrations ' => $ numAvailableMigrations ,
642642 'num_new_migrations ' => $ numNewMigrations ,
643643 );
644-
645644 }
646645}
0 commit comments