@@ -50,23 +50,23 @@ |
||
50 | 50 | public function expireCredentials() { |
51 | 51 | $this->logger->info('Passman cron test', array('app' => 'passman')); |
52 | 52 | $expired_credentials = $this->credentialService->getExpiredCredentials($this->utils->getTime()); |
53 | - foreach($expired_credentials as $credential){ |
|
53 | + foreach ($expired_credentials as $credential) { |
|
54 | 54 | $link = ''; // @TODO create direct link to credential |
55 | 55 | |
56 | 56 | $sql = 'SELECT count(*) as rows from `*PREFIX*notifications` WHERE `subject`= \'credential_expired\' AND object_id=?'; |
57 | 57 | $id = $credential->getId(); |
58 | 58 | $result = $this->db->executeQuery($sql, array($id)); |
59 | - $this->logger->debug($credential->getLabel() .' is expired, checking notifications!', array('app' => 'passman')); |
|
59 | + $this->logger->debug($credential->getLabel() . ' is expired, checking notifications!', array('app' => 'passman')); |
|
60 | 60 | $notifications = intval($result->fetch()['rows']); |
61 | - if($notifications === 0) { |
|
62 | - $this->logger->debug($credential->getLabel() .' is expired, adding notification!', array('app' => 'passman')); |
|
61 | + if ($notifications === 0) { |
|
62 | + $this->logger->debug($credential->getLabel() . ' is expired, adding notification!', array('app' => 'passman')); |
|
63 | 63 | $this->activityService->add( |
64 | 64 | Activity::SUBJECT_ITEM_EXPIRED, array($credential->getLabel(), $credential->getUserId()), |
65 | 65 | '', array(), |
66 | 66 | $link, $credential->getUserId(), Activity::TYPE_ITEM_EXPIRED); |
67 | 67 | $this->notificationService->credentialExpiredNotification($credential); |
68 | 68 | } else { |
69 | - $this->logger->debug($credential->getLabel() .' is expired, already notified!', array('app' => 'passman')); |
|
69 | + $this->logger->debug($credential->getLabel() . ' is expired, already notified!', array('app' => 'passman')); |
|
70 | 70 | } |
71 | 71 | |
72 | 72 | } |
@@ -48,10 +48,10 @@ |
||
48 | 48 | * @param $type string |
49 | 49 | * @return array |
50 | 50 | */ |
51 | - public function add($subject,$subjectParams=array(), |
|
52 | - $message='',$messageParams=array(), |
|
53 | - $link='',$user=null,$type='') { |
|
54 | - if($user) { |
|
51 | + public function add($subject, $subjectParams = array(), |
|
52 | + $message = '', $messageParams = array(), |
|
53 | + $link = '', $user = null, $type = '') { |
|
54 | + if ($user) { |
|
55 | 55 | $activity = $this->manager->generateEvent(); |
56 | 56 | $activity->setType($type); |
57 | 57 | $activity->setApp('passman'); |
@@ -163,13 +163,13 @@ |
||
163 | 163 | $activity . '_self', array($label, $this->userId, $revision_created), |
164 | 164 | '', array(), |
165 | 165 | $link, $this->userId, Activity::TYPE_ITEM_ACTION); |
166 | - } else if (($storedCredential->getDeleteTime() === 0) && (int)$delete_time > 0) { |
|
166 | + } else if (($storedCredential->getDeleteTime() === 0) && (int) $delete_time > 0) { |
|
167 | 167 | $activity = 'item_deleted'; |
168 | 168 | $this->activityService->add( |
169 | 169 | $activity . '_self', array($label, $this->userId), |
170 | 170 | '', array(), |
171 | 171 | $link, $this->userId, Activity::TYPE_ITEM_ACTION); |
172 | - } else if (($storedCredential->getDeleteTime() > 0) && (int)$delete_time === 0) { |
|
172 | + } else if (($storedCredential->getDeleteTime() > 0) && (int) $delete_time === 0) { |
|
173 | 173 | $activity = 'item_recovered'; |
174 | 174 | $this->activityService->add( |
175 | 175 | $activity . '_self', array($label, $this->userId), |
@@ -30,7 +30,7 @@ |
||
30 | 30 | <h2><?php p($l->t('Passman Settings')); ?></h2> |
31 | 31 | <?php |
32 | 32 | if ($checkVersion) { |
33 | - p($l->t('Github version:'). ' '. $githubVersion); |
|
33 | + p($l->t('Github version:') . ' ' . $githubVersion); |
|
34 | 34 | print '<br />'; |
35 | 35 | } ?> |
36 | 36 | Local version: <?php p($localVersion); ?><br/> |