Completed
Pull Request — master (#39)
by Gusev
13:06
created
web/index.php 1 patch
Unused Use Statements   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@
 block discarded – undo
1 1
 <?php
2 2
 require dirname(dirname(__FILE__)).'/vendor/autoload.php';
3
-use morphos\Gender;
4
-use morphos\Russian\CardinalNumeralGenerator;
5
-use morphos\Russian\Cases;
6
-use morphos\Russian\NounDeclension;
7
-use morphos\Russian\GeographicalNamesInflection;
8
-use morphos\Russian\NounPluralization;
3
+use morphos\Gender;
4
+use morphos\Russian\CardinalNumeralGenerator;
5
+use morphos\Russian\Cases;
6
+use morphos\Russian\NounDeclension;
7
+use morphos\Russian\GeographicalNamesInflection;
8
+use morphos\Russian\NounPluralization;
9 9
 use morphos\Russian\OrdinalNumeralGenerator;
10 10
 
11 11
 function safe_string($string) {
Please login to merge, or discard this patch.
src/Russian/LastNamesInflection.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
 
16 16
     /**
17 17
      * @param $name
18
-     * @param null $gender
18
+     * @param string|null $gender
19 19
      * @return bool
20 20
      */
21 21
     public static function isMutable($name, $gender = null)
@@ -235,7 +235,7 @@  discard block
 block discarded – undo
235 235
 
236 236
     /**
237 237
      * @param $name
238
-     * @param $case
238
+     * @param string $case
239 239
      * @param null $gender
240 240
      * @return string
241 241
      * @throws \Exception
Please login to merge, or discard this patch.
src/Russian/MiddleNamesInflection.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@
 block discarded – undo
43 43
 
44 44
     /**
45 45
      * @param $name
46
-     * @param $case
46
+     * @param string $case
47 47
      * @param null $gender
48 48
      * @return mixed
49 49
      * @throws \Exception
Please login to merge, or discard this patch.
src/Russian/NounDeclension.php 1 patch
Doc Comments   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
 
178 178
     /**
179 179
      * Получение всех форм слова первого склонения.
180
-     * @param $word
180
+     * @param string|false $word
181 181
      * @return array
182 182
      */
183 183
     public static function declinateFirstDeclension($word)
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
 
219 219
     /**
220 220
      * Получение всех форм слова второго склонения.
221
-     * @param $word
221
+     * @param string|false $word
222 222
      * @param bool $animateness
223 223
      * @return array
224 224
      */
@@ -268,7 +268,7 @@  discard block
 block discarded – undo
268 268
 
269 269
     /**
270 270
      * Получение всех форм слова третьего склонения.
271
-     * @param $word
271
+     * @param string|false $word
272 272
      * @return array
273 273
      */
274 274
     public static function declinateThirdDeclension($word)
@@ -288,8 +288,8 @@  discard block
 block discarded – undo
288 288
     /**
289 289
      * Склонение существительных, образованных от прилагательных и причастий.
290 290
      * Rules are from http://rusgram.narod.ru/1216-1231.html
291
-     * @param $word
292
-     * @param $animateness
291
+     * @param string|false $word
292
+     * @param boolean $animateness
293 293
      * @return array
294 294
      */
295 295
     public static function declinateAdjective($word, $animateness)
@@ -363,7 +363,7 @@  discard block
 block discarded – undo
363 363
 
364 364
     /**
365 365
      * @param $word
366
-     * @param $last
366
+     * @param string|false $last
367 367
      * @return bool
368 368
      */
369 369
     public static function getPrefixOfSecondDeclension($word, $last)
@@ -398,9 +398,9 @@  discard block
 block discarded – undo
398 398
     }
399 399
 
400 400
     /**
401
-     * @param $word
402
-     * @param $last
403
-     * @param $prefix
401
+     * @param string|false $word
402
+     * @param string|false $last
403
+     * @param string|boolean $prefix
404 404
      * @return string
405 405
      */
406 406
     public static function getPredCaseOf12Declensions($word, $last, $prefix)
Please login to merge, or discard this patch.
src/Russian/NounPluralization.php 1 patch
Doc Comments   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
 
60 60
     /**
61 61
      * Склонение существительного для сочетания с числом (кол-вом предметов).
62
-     * @param int|string $count Количество предметов
62
+     * @param integer $count Количество предметов
63 63
      * @param string|int $word Название предмета
64 64
      * @param bool $animateness Признак одушевленности
65 65
      * @return string
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
     /**
129 129
      * @param $word
130 130
      * @param bool $animateness
131
-     * @return array
131
+     * @return string
132 132
      */
133 133
     public static function getCases($word, $animateness = false)
134 134
     {
@@ -156,8 +156,8 @@  discard block
 block discarded – undo
156 156
 
157 157
     /**
158 158
      * Склонение обычных существительных.
159
-     * @param $word
160
-     * @param $animateness
159
+     * @param string|false $word
160
+     * @param boolean $animateness
161 161
      * @return array
162 162
      */
163 163
     protected static function declinateSubstative($word, $animateness)
@@ -244,8 +244,8 @@  discard block
 block discarded – undo
244 244
     /**
245 245
      * Склонение существительных, образованных от прилагательных и причастий.
246 246
      * Rules are from http://rusgram.narod.ru/1216-1231.html
247
-     * @param $word
248
-     * @param $animateness
247
+     * @param string|false $word
248
+     * @param boolean $animateness
249 249
      * @return array
250 250
      */
251 251
     protected static function declinateAdjective($word, $animateness)
Please login to merge, or discard this patch.
src/S.php 1 patch
Doc Comments   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
     /**
10 10
      * Sets encoding for using in morphos/* functions.
11 11
      * @param string $encoding
12
-     * @return bool
12
+     * @return null|false
13 13
      */
14 14
     public static function setEncoding($encoding)
15 15
     {
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
      * @param string $string
46 46
      * @param int $start
47 47
      * @param int|null $end
48
-     * @return bool|string
48
+     * @return string|false
49 49
      */
50 50
     public static function slice($string, $start, $end = null)
51 51
     {
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
     /**
68 68
      * Lower case.
69 69
      * @param $string
70
-     * @return bool|string
70
+     * @return string|false
71 71
      */
72 72
     public static function lower($string)
73 73
     {
@@ -80,8 +80,8 @@  discard block
 block discarded – undo
80 80
 
81 81
     /**
82 82
      * Upper case.
83
-     * @param $string
84
-     * @return bool|string
83
+     * @param string|false $string
84
+     * @return string|false
85 85
      */
86 86
     public static function upper($string)
87 87
     {
@@ -94,8 +94,8 @@  discard block
 block discarded – undo
94 94
 
95 95
     /**
96 96
      * Name case. (ex: Thomas, Lewis)
97
-     * @param $string
98
-     * @return bool|string
97
+     * @param string|false $string
98
+     * @return string|false
99 99
      */
100 100
     public static function name($string)
101 101
     {
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
     /**
127 127
      * @param string $string
128 128
      * @param string $char
129
-     * @return bool|string
129
+     * @return integer
130 130
      */
131 131
     public static function findFirstPosition($string, $char)
132 132
     {
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
     /**
141 141
      * @param string $string
142 142
      * @param string $char
143
-     * @return bool|string
143
+     * @return integer
144 144
      */
145 145
     public static function findLastPosition($string, $char)
146 146
     {
@@ -152,9 +152,9 @@  discard block
 block discarded – undo
152 152
     }
153 153
 
154 154
     /**
155
-     * @param $string
155
+     * @param string|false $string
156 156
      * @param array $chars
157
-     * @return bool|string
157
+     * @return string|false
158 158
      */
159 159
     public static function findLastPositionForOneOfChars($string, array $chars)
160 160
     {
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
 
179 179
     /**
180 180
      * @param $string
181
-     * @param $substring
181
+     * @param string $substring
182 182
      * @param bool $caseSensetive
183 183
      * @param int $startOffset
184 184
      * @return string|false
Please login to merge, or discard this patch.
src/Russian/RussianLanguage.php 1 patch
Doc Comments   +10 added lines, -9 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
 
73 73
     /**
74 74
      * Проверка гласной
75
-     * @param $char
75
+     * @param string|false $char
76 76
      * @return bool
77 77
      */
78 78
     public static function isVowel($char)
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
 
83 83
     /**
84 84
      * Проверка согласной
85
-     * @param $char
85
+     * @param string|false $char
86 86
      * @return bool
87 87
      */
88 88
     public static function isConsonant($char)
@@ -92,6 +92,7 @@  discard block
 block discarded – undo
92 92
 
93 93
     /**
94 94
      * Проверка звонкости согласной
95
+     * @param string|false $char
95 96
      */
96 97
     public static function isSonorousConsonant($char)
97 98
     {
@@ -100,7 +101,7 @@  discard block
 block discarded – undo
100 101
 
101 102
     /**
102 103
      * Проверка глухости согласной
103
-     * @param $char
104
+     * @param string|false $char
104 105
      * @return bool
105 106
      */
106 107
     public static function isDeafConsonant($char)
@@ -120,7 +121,7 @@  discard block
 block discarded – undo
120 121
 
121 122
     /**
122 123
      * Проверка на велярность согласной
123
-     * @param string[1] $consonant
124
+     * @param string|false $consonant
124 125
      * @return bool
125 126
      */
126 127
     protected static function isVelarConsonant($consonant)
@@ -169,7 +170,7 @@  discard block
 block discarded – undo
169 170
 
170 171
     /**
171 172
      * Проверяет, что гласная образует два звука в словах
172
-     * @param $vowel
173
+     * @param string|false $vowel
173 174
      * @return bool
174 175
      */
175 176
     public static function isBinaryVowel($vowel)
@@ -192,10 +193,10 @@  discard block
 block discarded – undo
192 193
     /**
193 194
      * Выбор окончания в зависимости от мягкости
194 195
      *
195
-     * @param $last
196
-     * @param $softLast
197
-     * @param $afterSoft
198
-     * @param $afterHard
196
+     * @param string|false $last
197
+     * @param boolean $softLast
198
+     * @param string $afterSoft
199
+     * @param string $afterHard
199 200
      *
200 201
      * @return mixed
201 202
      */
Please login to merge, or discard this patch.