Completed
Push — master ( 049ad1...c0c08d )
by Marco
19s
created

lib/Doctrine/ORM/Mapping/NamingStrategy.php (1 issue)

Labels
Severity

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
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
5
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
6
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
7
 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
8
 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
9
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
10
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
11
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
12
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
13
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
14
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
15
 *
16
 * This software consists of voluntary contributions made by many individuals
17
 * and is licensed under the MIT license. For more information, see
18
 * <http://www.doctrine-project.org>.
19
 */
20
21
namespace Doctrine\ORM\Mapping;
22
23
/**
24
 * A set of rules for determining the physical column and table names
25
 *
26
 * 
27
 * @link    www.doctrine-project.org
28
 * @since   2.3
29
 * @author  Fabio B. Silva <[email protected]>
30
 */
31
interface NamingStrategy
32
{
33
    /**
34
     * Returns a table name for an entity class.
35
     *
36
     * @param string $className The fully-qualified class name.
37
     *
38
     * @return string A table name.
39
     */
40
    function classToTableName($className);
41
42
    /**
43
     * Returns a column name for a property.
44
     *
45
     * @param string      $propertyName A property name.
46
     * @param string|null $className    The fully-qualified class name.
47
     *
48
     * @return string A column name.
49
     */
50
    function propertyToColumnName($propertyName, $className = null);
51
52
    /**
53
     * Returns a column name for an embedded property.
54
     *
55
     * @param string $propertyName
56
     * @param string $embeddedColumnName
57
     *
58
     * @return string
59
     */
60
    function embeddedFieldToColumnName($propertyName, $embeddedColumnName, $className = null, $embeddedClassName = null);
61
62
    /**
63
     * Returns the default reference column name.
64
     *
65
     * @return string A column name.
66
     */
67
    function referenceColumnName();
68
69
    /**
70
     * Returns a join column name for a property.
71
     *
72
     * @param string $propertyName A property name.
73
     * @param string|null $className    The fully-qualified class name.
0 ignored issues
show
There is no parameter named $className. Was it maybe removed?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.

Consider the following example. The parameter $italy is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $island
 * @param array $italy
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was removed, but the annotation was not.

Loading history...
74
     *                                  This parameter is omitted from the signature due to BC
75
     *
76
     * @return string A join column name.
77
     */
78
    function joinColumnName($propertyName/*, $className = null*/);
79
80
    /**
81
     * Returns a join table name.
82
     *
83
     * @param string      $sourceEntity The source entity.
84
     * @param string      $targetEntity The target entity.
85
     * @param string|null $propertyName A property name.
86
     *
87
     * @return string A join table name.
88
     */
89
    function joinTableName($sourceEntity, $targetEntity, $propertyName = null);
90
91
    /**
92
     * Returns the foreign key column name for the given parameters.
93
     *
94
     * @param string      $entityName           An entity.
95
     * @param string|null $referencedColumnName A property.
96
     *
97
     * @return string A join column name.
98
     */
99
    function joinKeyColumnName($entityName, $referencedColumnName = null);
100
}
101