Issues (587)

src/Service/NotificationService.php (5 issues)

1
<?php
2
3
namespace ControleOnline\Service;
4
5
use ControleOnline\Entity\Notification;
6
use Doctrine\ORM\EntityManagerInterface;
0 ignored issues
show
The type Doctrine\ORM\EntityManagerInterface was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
7
use Symfony\Component\HttpFoundation\RequestStack;
0 ignored issues
show
The type Symfony\Component\HttpFoundation\RequestStack was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
8
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface
0 ignored issues
show
The type Symfony\Component\Securi...e\TokenStorageInterface was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
9
 AS Security;
10
11
class NotificationService
12
{
13
14
  public function __construct(
15
    private EntityManagerInterface $manager,
16
    private Security               $security,
17
    private RequestStack $requestStack,
18
    private PusherService $pusher
0 ignored issues
show
The type ControleOnline\Service\PusherService was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
19
  ) {
20
  }
21
22
  public function postPersist(Notification $notification)
0 ignored issues
show
The parameter $notification is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

22
  public function postPersist(/** @scrutinizer ignore-unused */ Notification $notification)

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

Loading history...
23
  {
24
    $this->pusher->push(['company' => 1, 'people' => 1], 'my_topic');
25
  }
26
}
27