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