aboutsummaryrefslogtreecommitdiffstats
path: root/core/Command/Integrity
diff options
context:
space:
mode:
Diffstat (limited to 'core/Command/Integrity')
-rw-r--r--core/Command/Integrity/CheckApp.php3
-rw-r--r--core/Command/Integrity/CheckCore.php2
-rw-r--r--core/Command/Integrity/SignApp.php8
-rw-r--r--core/Command/Integrity/SignCore.php8
4 files changed, 10 insertions, 11 deletions
diff --git a/core/Command/Integrity/CheckApp.php b/core/Command/Integrity/CheckApp.php
index d62c13deffb..affe137c67d 100644
--- a/core/Command/Integrity/CheckApp.php
+++ b/core/Command/Integrity/CheckApp.php
@@ -70,9 +70,8 @@ class CheckApp extends Base {
$path = (string)$input->getOption('path');
$result = $this->checker->verifyAppSignature($appid, $path);
$this->writeArrayInOutputFormat($input, $output, $result);
- if (count($result)>0){
+ if (count($result)>0) {
return 1;
}
}
-
}
diff --git a/core/Command/Integrity/CheckCore.php b/core/Command/Integrity/CheckCore.php
index bebfbea560e..665e0079b44 100644
--- a/core/Command/Integrity/CheckCore.php
+++ b/core/Command/Integrity/CheckCore.php
@@ -61,7 +61,7 @@ class CheckCore extends Base {
protected function execute(InputInterface $input, OutputInterface $output) {
$result = $this->checker->verifyCoreSignature();
$this->writeArrayInOutputFormat($input, $output, $result);
- if (count($result)>0){
+ if (count($result)>0) {
return 1;
}
}
diff --git a/core/Command/Integrity/SignApp.php b/core/Command/Integrity/SignApp.php
index 6e750d4af10..7657c2975af 100644
--- a/core/Command/Integrity/SignApp.php
+++ b/core/Command/Integrity/SignApp.php
@@ -76,7 +76,7 @@ class SignApp extends Command {
$path = $input->getOption('path');
$privateKeyPath = $input->getOption('privateKey');
$keyBundlePath = $input->getOption('certificate');
- if(is_null($path) || is_null($privateKeyPath) || is_null($keyBundlePath)) {
+ if (is_null($path) || is_null($privateKeyPath) || is_null($keyBundlePath)) {
$documentationUrl = $this->urlGenerator->linkToDocs('developer-code-integrity');
$output->writeln('This command requires the --path, --privateKey and --certificate.');
$output->writeln('Example: ./occ integrity:sign-app --path="/Users/lukasreschke/Programming/myapp/" --privateKey="/Users/lukasreschke/private/myapp.key" --certificate="/Users/lukasreschke/public/mycert.crt"');
@@ -87,12 +87,12 @@ class SignApp extends Command {
$privateKey = $this->fileAccessHelper->file_get_contents($privateKeyPath);
$keyBundle = $this->fileAccessHelper->file_get_contents($keyBundlePath);
- if($privateKey === false) {
+ if ($privateKey === false) {
$output->writeln(sprintf('Private key "%s" does not exists.', $privateKeyPath));
return null;
}
- if($keyBundle === false) {
+ if ($keyBundle === false) {
$output->writeln(sprintf('Certificate "%s" does not exists.', $keyBundlePath));
return null;
}
@@ -105,7 +105,7 @@ class SignApp extends Command {
try {
$this->checker->writeAppSignature($path, $x509, $rsa);
$output->writeln('Successfully signed "'.$path.'"');
- } catch (\Exception $e){
+ } catch (\Exception $e) {
$output->writeln('Error: ' . $e->getMessage());
return 1;
}
diff --git a/core/Command/Integrity/SignCore.php b/core/Command/Integrity/SignCore.php
index b825a942d80..7f871b08298 100644
--- a/core/Command/Integrity/SignCore.php
+++ b/core/Command/Integrity/SignCore.php
@@ -70,7 +70,7 @@ class SignCore extends Command {
$privateKeyPath = $input->getOption('privateKey');
$keyBundlePath = $input->getOption('certificate');
$path = $input->getOption('path');
- if(is_null($privateKeyPath) || is_null($keyBundlePath) || is_null($path)) {
+ if (is_null($privateKeyPath) || is_null($keyBundlePath) || is_null($path)) {
$output->writeln('--privateKey, --certificate and --path are required.');
return null;
}
@@ -78,12 +78,12 @@ class SignCore extends Command {
$privateKey = $this->fileAccessHelper->file_get_contents($privateKeyPath);
$keyBundle = $this->fileAccessHelper->file_get_contents($keyBundlePath);
- if($privateKey === false) {
+ if ($privateKey === false) {
$output->writeln(sprintf('Private key "%s" does not exists.', $privateKeyPath));
return null;
}
- if($keyBundle === false) {
+ if ($keyBundle === false) {
$output->writeln(sprintf('Certificate "%s" does not exists.', $keyBundlePath));
return null;
}
@@ -97,7 +97,7 @@ class SignCore extends Command {
try {
$this->checker->writeCoreSignature($x509, $rsa, $path);
$output->writeln('Successfully signed "core"');
- } catch (\Exception $e){
+ } catch (\Exception $e) {
$output->writeln('Error: ' . $e->getMessage());
return 1;
}