Completed
Push — master ( 364b5f...db455e )
by
unknown
04:01
created

cms/dev/EcommerceDevelopmentAdminDecorator.php (5 issues)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
3
4
/**
5
 * EcommerceDevelopmentAdminDecorator adds extra functionality to the DevelopmentAdmin
6
 * It creates a developer view (as in www.mysite.com/dev/) specifically for ecommerce.
7
 *
8
 *
9
 * @authors: Nicolaas [at] Sunny Side Up .co.nz
10
 * @package: ecommerce
11
 * @sub-package: cms
12
 * @inspiration: Silverstripe Ltd, Jeremy
13
 **/
14
class EcommerceDevelopmentAdminDecorator extends Extension
0 ignored issues
show
Coding Style Compatibility introduced by
PSR1 recommends that each class must be in a namespace of at least one level to avoid collisions.

You can fix this by adding a namespace to your class:

namespace YourVendor;

class YourClass { }

When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.

Loading history...
15
{
16
    private static $allowed_actions = array(
0 ignored issues
show
The property $allowed_actions is not used and could be removed.

This check marks private properties in classes that are never used. Those properties can be removed.

Loading history...
Comprehensibility introduced by
Consider using a different property name as you override a private property of the parent class.
Loading history...
17
        'ecommerce',
18
    );
19
20
    /**
21
     * handles ecommerce request or provide options to run request in the form of HTML output.
22
     *
23
     * @param SS_HTTPRequest
24
     *
25
     * @return HTML
0 ignored issues
show
Should the return type not be EcommerceDatabaseAdmin?

This check compares the return type specified in the @return annotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.

Loading history...
26
     **/
27
    public function ecommerce(SS_HTTPRequest $request)
0 ignored issues
show
The parameter $request is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
28
    {
29
        return EcommerceDatabaseAdmin::create();
30
    }
31
}
32