| Conditions | 1 |
| Paths | 1 |
| Total Lines | 55 |
| Code Lines | 50 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
Small methods make your code easier to understand, in particular if combined with a good name. Besides, if your method is small, finding a good name is usually much easier.
For example, if you find yourself adding comments to a method's body, this is usually a good sign to extract the commented part to a new method, and use the comment as a starting point when coming up with a good name for this new method.
Commonly applied refactorings include:
If many parameters/temporary variables are present:
| 1 | <?php |
||
| 23 | public function __construct($xmlPath) |
||
| 24 | { |
||
| 25 | $this->xmlPath = $xmlPath; |
||
| 26 | |||
| 27 | // Hard-coded, until there is a way to read this |
||
| 28 | $this->multivalues = [ |
||
| 29 | "eppn" => false, |
||
| 30 | "affiliation" => true, |
||
| 31 | "unscoped-affiliation" => true, |
||
| 32 | "entitlement" => false, |
||
| 33 | "targeted-id" => false, |
||
| 34 | "persistent-id" => false, |
||
| 35 | "primary-affiliation" => false, |
||
| 36 | "nickname" => false, |
||
| 37 | "primary-orgunit-dn" => false, |
||
| 38 | "orgunit-dn" => true, |
||
| 39 | "org-dn" => false, |
||
| 40 | "cn" => false, |
||
| 41 | "sn" => false, |
||
| 42 | "givenName" => false, |
||
| 43 | "mail" => false, |
||
| 44 | "uid" => false, |
||
| 45 | "telephoneNumber" => true, |
||
| 46 | "title" => false, |
||
| 47 | "description" => false, |
||
| 48 | "facsimileTelephoneNumber" => true, |
||
| 49 | "postalAddress" => true, |
||
| 50 | "ou" => true, |
||
| 51 | "roomNumber" => true, |
||
| 52 | "KULluditServer" => false, |
||
| 53 | "KULprimouNumber" => true, |
||
| 54 | "KULouNumber" => true, |
||
| 55 | "KULtap" => false, |
||
| 56 | "KULemployeeType" => true, |
||
| 57 | "KULdipl" => true, |
||
| 58 | "KULopl" => true, |
||
| 59 | "KULstamnr" => false, |
||
| 60 | "KULid" => false, |
||
| 61 | "KULlibisnr" => false, |
||
| 62 | "KULstudentType" => true, |
||
| 63 | "KULcampus" => false, |
||
| 64 | "userAppUserID" => false, |
||
| 65 | "syncoreLogonCode" => false, |
||
| 66 | "KULMoreUnifiedUID" => false, |
||
| 67 | "KULCardApplicationId" => true, |
||
| 68 | "KULCardSN" => true, |
||
| 69 | "KULPreferredMail" => false, |
||
| 70 | "KULMainLocation" => true, |
||
| 71 | "KULAssocUCCtag" => true, |
||
| 72 | "KULOfficialGivenName" => false, |
||
| 73 | "logoutURL" => false, |
||
| 74 | "uidToledo" => false, |
||
| 75 | "aid" => false, |
||
| 76 | ]; |
||
| 77 | } |
||
| 78 | |||
| 124 |