Completed
Branch master (4f28df)
by
unknown
13:22
created
src/Dictionary.php 2 patches
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
      */
40 40
     public static function getInstance()
41 41
     {
42
-        if (! self::$instance) {
42
+        if (!self::$instance) {
43 43
             self::$instance = new self();
44 44
         }
45 45
 
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
     {
58 58
         $lowerCaseSlang = strtolower($slang);
59 59
 
60
-        return array_filter($this->data, function ($value) use ($lowerCaseSlang) {
60
+        return array_filter($this->data, function($value) use ($lowerCaseSlang) {
61 61
             return $value['slang'] == $lowerCaseSlang;
62 62
         });
63 63
     }
@@ -74,13 +74,13 @@  discard block
 block discarded – undo
74 74
     public function add($slang, $description, $sampleSentence)
75 75
     {
76 76
         $_added = false;
77
-        if (! is_string($slang)) {
77
+        if (!is_string($slang)) {
78 78
             throw new InvalidArgumentException('A string is expected as the first argument. The first argument is not a string.');
79 79
         }
80
-        if (! is_string($description)) {
80
+        if (!is_string($description)) {
81 81
             throw new InvalidArgumentException('A string is expected as the second argument. The second argument is not a string.');
82 82
         }
83
-        if (! is_string($sampleSentence)) {
83
+        if (!is_string($sampleSentence)) {
84 84
             throw new InvalidArgumentException('A string is expected as the third argument. The third argument is not a string.');
85 85
         }
86 86
         if (count(self::search($slang)) > 0) {
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
      */
103 103
     public function read($slang)
104 104
     {
105
-        if (! is_string($slang)) {
105
+        if (!is_string($slang)) {
106 106
             throw new InvalidArgumentException('A string is expected as the argument. The argument is not a string.');
107 107
         }
108 108
         $records = self::search($slang);
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
     {
125 125
         $_selected = false;
126 126
         $this->index = -1;
127
-        if (! is_string($slang)) {
127
+        if (!is_string($slang)) {
128 128
             throw new InvalidArgumentException('A string is expected as the argument. The argument is not a string.');
129 129
         }
130 130
         $records = self::search($slang);
@@ -150,13 +150,13 @@  discard block
 block discarded – undo
150 150
     public function update($slang, $description, $sampleSentence)
151 151
     {
152 152
         $_updated = false;
153
-        if (! is_string($slang)) {
153
+        if (!is_string($slang)) {
154 154
             throw new InvalidArgumentException('A string is expected as the first argument. The first argument is not a string.');
155 155
         }
156
-        if (! is_string($description)) {
156
+        if (!is_string($description)) {
157 157
             throw new InvalidArgumentException('A string is expected as the second argument. The second argument is not a string.');
158 158
         }
159
-        if (! is_string($sampleSentence)) {
159
+        if (!is_string($sampleSentence)) {
160 160
             throw new InvalidArgumentException('A string is expected as the third argument. The third argument is not a string.');
161 161
         }
162 162
         if (array_key_exists($this->index, $this->data)) {
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
     public function delete($slang)
181 181
     {
182 182
         $_deleted = false;
183
-        if (! is_string($slang)) {
183
+        if (!is_string($slang)) {
184 184
             throw new InvalidArgumentException('A string is expected as the argument. The argument is not a string.');
185 185
         }
186 186
         $records = self::search($slang);
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
 
36 36
     /**
37 37
      * This method returns the only avaliable instance of Opeyemiabiodun\UrbanDictionary\Dictionary.
38
-     * @return Opeyemiabiodun\UrbanDictionary\Dictionary
38
+     * @return Dictionary
39 39
      */
40 40
     public static function getInstance()
41 41
     {
Please login to merge, or discard this patch.
src/Rank.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
      */
26 26
     public static function getInstance()
27 27
     {
28
-        if (! self::$instance) {
28
+        if (!self::$instance) {
29 29
             self::$instance = new self();
30 30
         }
31 31
 
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
      */
42 42
     public function execute($string)
43 43
     {
44
-        if (! is_string($string)) {
44
+        if (!is_string($string)) {
45 45
             throw new InvalidArgumentException('A string is expected as the argument. The argument is not a string.');
46 46
         }
47 47
         $array = preg_split("(\s)", preg_replace("([^\w\s\-\'])", '', strtolower($string)));
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
 
22 22
     /**
23 23
      * This method returns the only avaliable instance of Opeyemiabiodun\UrbanDictionary\Rank.
24
-     * @return Opeyemiabiodun\UrbanDictionary\Rank
24
+     * @return Rank
25 25
      */
26 26
     public static function getInstance()
27 27
     {
Please login to merge, or discard this patch.