"Fossies" - the Fresh Open Source Software Archive

Member "contao-4.11.5/core-bundle/src/Migration/AbstractMigration.php" (23 Jun 2021, 630 Bytes) of package /linux/www/contao-4.11.5.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) PHP source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "AbstractMigration.php" see the Fossies "Dox" file reference documentation.

    1 <?php
    2 
    3 declare(strict_types=1);
    4 
    5 /*
    6  * This file is part of Contao.
    7  *
    8  * (c) Leo Feyer
    9  *
   10  * @license LGPL-3.0-or-later
   11  */
   12 
   13 namespace Contao\CoreBundle\Migration;
   14 
   15 abstract class AbstractMigration implements MigrationInterface
   16 {
   17     public function getName(): string
   18     {
   19         return static::class;
   20     }
   21 
   22     protected function createResult(bool $successful, string $message = null): MigrationResult
   23     {
   24         if (null === $message) {
   25             $message = $this->getName().' '.($successful ? 'executed successfully' : 'execution failed');
   26         }
   27 
   28         return new MigrationResult($successful, $message);
   29     }
   30 }