@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | public function __construct($AppName, |
| 24 | 24 | IRequest $request, |
| 25 | 25 | $UserId, |
| 26 | - FileService $fileService){ |
|
| 26 | + FileService $fileService) { |
|
| 27 | 27 | parent::__construct( |
| 28 | 28 | $AppName, |
| 29 | 29 | $request, |
@@ -65,20 +65,20 @@ discard block |
||
| 65 | 65 | return new JSONResponse($this->fileService->deleteFile($file_id, $this->userId)); |
| 66 | 66 | } |
| 67 | 67 | |
| 68 | - public function updateFile($file_id, $file_data, $filename){ |
|
| 69 | - try{ |
|
| 68 | + public function updateFile($file_id, $file_data, $filename) { |
|
| 69 | + try { |
|
| 70 | 70 | $file = $this->fileService->getFile($file_id, $this->userId); |
| 71 | - } catch (\Exception $doesNotExistException){ |
|
| 71 | + } catch (\Exception $doesNotExistException) { |
|
| 72 | 72 | |
| 73 | 73 | } |
| 74 | - if($file){ |
|
| 75 | - if($file_data) { |
|
| 74 | + if ($file) { |
|
| 75 | + if ($file_data) { |
|
| 76 | 76 | $file->setFileData($file_data); |
| 77 | 77 | } |
| 78 | - if($filename) { |
|
| 78 | + if ($filename) { |
|
| 79 | 79 | $file->setFilename($filename); |
| 80 | 80 | } |
| 81 | - if($filename || $file_data){ |
|
| 81 | + if ($filename || $file_data) { |
|
| 82 | 82 | new JSONResponse($this->fileService->updateFile($file)); |
| 83 | 83 | } |
| 84 | 84 | } |
@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | |
| 22 | 22 | private $userId; |
| 23 | 23 | |
| 24 | - public function __construct($AppName, IRequest $request, $UserId){ |
|
| 24 | + public function __construct($AppName, IRequest $request, $UserId) { |
|
| 25 | 25 | parent::__construct($AppName, $request); |
| 26 | 26 | $this->userId = $UserId; |
| 27 | 27 | } |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | */ |
| 39 | 39 | public function index() { |
| 40 | 40 | $params = ['user' => $this->userId]; |
| 41 | - return new TemplateResponse('passman', 'main', $params); // templates/main.php |
|
| 41 | + return new TemplateResponse('passman', 'main', $params); // templates/main.php |
|
| 42 | 42 | } |
| 43 | 43 | |
| 44 | 44 | |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | * @NoAdminRequired |
| 47 | 47 | * @NoCSRFRequired |
| 48 | 48 | */ |
| 49 | - public function bookmarklet($url='',$title='') { |
|
| 49 | + public function bookmarklet($url = '', $title = '') { |
|
| 50 | 50 | $params = array('url' => $url, 'title' => $title); |
| 51 | 51 | return new TemplateResponse('passman', 'bookmarklet', $params); |
| 52 | 52 | } |
@@ -174,13 +174,13 @@ discard block |
||
| 174 | 174 | $activity . '_self', array($label, $this->userId, $revision_created), |
| 175 | 175 | '', array(), |
| 176 | 176 | $link, $this->userId, Activity::TYPE_ITEM_ACTION); |
| 177 | - } else if (($storedCredential->getDeleteTime() === 0) && (int)$delete_time > 0) { |
|
| 177 | + } else if (($storedCredential->getDeleteTime() === 0) && (int) $delete_time > 0) { |
|
| 178 | 178 | $activity = 'item_deleted'; |
| 179 | 179 | $this->activityService->add( |
| 180 | 180 | $activity . '_self', array($label, $this->userId), |
| 181 | 181 | '', array(), |
| 182 | 182 | $link, $this->userId, Activity::TYPE_ITEM_ACTION); |
| 183 | - } else if (($storedCredential->getDeleteTime() > 0) && (int)$delete_time === 0) { |
|
| 183 | + } else if (($storedCredential->getDeleteTime() > 0) && (int) $delete_time === 0) { |
|
| 184 | 184 | $activity = 'item_recovered'; |
| 185 | 185 | $this->activityService->add( |
| 186 | 186 | $activity . '_self', array($label, $this->userId), |
@@ -293,7 +293,7 @@ discard block |
||
| 293 | 293 | $this->sharingService->unshareCredential($credential->getGuid()); |
| 294 | 294 | foreach ($this->credentialRevisionService->getRevisions($credential->getId()) as $revision) { |
| 295 | 295 | $id = $revision->getId(); |
| 296 | - if(isset($id)){ |
|
| 296 | + if (isset($id)) { |
|
| 297 | 297 | $this->credentialRevisionService->deleteRevision($id, $this->userId); |
| 298 | 298 | } |
| 299 | 299 | } |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | |
| 56 | 56 | protected $URLGenerator; |
| 57 | 57 | |
| 58 | - public function __construct( IURLGenerator $URLGenerator) { |
|
| 58 | + public function __construct(IURLGenerator $URLGenerator) { |
|
| 59 | 59 | $this->URLGenerator = $URLGenerator; |
| 60 | 60 | } |
| 61 | 61 | |
@@ -261,7 +261,7 @@ discard block |
||
| 261 | 261 | $l = \OC::$server->getL10N(self::APP_NAME); |
| 262 | 262 | return array( |
| 263 | 263 | 'top' => array(), |
| 264 | - 'apps' => array( self::FILTER_PASSMAN => |
|
| 264 | + 'apps' => array(self::FILTER_PASSMAN => |
|
| 265 | 265 | array( |
| 266 | 266 | 'id' => 'passman', |
| 267 | 267 | 'name' => (string) $l->t('Passwords'), |
@@ -278,7 +278,7 @@ discard block |
||
| 278 | 278 | * @return boolean |
| 279 | 279 | */ |
| 280 | 280 | public function isFilterValid($filterValue) { |
| 281 | - return $filterValue === self::FILTER_PASSMAN; |
|
| 281 | + return $filterValue === self::FILTER_PASSMAN; |
|
| 282 | 282 | } |
| 283 | 283 | |
| 284 | 284 | /** |
@@ -27,7 +27,7 @@ |
||
| 27 | 27 | $data = @simplexml_load_string($xml); |
| 28 | 28 | libxml_disable_entity_loader($loadEntities); |
| 29 | 29 | if ($data !== false) { |
| 30 | - $version = (string)$data->version; |
|
| 30 | + $version = (string) $data->version; |
|
| 31 | 31 | } else { |
| 32 | 32 | libxml_clear_errors(); |
| 33 | 33 | } |