File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ in the factory interface.
5353php src/Factory/AbstractFactory/client.php
5454```
5555### Singleton pattern
56- Il Pattern Singleton garantisce che una classe abbia una sola istanza e fornisce un punto di accesso globale a essa .
56+ Singleton Pattern ensures that a class has only one instance and provides a global access point to it .
5757```
5858php src/Singleton/client.php
5959```
Original file line number Diff line number Diff line change @@ -9,8 +9,8 @@ class Singleton
99 private static ?self $ instance = null ;
1010
1111 /**
12- * Rendiamo iil costruttore privato al fine di prevenire la creazione di una nuova istanza
13- * della classe in questione attraverso l'operatore `new` al di fuori della classe .
12+ * Let's make the constructor private in order to prevent the creation of a new instance of the class in question
13+ * via the `new` operator outside the class .
1414 */
1515 protected function __construct ()
1616 {
@@ -26,14 +26,14 @@ public static function getInstance(): self
2626 }
2727
2828 /**
29- * Rendiamo il metodo __clone() provate al fine di evitare la clonazione dell'istanza .
29+ * Let's make the __clone () method tried in order to avoid cloning the instance .
3030 */
3131 private function __clone ()
3232 {
3333 }
3434
3535 public function method (): void
3636 {
37- echo 'Faccio qualcosa ' ."\n" ;
37+ echo 'I do something ' ."\n" ;
3838 }
3939}
You can’t perform that action at this time.
0 commit comments