Failed Conditions
Push — master ( 2ade86...13f838 )
by Jonathan
18s
created

Tests/Models/Global/GlobalNamespaceModel.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
 * @Entity
5
 * @Table(name="articles")
6
 */
7
class DoctrineGlobal_Article
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...
8
{
9
    /**
10
     * @Id
11
     * @Column(type="integer")
12
     */
13
    protected $id;
14
15
    /**
16
     * @Column(type="string")
17
     */
18
    protected $headline;
19
20
    /**
21
     * @column(type="text")
22
     */
23
    protected $text;
24
25
    /**
26
     * @ManyToMany(targetEntity="DoctrineGlobal_User")
27
     * @JoinTable(name="author_articles",
28
     *      joinColumns={@JoinColumn(name="article_id", referencedColumnName="id")},
29
     *      inverseJoinColumns={@JoinColumn(name="author_id", referencedColumnName="id", unique=true)}
30
     * )
31
     */
32
    protected $author;
33
34
    /**
35
     * @ManyToMany(targetEntity="DoctrineGlobal_User")
36
     * @JoinTable(name="editor_articles",
37
     *      joinColumns={@JoinColumn(name="article_id", referencedColumnName="id")},
38
     *      inverseJoinColumns={@JoinColumn(name="editor_id", referencedColumnName="id", unique=true)}
39
     * )
40
     */
41
    protected $editor;
42
}
43
44
/**
45
 * @Entity
46
 * @Table(name="users")
47
 */
48
class DoctrineGlobal_User
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...
49
{
50
    /**
51
     * @Id
52
     * @Column(type="integer")
53
     *
54
     * @var int
55
     */
56
    private $id;
0 ignored issues
show
The property $id 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...
57
58
    /**
59
     * @Column(type="string", length=64)
60
     *
61
     * @var string
62
     */
63
    private $username;
0 ignored issues
show
The property $username 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...
64
65
    /**
66
     * @Column(type="string", length=128)
67
     *
68
     * @var string
69
     */
70
    private $email;
0 ignored issues
show
The property $email 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...
71
}