Skip to content

Commit b0ca358

Browse files
committed
Merge branch '1.2'
2 parents 41c7727 + 607d468 commit b0ca358

File tree

3 files changed

+10
-8
lines changed

3 files changed

+10
-8
lines changed

DeployApplication.php

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ class DeployApplication
5555
* @param string $workPath set working path for executing all commands
5656
* @param string $logFileName path to a log file
5757
*/
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')
5959
{
6060
$this->securityKey = $securityKey;
6161
$this->logFileName = getcwd() . '/' . $logFileName;
@@ -124,7 +124,7 @@ public function end()
124124
* Returning an absolute path to "php". It is useful, cause just "php" not working!
125125
* @return string
126126
*/
127-
public function php(): string
127+
public function php()
128128
{
129129
if (defined('PHP_BINDIR') && PHP_BINDIR) {
130130
return PHP_BINDIR . '/php';
@@ -138,7 +138,7 @@ public function php(): string
138138
return 'php';
139139
}
140140

141-
private function checkSecurity(): bool
141+
private function checkSecurity()
142142
{
143143
if ($this->hasAccess === null) {
144144
$this->hasAccess = false;
@@ -148,7 +148,9 @@ private function checkSecurity(): bool
148148
$this->hasAccess = true;
149149
} else {
150150
$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'] : '')
152154
);
153155
}
154156
}
@@ -177,7 +179,7 @@ private function exec(array $commands)
177179
}
178180
}
179181

180-
private function logDated(string $message)
182+
private function logDated($message)
181183
{
182184
if ($this->isFirstLogging) {
183185
$this->log("\n==============================\n");
@@ -187,7 +189,7 @@ private function logDated(string $message)
187189
$this->log(date('Y.m.d H:i:s') . "\t" . $message . "\n");
188190
}
189191

190-
private function log(string $message)
192+
private function log($message)
191193
{
192194
if (empty($this->logFileName)) {
193195
return;

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ It does auto deploy your site to hosting
55

66
# Requirements
77

8-
1. PHP 7 server
8+
1. PHP 5.4 or higher
99
2. Access to perform **shell** commands
1010
3. Installed **GIT** on target hosting
1111

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,6 @@
3030
}
3131
},
3232
"require": {
33-
"php": "^7.0"
33+
"php": "^5.4"
3434
}
3535
}

0 commit comments

Comments
 (0)