@@ -55,7 +55,7 @@ class DeployApplication
55
55
* @param string $workPath set working path for executing all commands
56
56
* @param string $logFileName path to a log file
57
57
*/
58
- public function __construct (string $ securityKey , string $ workPath = '. ' , string $ logFileName = 'git-deploy-log.txt ' )
58
+ public function __construct ($ securityKey , $ workPath = '. ' , $ logFileName = 'git-deploy-log.txt ' )
59
59
{
60
60
$ this ->securityKey = $ securityKey ;
61
61
$ this ->logFileName = getcwd () . '/ ' . $ logFileName ;
@@ -124,7 +124,7 @@ public function end()
124
124
* Returning an absolute path to "php". It is useful, cause just "php" not working!
125
125
* @return string
126
126
*/
127
- public function php (): string
127
+ public function php ()
128
128
{
129
129
if (defined ('PHP_BINDIR ' ) && PHP_BINDIR ) {
130
130
return PHP_BINDIR . '/php ' ;
@@ -138,7 +138,7 @@ public function php(): string
138
138
return 'php ' ;
139
139
}
140
140
141
- private function checkSecurity (): bool
141
+ private function checkSecurity ()
142
142
{
143
143
if ($ this ->hasAccess === null ) {
144
144
$ this ->hasAccess = false ;
@@ -148,7 +148,9 @@ private function checkSecurity(): bool
148
148
$ this ->hasAccess = true ;
149
149
} else {
150
150
$ this ->logDated (
151
- 'DENY << :// ' . ($ _SERVER ['HTTP_HOST ' ] ?? 'unknown-domain ' ) . ($ _SERVER ['REQUEST_URI ' ] ?? '' )
151
+ 'DENY << :// '
152
+ . (isset ($ _SERVER ['HTTP_HOST ' ]) ? $ _SERVER ['HTTP_HOST ' ] : 'unknown-domain ' )
153
+ . (isset ($ _SERVER ['REQUEST_URI ' ]) ? $ _SERVER ['REQUEST_URI ' ] : '' )
152
154
);
153
155
}
154
156
}
@@ -177,7 +179,7 @@ private function exec(array $commands)
177
179
}
178
180
}
179
181
180
- private function logDated (string $ message )
182
+ private function logDated ($ message )
181
183
{
182
184
if ($ this ->isFirstLogging ) {
183
185
$ this ->log ("\n============================== \n" );
@@ -187,7 +189,7 @@ private function logDated(string $message)
187
189
$ this ->log (date ('Y.m.d H:i:s ' ) . "\t" . $ message . "\n" );
188
190
}
189
191
190
- private function log (string $ message )
192
+ private function log ($ message )
191
193
{
192
194
if (empty ($ this ->logFileName )) {
193
195
return ;
0 commit comments