Completed
Push — master ( 8418b3...91ec6e )
by
unknown
13s queued 11s
created

src/main/php/PDepend/Metrics/Analyzer.php (2 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
 * This file is part of PDepend.
4
 *
5
 * PHP Version 5
6
 *
7
 * Copyright (c) 2008-2017 Manuel Pichler <[email protected]>.
8
 * All rights reserved.
9
 *
10
 * Redistribution and use in source and binary forms, with or without
11
 * modification, are permitted provided that the following conditions
12
 * are met:
13
 *
14
 *   * Redistributions of source code must retain the above copyright
15
 *     notice, this list of conditions and the following disclaimer.
16
 *
17
 *   * Redistributions in binary form must reproduce the above copyright
18
 *     notice, this list of conditions and the following disclaimer in
19
 *     the documentation and/or other materials provided with the
20
 *     distribution.
21
 *
22
 *   * Neither the name of Manuel Pichler nor the names of his
23
 *     contributors may be used to endorse or promote products derived
24
 *     from this software without specific prior written permission.
25
 *
26
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
27
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
28
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
29
 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
30
 * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
31
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
32
 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
33
 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
34
 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
35
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
36
 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
37
 * POSSIBILITY OF SUCH DAMAGE.
38
 *
39
 * @copyright 2008-2017 Manuel Pichler. All rights reserved.
40
 * @license http://www.opensource.org/licenses/bsd-license.php BSD License
41
 */
42
43
namespace PDepend\Metrics;
44
45
use PDepend\Source\AST\ASTArtifactList;
46
47
/**
48
 * Base interface for all analyzer implementations.
49
 *
50
 * @copyright 2008-2017 Manuel Pichler. All rights reserved.
51
 * @license http://www.opensource.org/licenses/bsd-license.php BSD License
52
 */
53
interface Analyzer
54
{
55
    /**
56
     * Constructs a new analyzer instance.
57
     *
58
     * @param array(string=>mixed) $options Global option array, every analyzer
0 ignored issues
show
The doc-type array(string=>mixed) could not be parsed: Expected "|" or "end of type", but got "(" at position 5. (view supported doc-types)

This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.

Loading history...
59
     *                                      can extract the required options.
60
     */
61
    public function __construct(array $options = array());
62
    
63
    /**
64
     * Adds a listener to this analyzer.
65
     *
66
     * @param  \PDepend\Metrics\AnalyzerListener $listener The listener instance.
67
     * @return void
68
     */
69
    public function addAnalyzeListener(AnalyzerListener $listener);
70
    
71
    /**
72
     * Processes all {@link \PDepend\Source\AST\ASTNamespace} code nodes.
73
     *
74
     * @param  \PDepend\Source\AST\ASTNamespace[] $namespaces
75
     * @return void
76
     */
77
    public function analyze($namespaces);
78
79
    /**
80
     * An analyzer that is active must return <b>true</b> to recognized by
81
     * pdepend framework, while an analyzer that does not perform any action
82
     * for any reason should return <b>false</b>.
83
     *
84
     * @return boolean
85
     * @since  0.9.10
86
     */
87
    public function isEnabled();
88
89
    /**
90
     * Set global options
91
     *
92
     * @param array(string=>mixed) $options
0 ignored issues
show
The doc-type array(string=>mixed) could not be parsed: Expected "|" or "end of type", but got "(" at position 5. (view supported doc-types)

This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.

Loading history...
93
     * @since 2.0.1
94
     */
95
    public function setOptions(array $options = array());
96
}
97