Merge pull request #428 from a1812/fix#426

Fix #426, new composer.lock
This commit is contained in:
Dominik Liebler
2021-03-15 08:55:13 +01:00
committed by GitHub
3 changed files with 3101 additions and 1449 deletions

View File

@@ -2,6 +2,8 @@
namespace DesignPatterns\Creational\Singleton; namespace DesignPatterns\Creational\Singleton;
use Exception;
final class Singleton final class Singleton
{ {
private static ?Singleton $instance = null; private static ?Singleton $instance = null;
@@ -36,7 +38,8 @@ final class Singleton
/** /**
* prevent from being unserialized (which would create a second instance of it) * prevent from being unserialized (which would create a second instance of it)
*/ */
private function __wakeup() public function __wakeup()
{ {
throw new Exception("Cannot unserialize singleton");
} }
} }

View File

@@ -1,7 +1,6 @@
FROM composer:1 AS composer FROM composer AS composer
WORKDIR /app WORKDIR /app
ADD . /app ADD . /app
RUN composer global require hirak/prestissimo
RUN composer install \ RUN composer install \
&& ./vendor/bin/phpcs --ignore=_build . \ && ./vendor/bin/phpcs --ignore=_build . \
&& ./vendor/bin/phpunit \ && ./vendor/bin/phpunit \

4542
composer.lock generated

File diff suppressed because it is too large Load Diff