Merge remote-tracking branch 'origin/main' into fr-translation

This commit is contained in:
Dominik Liebler
2021-03-15 08:58:58 +01:00
3 changed files with 3101 additions and 1449 deletions

View File

@@ -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");
}
}

View File

@@ -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

File diff suppressed because it is too large Load Diff