Function initialize
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public function initialize(App\Request $request, App\User $user)
{
$zipfile = Import_Utils_Helper::getImportFilePath($user);
$this->importFolderLocation = "{$zipfile}_{$this->extension}";
// clean old data
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function getNextFile
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function getNextFile($del = true)
{
$return = false;
foreach ($this->filelist as $name) {
$filePatch = $this->importFolderLocation . DIRECTORY_SEPARATOR . $name;
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Missing class import via use statement (line '35', column '14'). Open
throw new \App\Exceptions\IllegalValue('ERR_NOT_ALLOWED_VALUE||' . $this->extension, 406);
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
The method getFirstRowData has a boolean flag argument $hasHeader, which is a certain sign of a Single Responsibility Principle violation. Open
public function getFirstRowData($hasHeader = true)
- Read upRead up
- Exclude checks
BooleanArgumentFlag
Since: 1.4.0
A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.
Example
class Foo {
public function bar($flag = true) {
}
}
Source https://phpmd.org/rules/cleancode.html#booleanargumentflag
Missing class import via use statement (line '111', column '21'). Open
$newRequest = new \App\Request($data, false);
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Missing class import via use statement (line '148', column '21'). Open
$newRequest = new \App\Request($data, false);
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
The method getNextFile has a boolean flag argument $del, which is a certain sign of a Single Responsibility Principle violation. Open
public function getNextFile($del = true)
- Read upRead up
- Exclude checks
BooleanArgumentFlag
Since: 1.4.0
A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.
Example
class Foo {
public function bar($flag = true) {
}
}
Source https://phpmd.org/rules/cleancode.html#booleanargumentflag
Missing class import via use statement (line '82', column '17'). Open
foreach (new DirectoryIterator($this->importFolderLocation) as $file) {
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Avoid using static access to class '\App\Log' in method '__construct'. Open
\App\Log::error('purifyByType: ' . $this->extension, 'IllegalValue');
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class 'Import_Utils_Helper' in method 'initialize'. Open
$zipfile = Import_Utils_Helper::getImportFilePath($user);
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class '\App\Zip' in method 'initialize'. Open
$zip = \App\Zip::openFile($zipfile, ['onlyExtensions' => [$this->extension]]);
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class 'Vtiger_Cache' in method '__construct'. Open
$instance = Vtiger_Cache::get('ZipReader', $request->getModule() . $user->getId());
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class '\vtlib\Functions' in method 'deleteFolder'. Open
\vtlib\Functions::recurseDelete($this->importFolderLocation, true);
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class 'Vtiger_Cache' in method '__construct'. Open
Vtiger_Cache::set('ZipReader', $this->moduleName . $user->getId(), $this);
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class 'Import_Module_Model' in method 'getFirstRowData'. Open
$fileReader = Import_Module_Model::getFileReader($newRequest, $this->user);
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class 'Import_Module_Model' in method 'read'. Open
$fileReader = Import_Module_Model::getFileReader($newRequest, $this->user);
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Reference to undeclared property \Import_ZipReader_Reader->extension
Open
if (strtolower(array_pop($nameArray)) != strtolower($this->extension)) {
- Exclude checks
Call to method getId
from undeclared class \App\User
(Did you mean class \Tests\App\User) Open
Vtiger_Cache::set('ZipReader', $this->moduleName . $user->getId(), $this);
- Exclude checks
Reference to undeclared property \Import_ZipReader_Reader->extension
Open
if ($this->extension && file_exists($zipfile) && !file_exists($this->importFolderLocation)) {
- Exclude checks
Parameter $user
has undeclared type \App\User
(Did you mean class \Tests\App\User) Open
public function __construct(App\Request $request, App\User $user)
- Exclude checks
Reference to undeclared property \Import_ZipReader_Reader->extension
Open
\App\Log::error('purifyByType: ' . $this->extension, 'IllegalValue');
- Exclude checks
Parameter $user
has undeclared type \App\User
(Did you mean class \Tests\App\User) Open
public function initialize(App\Request $request, App\User $user)
- Exclude checks
Reference to undeclared property \Import_ZipReader_Reader->extension
Open
$newRequest->set('type', $this->extension);
- Exclude checks
Reference to undeclared property \Import_ZipReader_Reader->extension
Open
throw new \App\Exceptions\IllegalValue('ERR_NOT_ALLOWED_VALUE||' . $this->extension, 406);
- Exclude checks
Call to method error
from undeclared class \App\Log
Open
\App\Log::error('purifyByType: ' . $this->extension, 'IllegalValue');
- Exclude checks
Argument 1 (fileName)
is string
but \App\Zip::openFile()
takes bool|false
defined at /code/app/Zip.php:51
Open
$zip = \App\Zip::openFile($zipfile, ['onlyExtensions' => [$this->extension]]);
- Exclude checks
Reference to undeclared property \Import_FileReader_Reader->filePath
(Did you mean $filePath) Open
$fileReader->filePath = $filePath;
- Exclude checks
Reference to undeclared property \Import_ZipReader_Reader->extension
Open
$zip = \App\Zip::openFile($zipfile, ['onlyExtensions' => [$this->extension]]);
- Exclude checks
Reference to undeclared property \Import_ZipReader_Reader->extension
Open
if (!isset($allowedExtension[$this->extension])) {
- Exclude checks
Reference to undeclared property \Import_ZipReader_Reader->extension
Open
$this->importFolderLocation = "{$zipfile}_{$this->extension}";
- Exclude checks
Reference to undeclared property \Import_ZipReader_Reader->extension
Open
$this->extension = $request->getByType('extension');
- Exclude checks
Reference to undeclared property \Import_ZipReader_Reader->extension
Open
$newRequest->set('type', $this->extension);
- Exclude checks
Reference to undeclared property \Import_FileReader_Reader->filePath
(Did you mean $filePath) Open
$fileReader->filePath = $filePath;
- Exclude checks
Call to method getId
from undeclared class \App\User
(Did you mean class \Tests\App\User) Open
$instance = Vtiger_Cache::get('ZipReader', $request->getModule() . $user->getId());
- Exclude checks
Reference to undeclared property \Import_ZipReader_Reader->extension
Open
if (!$file->isDot() && false !== strpos($file->getFilename(), '.' . $this->extension)) {
- Exclude checks
Each class must be in a namespace of at least one level (a top-level vendor name) Open
class Import_ZipReader_Reader extends Import_FileReader_Reader
- Exclude checks
The class Import_ZipReader_Reader is not named in CamelCase. Open
class Import_ZipReader_Reader extends Import_FileReader_Reader
{
protected $moduleName;
protected $importFolderLocation;
protected $filelist = [];
- Read upRead up
- Exclude checks
CamelCaseClassName
Since: 0.2
It is considered best practice to use the CamelCase notation to name classes.
Example
class class_name {
}
Source
Spaces must be used to indent lines; tabs are not allowed Open
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->request = $request;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (!isset($allowedExtension[$this->extension])) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
\App\Log::error('purifyByType: ' . $this->extension, 'IllegalValue');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public static function getAllowedExtension()
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ($this->extension && file_exists($zipfile) && !file_exists($this->importFolderLocation)) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
foreach ($this->filelist as $name) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @param \App\Request $request
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$objectProperties = get_object_vars($instance);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
// clean old data
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return $return;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$fileReader->deleteFile();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
protected $moduleName;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function __construct(App\Request $request, App\User $user)
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->extension = $request->getByType('extension');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Returns allowed extension files in zip package.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Initialize zip file.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$zipfile = Import_Utils_Helper::getImportFilePath($user);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$zip = \App\Zip::openFile($zipfile, ['onlyExtensions' => [$this->extension]]);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
foreach (new DirectoryIterator($this->importFolderLocation) as $file) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
break;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function read()
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
protected $importFolderLocation;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$instance = Vtiger_Cache::get('ZipReader', $request->getModule() . $user->getId());
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (!empty($instance)) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @throws \App\Exceptions\AppException
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
mkdir($this->importFolderLocation);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$newRequest->set('type', $this->extension);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->deleteFolder();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function hasHeader()
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$fileReader = Import_Module_Model::getFileReader($newRequest, $this->user);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$filePath = $this->getNextFile(false);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
unset($this->filelist[$name]);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (!empty($this->importFolderLocation)) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @param \App\User $user
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @return string[]
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return ['xml' => 'XML'];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
} elseif (is_dir($this->importFolderLocation)) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$newRequest = new \App\Request($data, false);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return true;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (!$fileReader) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$return = true;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
unset($this->filelist[$name]);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
foreach ($filelist as $name) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$fileReader->filePath = $filePath;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$nameArray = explode('.', $name);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$fileReader = Import_Module_Model::getFileReader($newRequest, $this->user);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$fileReader->read();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->filelist = $zip->unzip($this->importFolderLocation);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
unlink($zipfile);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
break;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$newRequest->set('type', $this->extension);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Vtiger_Cache::set('ZipReader', $this->moduleName . $user->getId(), $this);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ('uploadAndParse' === $request->getMode()) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (strtolower(array_pop($nameArray)) != strtolower($this->extension)) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return false;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return $fileReader->getFirstRowData($hasHeader);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
\vtlib\Functions::recurseDelete($this->importFolderLocation, true);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->moduleName = $request->getModule();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return $return;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (file_exists($filePatch) && $this->checkExtension([$name])) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
while ($filePath = $this->getNextFile()) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function deleteFolder()
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$allowedExtension = static::getAllowedExtension();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$return = false;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$newRequest = new \App\Request($data, false);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return false;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @param \App\User $user
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
throw new \App\Exceptions\IllegalValue('ERR_NOT_ALLOWED_VALUE||' . $this->extension, 406);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
foreach ($objectProperties as $properName => $propertyValue) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->filelist[] = $file->getFilename();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function getFirstRowData($hasHeader = true)
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$fileReader->filePath = $filePath;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$return = $filePatch;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->setInstanceProperties($instance);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
parent::__construct($request, $user);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->initialize($request, $user);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function initialize(App\Request $request, App\User $user)
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->deleteFolder();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (!$file->isDot() && false !== strpos($file->getFilename(), '.' . $this->extension)) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$data = $this->request->getAll();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return false;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->deleteFolder();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ($del) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Construct.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->{$properName} = $propertyValue;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @param \App\Request $request
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (!$filePath) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$data = $this->request->getAll();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
protected $filelist = [];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function setInstanceProperties($instance)
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->importFolderLocation = "{$zipfile}_{$this->extension}";
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function checkExtension($filelist)
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function getNextFile($del = true)
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$return = false;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$filePatch = $this->importFolderLocation . DIRECTORY_SEPARATOR . $name;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (!$fileReader) {
- Exclude checks
Class name "Import_ZipReader_Reader" is not in camel caps format Open
class Import_ZipReader_Reader extends Import_FileReader_Reader
- Exclude checks