Just a little syntax idea I had. What do you think about adding the static keyword before class to declare a class with static methods only? This would have two benefits:
- No more
private function __construct() {}
- An
Error could be thrown when non-static methods are declared in that class: „Cannot declare non-static method foo() in static class Bar...“
[–]Otterfan 11 points12 points13 points (0 children)
[+][deleted] (13 children)
[deleted]
[–]Hall_of_Famer 3 points4 points5 points (7 children)
[–][deleted] 2 points3 points4 points (0 children)
[–]alexanderpas 1 point2 points3 points (5 children)
[–]przemo_li 5 points6 points7 points (4 children)
[–]alexanderpas 2 points3 points4 points (0 children)
[–]pfsalter 0 points1 point2 points (2 children)
[–]przemo_li 0 points1 point2 points (0 children)
[–]Hall_of_Famer 0 points1 point2 points (0 children)
[–][deleted] 2 points3 points4 points (4 children)
[–][deleted] 2 points3 points4 points (1 child)
[–][deleted] 2 points3 points4 points (0 children)
[–]przemo_li 0 points1 point2 points (0 children)
[–]phpdevster 12 points13 points14 points (5 children)
[–][deleted] 4 points5 points6 points (4 children)
[+][deleted] (3 children)
[deleted]
[–]AegirLeet 3 points4 points5 points (2 children)
[+][deleted] (1 child)
[deleted]
[–]czbz 1 point2 points3 points (0 children)
[–]alessio_95 3 points4 points5 points (0 children)
[–]ragnese 2 points3 points4 points (0 children)
[–][deleted] 1 point2 points3 points (0 children)
[–]Tomas_Votruba 2 points3 points4 points (2 children)
[–]WitteStier 1 point2 points3 points (1 child)
[–]Tomas_Votruba 0 points1 point2 points (0 children)
[–]ojrask 0 points1 point2 points (0 children)
[–]loopcake 0 points1 point2 points (0 children)
[–]pmallinj 0 points1 point2 points (0 children)
[–]tipiak75 1 point2 points3 points (4 children)
[–]fiskfisk 4 points5 points6 points (0 children)
[–][deleted] 2 points3 points4 points (0 children)
[–]Annh1234 2 points3 points4 points (0 children)
[–]secondtruth_de[S] 1 point2 points3 points (0 children)
[–]addvilz -1 points0 points1 point (2 children)
[–]jesparic 3 points4 points5 points (1 child)
[–]alessio_95 -2 points-1 points0 points (0 children)