Completed
Push — 25.x ( 1cc005 )
by Tim
01:40
created

ClearMediaGalleryObserver::process()   C

Complexity

Conditions 13
Paths 43

Size

Total Lines 83

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 182

Importance

Changes 0
Metric Value
dl 0
loc 83
ccs 0
cts 61
cp 0
rs 5.6642
c 0
b 0
f 0
cc 13
nc 43
nop 0
crap 182

How to fix   Long Method    Complexity   

Long Method

Small methods make your code easier to understand, in particular if combined with a good name. Besides, if your method is small, finding a good name is usually much easier.

For example, if you find yourself adding comments to a method's body, this is usually a good sign to extract the commented part to a new method, and use the comment as a starting point when coming up with a good name for this new method.

Commonly applied refactorings include:

1
<?php
2
3
/**
4
 * TechDivision\Import\Product\Media\Observers\ClearMediaGalleryObserver
5
 *
6
 * NOTICE OF LICENSE
7
 *
8
 * This source file is subject to the Open Software License (OSL 3.0)
9
 * that is available through the world-wide-web at this URL:
10
 * http://opensource.org/licenses/osl-3.0.php
11
 *
12
 * PHP version 5
13
 *
14
 * @author    Tim Wagner <[email protected]>
15
 * @copyright 2020 TechDivision GmbH <[email protected]>
16
 * @license   http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
17
 * @link      https://github.com/techdivision/import-product-media
18
 * @link      http://www.techdivision.com
19
 */
20
21
namespace TechDivision\Import\Product\Media\Observers;
22
23
/**
24
 * Observer that cleaned up a product's media gallery information.
25
 *
26
 * @author     Tim Wagner <[email protected]>
27
 * @copyright  2020 TechDivision GmbH <[email protected]>
28
 * @license    http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
29
 * @link       https://github.com/techdivision/import-product-media
30
 * @link       http://www.techdivision.com
31
 * @deprecated Sinces 25.0.0 use \TechDivision\Import\Product\Media\Observers\CleanUpMediaGalleryObserver instead
32
 */
33
class ClearMediaGalleryObserver extends CleanUpMediaGalleryObserver
34
{
35
}
36