@@ -34,7 +34,7 @@ |
||
| 34 | 34 | |
| 35 | 35 | public function register(Container $app) |
| 36 | 36 | { |
| 37 | - $app['eccube.service.composer'] = function () use ($app) { |
|
| 37 | + $app['eccube.service.composer'] = function() use ($app) { |
|
| 38 | 38 | /**@var \Eccube\Service\SystemService $systemService */ |
| 39 | 39 | $systemService = $app['eccube.service.system']; |
| 40 | 40 | $composerMemory = $app['config']['composer_memory_limit']; |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | public function execRequire($packageName) |
| 64 | 64 | { |
| 65 | 65 | set_time_limit(0); |
| 66 | - if(false === $this->init()){ |
|
| 66 | + if (false === $this->init()) { |
|
| 67 | 67 | return false; |
| 68 | 68 | } |
| 69 | 69 | // Build command |
@@ -86,7 +86,7 @@ discard block |
||
| 86 | 86 | public function execRemove($packageName) |
| 87 | 87 | { |
| 88 | 88 | set_time_limit(0); |
| 89 | - if(false === $this->init()){ |
|
| 89 | + if (false === $this->init()) { |
|
| 90 | 90 | return false; |
| 91 | 91 | } |
| 92 | 92 | // Build command |
@@ -176,9 +176,9 @@ discard block |
||
| 176 | 176 | * Get grep memory_limit | Megabyte |
| 177 | 177 | * @return int|string |
| 178 | 178 | */ |
| 179 | - public function getCliMemoryLimit(){ |
|
| 179 | + public function getCliMemoryLimit() { |
|
| 180 | 180 | $grepMemory = exec($this->pathPHP.' -i | grep "memory_limit"'); |
| 181 | - if($grepMemory){ |
|
| 181 | + if ($grepMemory) { |
|
| 182 | 182 | $grepMemory = explode('=>', $grepMemory); |
| 183 | 183 | |
| 184 | 184 | // -1 unlimited |
@@ -47,6 +47,9 @@ |
||
| 47 | 47 | private $composerSetup; |
| 48 | 48 | private $pathPHP; |
| 49 | 49 | |
| 50 | + /** |
|
| 51 | + * @param string|false $pathPHP |
|
| 52 | + */ |
|
| 50 | 53 | public function __construct($appConfig, $entityManager, $pathPHP) |
| 51 | 54 | { |
| 52 | 55 | $this->appConfig = $appConfig; |