@@ -77,7 +77,7 @@ |
||
| 77 | 77 | |
| 78 | 78 | // Existing named checks can be disabled by setting their 'state' to 'disabled'. |
| 79 | 79 | // This is handy for disabling checks mandated by modules. |
| 80 | - if (!empty($check['state']) && $check['state']==='disabled') { |
|
| 80 | + if (!empty($check['state']) && $check['state'] === 'disabled') { |
|
| 81 | 81 | continue; |
| 82 | 82 | } |
| 83 | 83 | |
@@ -257,7 +257,7 @@ |
||
| 257 | 257 | public static function set_to_email_address($to) |
| 258 | 258 | { |
| 259 | 259 | Deprecation::notice('2.0', 'Use config API instead'); |
| 260 | - Config::inst()->update('EnvironmentChecker', 'to_email_address', $to); |
|
| 260 | + Config::inst()->update('EnvironmentChecker', 'to_email_address', $to); |
|
| 261 | 261 | } |
| 262 | 262 | |
| 263 | 263 | /** |
@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | public function __construct($path, $fileTypeValidateFunc = 'noVidation', $checkType = null) |
| 61 | 61 | { |
| 62 | 62 | $this->path = $path; |
| 63 | - $this->fileTypeValidateFunc = ($fileTypeValidateFunc)? $fileTypeValidateFunc:'noVidation'; |
|
| 63 | + $this->fileTypeValidateFunc = ($fileTypeValidateFunc) ? $fileTypeValidateFunc : 'noVidation'; |
|
| 64 | 64 | $this->checkType = ($checkType) ? $checkType : self::CHECK_SINGLE; |
| 65 | 65 | } |
| 66 | 66 | |
@@ -93,7 +93,7 @@ discard block |
||
| 93 | 93 | if ($this->checkType == self::CHECK_SINGLE && count($invalidFiles) < count($files)) { |
| 94 | 94 | $validFileList = "\n"; |
| 95 | 95 | foreach ($validFiles as $vf) { |
| 96 | - $validFileList .= $vf."\n"; |
|
| 96 | + $validFileList .= $vf . "\n"; |
|
| 97 | 97 | } |
| 98 | 98 | if ($fileTypeValidateFunc == 'noVidation') { |
| 99 | 99 | $checkReturn = array( |
@@ -112,7 +112,7 @@ discard block |
||
| 112 | 112 | } else { |
| 113 | 113 | $invalidFileList = "\n"; |
| 114 | 114 | foreach ($invalidFiles as $vf) { |
| 115 | - $invalidFileList .= $vf."\n"; |
|
| 115 | + $invalidFileList .= $vf . "\n"; |
|
| 116 | 116 | } |
| 117 | 117 | |
| 118 | 118 | if ($fileTypeValidateFunc == 'noVidation') { |
@@ -129,7 +129,7 @@ discard block |
||
| 129 | 129 | } |
| 130 | 130 | } |
| 131 | 131 | } else { |
| 132 | - $checkReturn = array( |
|
| 132 | + $checkReturn = array( |
|
| 133 | 133 | EnvironmentCheck::ERROR, |
| 134 | 134 | sprintf("Invalid file type validation method name passed: %s ", $fileTypeValidateFunc) |
| 135 | 135 | ); |
@@ -89,7 +89,7 @@ |
||
| 89 | 89 | */ |
| 90 | 90 | public function check() |
| 91 | 91 | { |
| 92 | - $cutoffTime = strtotime($this->relativeAge, SS_Datetime::now()->Format('U')); |
|
| 92 | + $cutoffTime = strtotime($this->relativeAge, SS_Datetime::now()->Format('U')); |
|
| 93 | 93 | $files = $this->getFiles(); |
| 94 | 94 | $invalidFiles = array(); |
| 95 | 95 | $validFiles = array(); |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | } |
| 60 | 60 | } |
| 61 | 61 | if ($groupList) { |
| 62 | - $message .= " We recommend that you make the file group-writeable and change the group to one of these groups:\n - ". implode("\n - ", $groupList) |
|
| 62 | + $message .= " We recommend that you make the file group-writeable and change the group to one of these groups:\n - " . implode("\n - ", $groupList) |
|
| 63 | 63 | . "\n\nFor example:\nchmod g+w $filename\nchgrp " . $groupList[0] . " $filename"; |
| 64 | 64 | } else { |
| 65 | 65 | $message .= " There is no user-group that contains both the web-server user and the owner of this file. Change the ownership of the file, create a new group, or temporarily make the file writeable by everyone during the install process."; |
@@ -72,6 +72,6 @@ discard block |
||
| 72 | 72 | return array(EnvironmentCheck::ERROR, $message); |
| 73 | 73 | } |
| 74 | 74 | |
| 75 | - return array(EnvironmentCheck::OK,''); |
|
| 75 | + return array(EnvironmentCheck::OK, ''); |
|
| 76 | 76 | } |
| 77 | 77 | } |
@@ -26,9 +26,9 @@ |
||
| 26 | 26 | public function check() |
| 27 | 27 | { |
| 28 | 28 | if (class_exists($this->className)) { |
| 29 | - return array(EnvironmentCheck::OK, 'Class ' . $this->className.' exists'); |
|
| 29 | + return array(EnvironmentCheck::OK, 'Class ' . $this->className . ' exists'); |
|
| 30 | 30 | } else { |
| 31 | - return array(EnvironmentCheck::ERROR, 'Class ' . $this->className.' doesn\'t exist'); |
|
| 31 | + return array(EnvironmentCheck::ERROR, 'Class ' . $this->className . ' doesn\'t exist'); |
|
| 32 | 32 | } |
| 33 | 33 | } |
| 34 | 34 | } |
@@ -26,9 +26,9 @@ |
||
| 26 | 26 | public function check() |
| 27 | 27 | { |
| 28 | 28 | if (function_exists($this->functionName)) { |
| 29 | - return array(EnvironmentCheck::OK, $this->functionName.'() exists'); |
|
| 29 | + return array(EnvironmentCheck::OK, $this->functionName . '() exists'); |
|
| 30 | 30 | } else { |
| 31 | - return array(EnvironmentCheck::ERROR, $this->functionName.'() doesn\'t exist'); |
|
| 31 | + return array(EnvironmentCheck::ERROR, $this->functionName . '() doesn\'t exist'); |
|
| 32 | 32 | } |
| 33 | 33 | } |
| 34 | 34 | } |