YetiForceCompany/YetiForceCRM

View on GitHub
modules/Import/readers/ZipReader.php

Summary

Maintainability
A
1 hr
Test Coverage
F
0%

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
Severity: Minor
Found in modules/Import/readers/ZipReader.php - About 1 hr to fix

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;
Severity: Minor
Found in modules/Import/readers/ZipReader.php - About 45 mins to fix

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);
Severity: Minor
Found in modules/Import/readers/ZipReader.php by phpmd

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)
Severity: Minor
Found in modules/Import/readers/ZipReader.php by phpmd

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);
Severity: Minor
Found in modules/Import/readers/ZipReader.php by phpmd

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);
Severity: Minor
Found in modules/Import/readers/ZipReader.php by phpmd

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)
Severity: Minor
Found in modules/Import/readers/ZipReader.php by phpmd

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) {
Severity: Minor
Found in modules/Import/readers/ZipReader.php by phpmd

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');
Severity: Minor
Found in modules/Import/readers/ZipReader.php by phpmd

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);
Severity: Minor
Found in modules/Import/readers/ZipReader.php by phpmd

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]]);
Severity: Minor
Found in modules/Import/readers/ZipReader.php by phpmd

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());
Severity: Minor
Found in modules/Import/readers/ZipReader.php by phpmd

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);
Severity: Minor
Found in modules/Import/readers/ZipReader.php by phpmd

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);
Severity: Minor
Found in modules/Import/readers/ZipReader.php by phpmd

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);
Severity: Minor
Found in modules/Import/readers/ZipReader.php by phpmd

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);
Severity: Minor
Found in modules/Import/readers/ZipReader.php by phpmd

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)) {
Severity: Minor
Found in modules/Import/readers/ZipReader.php by phan

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);
Severity: Critical
Found in modules/Import/readers/ZipReader.php by phan

Reference to undeclared property \Import_ZipReader_Reader->extension
Open

        if ($this->extension && file_exists($zipfile) && !file_exists($this->importFolderLocation)) {
Severity: Minor
Found in modules/Import/readers/ZipReader.php by phan

Parameter $user has undeclared type \App\User (Did you mean class \Tests\App\User)
Open

    public function __construct(App\Request $request, App\User $user)
Severity: Minor
Found in modules/Import/readers/ZipReader.php by phan

Reference to undeclared property \Import_ZipReader_Reader->extension
Open

            \App\Log::error('purifyByType: ' . $this->extension, 'IllegalValue');
Severity: Minor
Found in modules/Import/readers/ZipReader.php by phan

Parameter $user has undeclared type \App\User (Did you mean class \Tests\App\User)
Open

    public function initialize(App\Request $request, App\User $user)
Severity: Minor
Found in modules/Import/readers/ZipReader.php by phan

Reference to undeclared property \Import_ZipReader_Reader->extension
Open

        $newRequest->set('type', $this->extension);
Severity: Minor
Found in modules/Import/readers/ZipReader.php by phan

Reference to undeclared property \Import_ZipReader_Reader->extension
Open

            throw new \App\Exceptions\IllegalValue('ERR_NOT_ALLOWED_VALUE||' . $this->extension, 406);
Severity: Minor
Found in modules/Import/readers/ZipReader.php by phan

Call to method error from undeclared class \App\Log
Open

            \App\Log::error('purifyByType: ' . $this->extension, 'IllegalValue');
Severity: Critical
Found in modules/Import/readers/ZipReader.php by phan

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]]);
Severity: Minor
Found in modules/Import/readers/ZipReader.php by phan

Reference to undeclared property \Import_FileReader_Reader->filePath (Did you mean $filePath)
Open

        $fileReader->filePath = $filePath;
Severity: Minor
Found in modules/Import/readers/ZipReader.php by phan

Reference to undeclared property \Import_ZipReader_Reader->extension
Open

            $zip = \App\Zip::openFile($zipfile, ['onlyExtensions' => [$this->extension]]);
Severity: Minor
Found in modules/Import/readers/ZipReader.php by phan

Reference to undeclared property \Import_ZipReader_Reader->extension
Open

        if (!isset($allowedExtension[$this->extension])) {
Severity: Minor
Found in modules/Import/readers/ZipReader.php by phan

Reference to undeclared property \Import_ZipReader_Reader->extension
Open

        $this->importFolderLocation = "{$zipfile}_{$this->extension}";
Severity: Minor
Found in modules/Import/readers/ZipReader.php by phan

Reference to undeclared property \Import_ZipReader_Reader->extension
Open

        $this->extension = $request->getByType('extension');
Severity: Minor
Found in modules/Import/readers/ZipReader.php by phan

Reference to undeclared property \Import_ZipReader_Reader->extension
Open

        $newRequest->set('type', $this->extension);
Severity: Minor
Found in modules/Import/readers/ZipReader.php by phan

Reference to undeclared property \Import_FileReader_Reader->filePath (Did you mean $filePath)
Open

            $fileReader->filePath = $filePath;
Severity: Minor
Found in modules/Import/readers/ZipReader.php by phan

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());
Severity: Critical
Found in modules/Import/readers/ZipReader.php by phan

Reference to undeclared property \Import_ZipReader_Reader->extension
Open

                if (!$file->isDot() && false !== strpos($file->getFilename(), '.' . $this->extension)) {
Severity: Minor
Found in modules/Import/readers/ZipReader.php by phan

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

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 = [];
Severity: Minor
Found in modules/Import/readers/ZipReader.php by phpmd

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

     */

Spaces must be used to indent lines; tabs are not allowed
Open

            $this->request = $request;

Spaces must be used to indent lines; tabs are not allowed
Open

        if (!isset($allowedExtension[$this->extension])) {

Spaces must be used to indent lines; tabs are not allowed
Open

            \App\Log::error('purifyByType: ' . $this->extension, 'IllegalValue');

Spaces must be used to indent lines; tabs are not allowed
Open

    public static function getAllowedExtension()

Spaces must be used to indent lines; tabs are not allowed
Open

    {

Spaces must be used to indent lines; tabs are not allowed
Open

        if ($this->extension && file_exists($zipfile) && !file_exists($this->importFolderLocation)) {

Spaces must be used to indent lines; tabs are not allowed
Open

            }

Spaces must be used to indent lines; tabs are not allowed
Open

        foreach ($this->filelist as $name) {

Spaces must be used to indent lines; tabs are not allowed
Open

     * @param \App\Request $request

Spaces must be used to indent lines; tabs are not allowed
Open

        $objectProperties = get_object_vars($instance);

Spaces must be used to indent lines; tabs are not allowed
Open

        // clean old data

Spaces must be used to indent lines; tabs are not allowed
Open

        return $return;

Spaces must be used to indent lines; tabs are not allowed
Open

            $fileReader->deleteFile();

Spaces must be used to indent lines; tabs are not allowed
Open

    protected $moduleName;

Spaces must be used to indent lines; tabs are not allowed
Open

    /**

Spaces must be used to indent lines; tabs are not allowed
Open

    public function __construct(App\Request $request, App\User $user)

Spaces must be used to indent lines; tabs are not allowed
Open

            return;

Spaces must be used to indent lines; tabs are not allowed
Open

        $this->extension = $request->getByType('extension');

Spaces must be used to indent lines; tabs are not allowed
Open

     * Returns allowed extension files in zip package.

Spaces must be used to indent lines; tabs are not allowed
Open

     *

Spaces must be used to indent lines; tabs are not allowed
Open

     * Initialize zip file.

Spaces must be used to indent lines; tabs are not allowed
Open

        $zipfile = Import_Utils_Helper::getImportFilePath($user);

Spaces must be used to indent lines; tabs are not allowed
Open

            $zip = \App\Zip::openFile($zipfile, ['onlyExtensions' => [$this->extension]]);

Spaces must be used to indent lines; tabs are not allowed
Open

            foreach (new DirectoryIterator($this->importFolderLocation) as $file) {

Spaces must be used to indent lines; tabs are not allowed
Open

    }

Spaces must be used to indent lines; tabs are not allowed
Open

                }

Spaces must be used to indent lines; tabs are not allowed
Open

                break;

Spaces must be used to indent lines; tabs are not allowed
Open

    public function read()

Spaces must be used to indent lines; tabs are not allowed
Open

    }

Spaces must be used to indent lines; tabs are not allowed
Open

    protected $importFolderLocation;

Spaces must be used to indent lines; tabs are not allowed
Open

        $instance = Vtiger_Cache::get('ZipReader', $request->getModule() . $user->getId());

Spaces must be used to indent lines; tabs are not allowed
Open

        if (!empty($instance)) {

Spaces must be used to indent lines; tabs are not allowed
Open

    /**

Spaces must be used to indent lines; tabs are not allowed
Open

     *

Spaces must be used to indent lines; tabs are not allowed
Open

     * @throws \App\Exceptions\AppException

Spaces must be used to indent lines; tabs are not allowed
Open

            mkdir($this->importFolderLocation);

Spaces must be used to indent lines; tabs are not allowed
Open

                }

Spaces must be used to indent lines; tabs are not allowed
Open

    }

Spaces must be used to indent lines; tabs are not allowed
Open

    }

Spaces must be used to indent lines; tabs are not allowed
Open

        $newRequest->set('type', $this->extension);

Spaces must be used to indent lines; tabs are not allowed
Open

        $this->deleteFolder();

Spaces must be used to indent lines; tabs are not allowed
Open

    }

Spaces must be used to indent lines; tabs are not allowed
Open

     *

Spaces must be used to indent lines; tabs are not allowed
Open

    public function hasHeader()

Spaces must be used to indent lines; tabs are not allowed
Open

        $fileReader = Import_Module_Model::getFileReader($newRequest, $this->user);

Spaces must be used to indent lines; tabs are not allowed
Open

        $filePath = $this->getNextFile(false);

Spaces must be used to indent lines; tabs are not allowed
Open

            unset($this->filelist[$name]);

Spaces must be used to indent lines; tabs are not allowed
Open

    {

Spaces must be used to indent lines; tabs are not allowed
Open

        if (!empty($this->importFolderLocation)) {

Spaces must be used to indent lines; tabs are not allowed
Open

        }

Spaces must be used to indent lines; tabs are not allowed
Open

     * @param \App\User    $user

Spaces must be used to indent lines; tabs are not allowed
Open

     * @return string[]

Spaces must be used to indent lines; tabs are not allowed
Open

        return ['xml' => 'XML'];

Spaces must be used to indent lines; tabs are not allowed
Open

        } elseif (is_dir($this->importFolderLocation)) {

Spaces must be used to indent lines; tabs are not allowed
Open

        $newRequest = new \App\Request($data, false);

Spaces must be used to indent lines; tabs are not allowed
Open

        return true;

Spaces must be used to indent lines; tabs are not allowed
Open

        if (!$fileReader) {

Spaces must be used to indent lines; tabs are not allowed
Open

    {

Spaces must be used to indent lines; tabs are not allowed
Open

        }

Spaces must be used to indent lines; tabs are not allowed
Open

        $return = true;

Spaces must be used to indent lines; tabs are not allowed
Open

                    unset($this->filelist[$name]);

Spaces must be used to indent lines; tabs are not allowed
Open

        foreach ($filelist as $name) {

Spaces must be used to indent lines; tabs are not allowed
Open

            $fileReader->filePath = $filePath;

Spaces must be used to indent lines; tabs are not allowed
Open

            $nameArray = explode('.', $name);

Spaces must be used to indent lines; tabs are not allowed
Open

        }

Spaces must be used to indent lines; tabs are not allowed
Open

        }

Spaces must be used to indent lines; tabs are not allowed
Open

        $fileReader = Import_Module_Model::getFileReader($newRequest, $this->user);

Spaces must be used to indent lines; tabs are not allowed
Open

            $fileReader->read();

Spaces must be used to indent lines; tabs are not allowed
Open

    {

Spaces must be used to indent lines; tabs are not allowed
Open

            $this->filelist = $zip->unzip($this->importFolderLocation);

Spaces must be used to indent lines; tabs are not allowed
Open

            unlink($zipfile);

Spaces must be used to indent lines; tabs are not allowed
Open

            }

Spaces must be used to indent lines; tabs are not allowed
Open

    {

Spaces must be used to indent lines; tabs are not allowed
Open

    }

Spaces must be used to indent lines; tabs are not allowed
Open

                break;

Spaces must be used to indent lines; tabs are not allowed
Open

    {

Spaces must be used to indent lines; tabs are not allowed
Open

        $newRequest->set('type', $this->extension);

Spaces must be used to indent lines; tabs are not allowed
Open

        }

Spaces must be used to indent lines; tabs are not allowed
Open

     *

Spaces must be used to indent lines; tabs are not allowed
Open

        Vtiger_Cache::set('ZipReader', $this->moduleName . $user->getId(), $this);

Spaces must be used to indent lines; tabs are not allowed
Open

    }

Spaces must be used to indent lines; tabs are not allowed
Open

    {

Spaces must be used to indent lines; tabs are not allowed
Open

        if ('uploadAndParse' === $request->getMode()) {

Spaces must be used to indent lines; tabs are not allowed
Open

            if (strtolower(array_pop($nameArray)) != strtolower($this->extension)) {

Spaces must be used to indent lines; tabs are not allowed
Open

            return false;

Spaces must be used to indent lines; tabs are not allowed
Open

        return $fileReader->getFirstRowData($hasHeader);

Spaces must be used to indent lines; tabs are not allowed
Open

        }

Spaces must be used to indent lines; tabs are not allowed
Open

    {

Spaces must be used to indent lines; tabs are not allowed
Open

            \vtlib\Functions::recurseDelete($this->importFolderLocation, true);

Spaces must be used to indent lines; tabs are not allowed
Open

        $this->moduleName = $request->getModule();

Spaces must be used to indent lines; tabs are not allowed
Open

    }

Spaces must be used to indent lines; tabs are not allowed
Open

     */

Spaces must be used to indent lines; tabs are not allowed
Open

        }

Spaces must be used to indent lines; tabs are not allowed
Open

        return $return;

Spaces must be used to indent lines; tabs are not allowed
Open

            if (file_exists($filePatch) && $this->checkExtension([$name])) {

Spaces must be used to indent lines; tabs are not allowed
Open

        while ($filePath = $this->getNextFile()) {

Spaces must be used to indent lines; tabs are not allowed
Open

        }

Spaces must be used to indent lines; tabs are not allowed
Open

    public function deleteFolder()

Spaces must be used to indent lines; tabs are not allowed
Open

        $allowedExtension = static::getAllowedExtension();

Spaces must be used to indent lines; tabs are not allowed
Open

     */

Spaces must be used to indent lines; tabs are not allowed
Open

    {

Spaces must be used to indent lines; tabs are not allowed
Open

        }

Spaces must be used to indent lines; tabs are not allowed
Open

                $return = false;

Spaces must be used to indent lines; tabs are not allowed
Open

            }

Spaces must be used to indent lines; tabs are not allowed
Open

    }

Spaces must be used to indent lines; tabs are not allowed
Open

        $newRequest = new \App\Request($data, false);

Spaces must be used to indent lines; tabs are not allowed
Open

            return false;

Spaces must be used to indent lines; tabs are not allowed
Open

     * @param \App\User    $user

Spaces must be used to indent lines; tabs are not allowed
Open

        }

Spaces must be used to indent lines; tabs are not allowed
Open

            throw new \App\Exceptions\IllegalValue('ERR_NOT_ALLOWED_VALUE||' . $this->extension, 406);

Spaces must be used to indent lines; tabs are not allowed
Open

        foreach ($objectProperties as $properName => $propertyValue) {

Spaces must be used to indent lines; tabs are not allowed
Open

                    $this->filelist[] = $file->getFilename();

Spaces must be used to indent lines; tabs are not allowed
Open

    public function getFirstRowData($hasHeader = true)

Spaces must be used to indent lines; tabs are not allowed
Open

        }

Spaces must be used to indent lines; tabs are not allowed
Open

        $fileReader->filePath = $filePath;

Spaces must be used to indent lines; tabs are not allowed
Open

                $return = $filePatch;

Spaces must be used to indent lines; tabs are not allowed
Open

    }

Spaces must be used to indent lines; tabs are not allowed
Open

            $this->setInstanceProperties($instance);

Spaces must be used to indent lines; tabs are not allowed
Open

        parent::__construct($request, $user);

Spaces must be used to indent lines; tabs are not allowed
Open

        $this->initialize($request, $user);

Spaces must be used to indent lines; tabs are not allowed
Open

    /**

Spaces must be used to indent lines; tabs are not allowed
Open

    public function initialize(App\Request $request, App\User $user)

Spaces must be used to indent lines; tabs are not allowed
Open

            $this->deleteFolder();

Spaces must be used to indent lines; tabs are not allowed
Open

                if (!$file->isDot() && false !== strpos($file->getFilename(), '.' . $this->extension)) {

Spaces must be used to indent lines; tabs are not allowed
Open

        $data = $this->request->getAll();

Spaces must be used to indent lines; tabs are not allowed
Open

            return false;

Spaces must be used to indent lines; tabs are not allowed
Open

            $this->deleteFolder();

Spaces must be used to indent lines; tabs are not allowed
Open

                if ($del) {

Spaces must be used to indent lines; tabs are not allowed
Open

     * Construct.

Spaces must be used to indent lines; tabs are not allowed
Open

            $this->{$properName} = $propertyValue;

Spaces must be used to indent lines; tabs are not allowed
Open

     * @param \App\Request $request

Spaces must be used to indent lines; tabs are not allowed
Open

        if (!$filePath) {

Spaces must be used to indent lines; tabs are not allowed
Open

        $data = $this->request->getAll();

Spaces must be used to indent lines; tabs are not allowed
Open

    protected $filelist = [];

Spaces must be used to indent lines; tabs are not allowed
Open

    public function setInstanceProperties($instance)

Spaces must be used to indent lines; tabs are not allowed
Open

        }

Spaces must be used to indent lines; tabs are not allowed
Open

        $this->importFolderLocation = "{$zipfile}_{$this->extension}";

Spaces must be used to indent lines; tabs are not allowed
Open

    public function checkExtension($filelist)

Spaces must be used to indent lines; tabs are not allowed
Open

    public function getNextFile($del = true)

Spaces must be used to indent lines; tabs are not allowed
Open

    {

Spaces must be used to indent lines; tabs are not allowed
Open

        $return = false;

Spaces must be used to indent lines; tabs are not allowed
Open

            $filePatch = $this->importFolderLocation . DIRECTORY_SEPARATOR . $name;

Spaces must be used to indent lines; tabs are not allowed
Open

        if (!$fileReader) {

Class name "Import_ZipReader_Reader" is not in camel caps format
Open

class Import_ZipReader_Reader extends Import_FileReader_Reader

There are no issues that match your filters.

Category
Status