for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* Copyright (c) Arnaud Ligny <[email protected]>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Cecil\Step;
use Cecil\Util;
/**
* Copy cached files.
class CacheCopy extends StaticCopy
{
protected $count = 0;
* {@inheritdoc}
public function init($options)
$cacheDir = $this->config->getDestinationDir().'/'.$this->config->get('cache.dir');
$this->config->get('cache.dir')
array|mixed|null
concatenation
If this is a false-positive, you can also ignore this issue in your code via the ignore-type annotation
ignore-type
$cacheDir = $this->config->getDestinationDir().'/'./** @scrutinizer ignore-type */ $this->config->get('cache.dir');
if ($this->config->get('cache.external')) {
$cacheDir = $this->config->get('cache.dir');
}
if (Util::getFS()->exists($cacheDir)) {
$this->process = true;
public function process()
call_user_func_array($this->builder->getMessageCb(), ['COPY', 'Copying cache']);
$cacheDirImages = $this->config->getDestinationDir().'/'
.$this->config->get('cache.dir').'/'.$this->config->get('cache.images.dir');
./** @scrutinizer ignore-type */ $this->config->get('cache.dir').'/'.$this->config->get('cache.images.dir');
$this->config->get('cache.images.dir')
.$this->config->get('cache.dir').'/'./** @scrutinizer ignore-type */ $this->config->get('cache.images.dir');
$cacheDirImages = $this->config->get('cache.dir').'/'.$this->config->get('cache.images.dir');
if ($this->copy($cacheDirImages, 'images')) {
if ((bool) $this->config->get('cache.enabled') === false) {
Util::getFS()->remove($cacheDirImages);
call_user_func_array($this->builder->getMessageCb(), ['COPY_PROGRESS', 'Start copy', 0, $this->count]);
call_user_func_array($this->builder->getMessageCb(), ['COPY_PROGRESS', 'Copied', $this->count, $this->count]);