| Conditions | 3 |
| Paths | 3 |
| Total Lines | 12 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 17 | protected function IsValid($TNamespaceName) |
||
| 18 | { |
||
| 19 | if (!$this->isNCName($TNamespaceName)) { |
||
| 20 | $msg = "Term Namespace Must be a valid NCName"; |
||
|
|
|||
| 21 | return false; |
||
| 22 | } |
||
| 23 | //<!-- one or more SimpleIdentifiers separated by dots --> |
||
| 24 | if (!$this->MatchesRegexPattern("[\p{L}\p{Nl}_][\p{L}\p{Nl}\p{Nd}\p{Mn}\p{Mc}\p{Pc}\p{Cf}]{0,}(\.[\p{L}\p{Nl}_][\p{L}\p{Nl}\p{Nd}\p{Mn}\p{Mc}\p{Pc}\p{Cf}]{0,}){0,}", $TNamespaceName)) { |
||
| 25 | $msg = "the term namespace dose not match the regex in the xsd."; |
||
| 26 | return false; |
||
| 27 | } |
||
| 28 | } |
||
| 29 | } |
This check looks for variable assignements that are either overwritten by other assignments or where the variable is not used subsequently.
Both the
$myVarassignment in line 1 and the$higherassignment in line 2 are dead. The first because$myVaris never used and the second because$higheris always overwritten for every possible time line.