mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-07-27 18:20:22 +02:00
Merge remote-tracking branch 'origin/main' into fr-translation
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
|
||||
namespace DesignPatterns\Creational\Singleton;
|
||||
|
||||
use Exception;
|
||||
|
||||
final class Singleton
|
||||
{
|
||||
private static ?Singleton $instance = null;
|
||||
@@ -36,7 +38,8 @@ final class Singleton
|
||||
/**
|
||||
* prevent from being unserialized (which would create a second instance of it)
|
||||
*/
|
||||
private function __wakeup()
|
||||
public function __wakeup()
|
||||
{
|
||||
throw new Exception("Cannot unserialize singleton");
|
||||
}
|
||||
}
|
||||
|
@@ -1,7 +1,6 @@
|
||||
FROM composer:1 AS composer
|
||||
FROM composer AS composer
|
||||
WORKDIR /app
|
||||
ADD . /app
|
||||
RUN composer global require hirak/prestissimo
|
||||
RUN composer install \
|
||||
&& ./vendor/bin/phpcs --ignore=_build . \
|
||||
&& ./vendor/bin/phpunit \
|
||||
|
4542
composer.lock
generated
4542
composer.lock
generated
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user