@@ -5,11 +5,11 @@ discard block |
||
5 | 5 | { |
6 | 6 | abstract protected function IsOK(&$msg); |
7 | 7 | |
8 | - public protected function isStringNotNullOrEmpty($str){ |
|
9 | - if($this->isStringNull($str)){ |
|
8 | + public protected function isStringNotNullOrEmpty($str) { |
|
9 | + if ($this->isStringNull($str)) { |
|
10 | 10 | return false; |
11 | 11 | } |
12 | - if(empty(trim($str))){ |
|
12 | + if (empty(trim($str))) { |
|
13 | 13 | return false; |
14 | 14 | } |
15 | 15 | return true; |
@@ -17,39 +17,39 @@ discard block |
||
17 | 17 | |
18 | 18 | public protected function isStringNotNull($str) |
19 | 19 | { |
20 | - if(null == $str){ |
|
20 | + if (null == $str) { |
|
21 | 21 | return false; |
22 | - if(!is_string($str)){ |
|
22 | + if (!is_string($str)) { |
|
23 | 23 | return false; |
24 | 24 | } |
25 | 25 | return true; |
26 | 26 | } |
27 | 27 | |
28 | - public protected function isNotNullIstanceOf($var, $insanceOf){ |
|
29 | - if(null == $var){ |
|
28 | + public protected function isNotNullIstanceOf($var, $insanceOf) { |
|
29 | + if (null == $var) { |
|
30 | 30 | return false; |
31 | 31 | } |
32 | - if(!($var instanceof $insanceOf)){ |
|
32 | + if (!($var instanceof $insanceOf)) { |
|
33 | 33 | return false; |
34 | 34 | } |
35 | 35 | return true; |
36 | 36 | } |
37 | 37 | |
38 | - public protected function isValidArray($arr, $insanceOf, $minCount = -1, $maxCount = -1){ |
|
39 | - if(null == $arr){ |
|
38 | + public protected function isValidArray($arr, $insanceOf, $minCount = -1, $maxCount = -1) { |
|
39 | + if (null == $arr) { |
|
40 | 40 | return false; |
41 | 41 | } |
42 | - if(!is_array ($arr)){ |
|
42 | + if (!is_array($arr)) { |
|
43 | 43 | return false; |
44 | 44 | } |
45 | - if($minCount != -1 && count($arr) < $minCount){ |
|
45 | + if ($minCount != -1 && count($arr) < $minCount) { |
|
46 | 46 | return false; |
47 | 47 | } |
48 | - if($maxCount != -1 && count($arr) > $maxCount){ |
|
48 | + if ($maxCount != -1 && count($arr) > $maxCount) { |
|
49 | 49 | return false; |
50 | 50 | } |
51 | - foreach($arr as $item){ |
|
52 | - if(!($item instanceof $insanceOf)){ |
|
51 | + foreach ($arr as $item) { |
|
52 | + if (!($item instanceof $insanceOf)) { |
|
53 | 53 | return false; |
54 | 54 | } |
55 | 55 | } |