1 | <?php |
||
23 | class SessionCleanupCommand extends Command |
||
24 | { |
||
25 | /** |
||
26 | * @var ObjectManager |
||
27 | */ |
||
28 | private $om; |
||
29 | |||
30 | /** |
||
31 | * @var AuthenticationHandlerInterface |
||
32 | */ |
||
33 | private $handler; |
||
34 | |||
35 | /** |
||
36 | * @var EventDispatcherInterface |
||
37 | */ |
||
38 | private $eventDispatcher; |
||
39 | |||
40 | /** |
||
41 | * @var string |
||
42 | */ |
||
43 | private $modelName; |
||
44 | |||
45 | /** |
||
46 | * @var ClassMetadata |
||
47 | */ |
||
48 | private $classMetadata; |
||
49 | |||
50 | /** |
||
51 | * @var string |
||
52 | */ |
||
53 | private $dateTimeRule; |
||
54 | |||
55 | /** |
||
56 | * Constructor. |
||
57 | * |
||
58 | * @param ObjectManager $om |
||
59 | * @param AuthenticationHandlerInterface $authenticationHandler |
||
60 | * @param EventDispatcherInterface $eventDispatcher |
||
61 | * @param string $modelName |
||
62 | * @param ClassMetadata $classMetadata |
||
63 | * @param string $dateTimeRule |
||
64 | */ |
||
65 | 1 | public function __construct( |
|
82 | |||
83 | /** |
||
84 | * {@inheritdoc} |
||
85 | */ |
||
86 | 1 | protected function configure() |
|
104 | |||
105 | /** |
||
106 | * {@inheritdoc} |
||
107 | */ |
||
108 | 1 | protected function execute(InputInterface $input, OutputInterface $output) |
|
140 | |||
141 | /** |
||
142 | * Search query for users with outdated api keys. |
||
143 | * |
||
144 | * @return object[] |
||
145 | */ |
||
146 | 1 | private function searchUsers() |
|
162 | |||
163 | /** |
||
164 | * Outputs the suces after the cleanup. |
||
165 | * |
||
166 | * @param $processed |
||
167 | * @param OutputInterface $output |
||
168 | */ |
||
169 | 1 | private function displaySuccess($processed, OutputInterface $output) |
|
173 | |||
174 | /** |
||
175 | * Simple utility to query users by a given criteria. |
||
176 | * |
||
177 | * As there's no unified query language defined in doctrine/common, the criteria tool of doctrine/collections |
||
178 | * should help. The ORM and Mongo-ODM support the `Selectable` API which means that they can build native |
||
179 | * DB queries for their database based on a criteria object. The other official implementations PHPCR and CouchDB-ODM |
||
180 | * don't support that, so they have to be evaluated manually. |
||
181 | * |
||
182 | * @param Criteria $criteria |
||
183 | * |
||
184 | * @return object[] |
||
185 | */ |
||
186 | 1 | private function getUsersByCriteria(Criteria $criteria) |
|
199 | } |
||
200 |
This check looks at variables that are passed out again to other methods.
If the outgoing method call has stricter type requirements than the method itself, an issue is raised.
An additional type check may prevent trouble.