Completed
Pull Request — master (#3)
by Amine
02:38
created
performance/scripts/functional.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-require __DIR__.'/../../vendor/autoload.php';
2
+require __DIR__ . '/../../vendor/autoload.php';
3 3
 
4 4
 use Tarsana\Functional as F;
5 5
 use Tarsana\Functional\Stream;
Please login to merge, or discard this patch.
performance/scripts/imperative.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@
 block discarded – undo
6 6
 
7 7
 $words = [];
8 8
 foreach ($text as $word => $occ) {
9
-    if (! isset($words[$occ])) {
9
+    if (!isset($words[$occ])) {
10 10
         $words[$occ] = [];
11 11
     }
12 12
     $words[$occ][] = $word;
Please login to merge, or discard this patch.
performance/scripts/object-oriented.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -103,8 +103,9 @@
 block discarded – undo
103 103
     protected function getWordsHavingOccurrences($number) {
104 104
         $result = [];
105 105
         foreach ($this->list as $word) {
106
-            if ($word->occurrences() == $number)
107
-                $result[] = $word;
106
+            if ($word->occurrences() == $number) {
107
+                            $result[] = $word;
108
+            }
108 109
         }
109 110
         usort($result, function(Word $w1, Word $w2) {
110 111
             return strcmp($w1->value(), $w2->value());
Please login to merge, or discard this patch.
src/Classes/Placeholder.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -8,10 +8,10 @@
 block discarded – undo
8 8
  */
9 9
 class Placeholder {
10 10
     private static $instance;
11
-    private function __construct(){}
11
+    private function __construct() {}
12 12
     public static function get()
13 13
     {
14
-        if(static::$instance === null)
14
+        if (static::$instance === null)
15 15
             static::$instance = new Placeholder;
16 16
         return static::$instance;
17 17
     }
Please login to merge, or discard this patch.