Completed
Push — master ( 00777c...4aaab4 )
by
unknown
07:13 queued 10s
created

src/Traits/Translatable.php (1 issue)

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
declare(strict_types=1);
4
5
/*
6
 * This file is part of the Sonata Project package.
7
 *
8
 * (c) Thomas Rabaix <[email protected]>
9
 *
10
 * For the full copyright and license information, please view the LICENSE
11
 * file that was distributed with this source code.
12
 */
13
14
namespace Sonata\TranslationBundle\Traits;
15
16
@trigger_error(
0 ignored issues
show
Security Best Practice introduced by
It seems like you do not handle an error condition here. This can introduce security issues, and is generally not recommended.

If you suppress an error, we recommend checking for the error condition explicitly:

// For example instead of
@mkdir($dir);

// Better use
if (@mkdir($dir) === false) {
    throw new \RuntimeException('The directory '.$dir.' could not be created.');
}
Loading history...
17
    'The '.__NAMESPACE__.'\Translatable class is deprecated since version 2.1 and will be removed in 3.0.'.
18
    'Use the '.__NAMESPACE__.'\TranslatableTrait class instead.',
19
    E_USER_DEPRECATED
20
);
21
22
/**
23
 * If you don't want to use trait, you can extend AbstractTranslatable instead.
24
 *
25
 * NEXT_MAJOR: remove this trait.
26
 *
27
 * @author Nicolas Bastien <[email protected]>
28
 *
29
 * @deprecated since version 2.1 and will be removed in 3.0
30
 */
31
trait Translatable
32
{
33
    use TranslatableTrait;
34
}
35