Skip to content

Commit abc735e

Browse files
author
vcorre
committed
Remove old & unused args
1 parent a5ad254 commit abc735e

File tree

1 file changed

+31
-31
lines changed

1 file changed

+31
-31
lines changed

src/Proxy/PheanstalkProxy.php

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@ class PheanstalkProxy implements PheanstalkProxyInterface
3333
*/
3434
protected $pheanstalk;
3535

36-
/** @var $currentClass PheanstalkInterface */
36+
/**
37+
* @var $currentClass PheanstalkInterface
38+
*/
3739
private $currentClass;
3840

3941
/**
@@ -65,7 +67,7 @@ public function getCurrentClass(): PheanstalkInterface
6567
/**
6668
* @param PheanstalkInterface $currentClass
6769
*
68-
* @return Pheanstalk
70+
* @return PheanstalkInterface
6971
*/
7072
public function setCurrentClass(PheanstalkInterface $currentClass): PheanstalkInterface
7173
{
@@ -78,19 +80,17 @@ public function setCurrentClass(PheanstalkInterface $currentClass): PheanstalkIn
7880
*/
7981
public function delete(Workflow $workflow)
8082
{
81-
$this->dispatch(new CommandEvent($this, ['workflow' => $workflow]), CommandEvent::DELETE);
83+
$this->dispatch(new CommandEvent($this, ['workflow' => $workflow])/*, CommandEvent::DELETE*/);
8284

83-
$this->pheanstalk->delete($workflow);
84-
85-
return $this;
85+
return $this->pheanstalk->delete($workflow);
8686
}
8787

8888
/**
8989
* {@inheritDoc}
9090
*/
9191
public function workflowExists($name)
9292
{
93-
$this->dispatch(new CommandEvent($this, ['name' => $name]), CommandEvent::WORKFLOW_EXISTS);
93+
$this->dispatch(new CommandEvent($this, ['name' => $name])/*, CommandEvent::WORKFLOW_EXISTS*/);
9494

9595
return $this->pheanstalk->workflowExists($name);
9696
}
@@ -100,7 +100,7 @@ public function workflowExists($name)
100100
*/
101101
public function getWorkflow(Workflow $workflow)
102102
{
103-
$this->dispatch(new CommandEvent($this, ['workflow' => $workflow]), CommandEvent::TASK_EXISTS);
103+
$this->dispatch(new CommandEvent($this, ['workflow' => $workflow])/*, CommandEvent::TASK_EXISTS*/);
104104

105105
return $this->pheanstalk->getWorkflow($workflow);
106106
}
@@ -113,7 +113,7 @@ public function getWorkflowInstances(?Workflow $workflow = null, ?string $status
113113
$this->dispatch(new CommandEvent($this, [
114114
'workflow' => $workflow,
115115
'status' => $status
116-
]), CommandEvent::WORKFLOW_INSTANCES);
116+
])/*, CommandEvent::WORKFLOW_INSTANCES*/);
117117

118118

119119
return $this->pheanstalk->getWorkflowInstances($workflow, $status);
@@ -124,8 +124,8 @@ public function getWorkflowInstances(?Workflow $workflow = null, ?string $status
124124
*/
125125
public function getWorkflowInstancesDetails(WorkflowInstance $workflowInstance)
126126
{
127-
$this->dispatch(new CommandEvent($this, ['workflowInstance' => $workflowInstance]),
128-
CommandEvent::WORKFLOW_INSTANCES_DETAILS);
127+
$this->dispatch(new CommandEvent($this, ['workflowInstance' => $workflowInstance])/*,
128+
CommandEvent::WORKFLOW_INSTANCES_DETAILS*/);
129129

130130
return $this->pheanstalk->getWorkflowInstancesDetails($workflowInstance);
131131
}
@@ -135,7 +135,7 @@ public function getWorkflowInstancesDetails(WorkflowInstance $workflowInstance)
135135
*/
136136
public function tubeExists($name)
137137
{
138-
$this->dispatch(new CommandEvent($this, ['name' => $name]), CommandEvent::TUBE_EXISTS);
138+
$this->dispatch(new CommandEvent($this, ['name' => $name])/*, CommandEvent::TUBE_EXISTS*/);
139139

140140
return $this->pheanstalk->tubeExists($name);
141141
}
@@ -145,7 +145,7 @@ public function tubeExists($name)
145145
*/
146146
public function listTubes()
147147
{
148-
$this->dispatch(new CommandEvent($this), CommandEvent::LIST_TUBES);
148+
$this->dispatch(new CommandEvent($this)/*, CommandEvent::LIST_TUBES*/);
149149

150150
return $this->pheanstalk->listTubes();
151151
}
@@ -155,7 +155,7 @@ public function listTubes()
155155
*/
156156
public function peek()
157157
{
158-
$this->dispatch(new CommandEvent($this), CommandEvent::PEEK);
158+
$this->dispatch(new CommandEvent($this)/*, CommandEvent::PEEK*/);
159159

160160
return $this->pheanstalk->peek();
161161
}
@@ -165,7 +165,7 @@ public function peek()
165165
*/
166166
public function put(Workflow $workflow)
167167
{
168-
$this->dispatch(new CommandEvent($this, ['workflow' => $workflow]), CommandEvent::PUT);
168+
$this->dispatch(new CommandEvent($this, ['workflow' => $workflow])/*, CommandEvent::PUT*/);
169169

170170
return $this->pheanstalk->put($workflow);
171171
}
@@ -175,7 +175,7 @@ public function put(Workflow $workflow)
175175
*/
176176
public function statsTube(Tube $tube)
177177
{
178-
$this->dispatch(new CommandEvent($this, ['tube' => $tube]), CommandEvent::STATS_TUBE);
178+
$this->dispatch(new CommandEvent($this, ['tube' => $tube])/*, CommandEvent::STATS_TUBE*/);
179179

180180
return $this->pheanstalk->statsTube($tube);
181181
}
@@ -185,7 +185,7 @@ public function statsTube(Tube $tube)
185185
*/
186186
public function stats()
187187
{
188-
$this->dispatch(new CommandEvent($this), CommandEvent::STATS);
188+
$this->dispatch(new CommandEvent($this)/*, CommandEvent::STATS*/);
189189

190190
return $this->pheanstalk->stats();
191191
}
@@ -248,7 +248,7 @@ public function setName($name)
248248
*/
249249
public function create(Workflow $workflow, $force = false): Workflow
250250
{
251-
$this->dispatch(new CommandEvent($this, ['workflow' => $workflow]), CommandEvent::CREATE_WORKFLOW);
251+
$this->dispatch(new CommandEvent($this, ['workflow' => $workflow])/*, CommandEvent::CREATE_WORKFLOW*/);
252252

253253
$workflow = $this->pheanstalk->create($workflow);
254254
return $workflow;
@@ -259,7 +259,7 @@ public function create(Workflow $workflow, $force = false): Workflow
259259
*/
260260
public function update(Workflow $workflow): Workflow
261261
{
262-
$this->dispatch(new CommandEvent($this, ['workflow' => $workflow]), CommandEvent::UPDATE_WORKFLOW);
262+
$this->dispatch(new CommandEvent($this, ['workflow' => $workflow])/*, CommandEvent::UPDATE_WORKFLOW*/);
263263

264264
return $this->pheanstalk->update($workflow);
265265
}
@@ -271,7 +271,7 @@ public function createSchedule(Schedule $schedule)
271271
{
272272
$this->dispatch(new CommandEvent($this, [
273273
'schedule' => $schedule,
274-
]), CommandEvent::CREATE_SCHEDULE);
274+
])/*, CommandEvent::CREATE_SCHEDULE*/);
275275

276276
$workflowSchedule = $this->pheanstalk->createSchedule($schedule);
277277
return $workflowSchedule;
@@ -284,7 +284,7 @@ public function deleteSchedule(Schedule $schedule)
284284
{
285285
$this->dispatch(new CommandEvent($this, [
286286
'schedule' => $schedule,
287-
]), CommandEvent::DELETE_SCHEDULE);
287+
])/*, CommandEvent::DELETE_SCHEDULE*/);
288288

289289
return $this->pheanstalk->deleteSchedule($schedule);
290290
}
@@ -296,7 +296,7 @@ public function getSchedule(int $schedule)
296296
{
297297
$this->dispatch(new CommandEvent($this, [
298298
'schedule' => $schedule,
299-
]), CommandEvent::GET_SCHEDULE);
299+
])/*, CommandEvent::GET_SCHEDULE*/);
300300

301301
return $this->pheanstalk->getSchedule($schedule);
302302
}
@@ -308,7 +308,7 @@ public function updateSchedule(Schedule $schedule): Schedule
308308
{
309309
$this->dispatch(new CommandEvent($this, [
310310
'schedule' => $schedule,
311-
]), CommandEvent::UPDATE_SCHEDULE);
311+
])/*, CommandEvent::UPDATE_SCHEDULE*/);
312312

313313
return $this->pheanstalk->updateSchedule($schedule);
314314
}
@@ -318,7 +318,7 @@ public function updateSchedule(Schedule $schedule): Schedule
318318
*/
319319
public function listSchedules()
320320
{
321-
$this->dispatch(new CommandEvent($this, []), CommandEvent::LIST_SCHEDULE);
321+
$this->dispatch(new CommandEvent($this, [])/*, CommandEvent::LIST_SCHEDULE*/);
322322

323323
return $this->pheanstalk->listSchedules();
324324
}
@@ -338,7 +338,7 @@ public function createTask(string $name, string $group, string $path, $queue = '
338338
'host' => $host,
339339
'comment' => $comment
340340
];
341-
$this->dispatch(new CommandEvent($this, $datas), CommandEvent::CREATE_TASK);
341+
$this->dispatch(new CommandEvent($this, $datas)/*, CommandEvent::CREATE_TASK*/);
342342

343343

344344
return $this->pheanstalk->createTask($name, $group, $path, $queue, $useAgent, $user, $host, $comment);
@@ -349,7 +349,7 @@ public function createTask(string $name, string $group, string $path, $queue = '
349349
*/
350350
public function createTube(Tube $tube): Tube
351351
{
352-
$this->dispatch(new CommandEvent($this, ['tube' => $tube]), CommandEvent::CREATE_TUBE);
352+
$this->dispatch(new CommandEvent($this, ['tube' => $tube])/*, CommandEvent::CREATE_TUBE*/);
353353

354354
return $this->pheanstalk->createTube($tube);
355355
}
@@ -359,7 +359,7 @@ public function createTube(Tube $tube): Tube
359359
*/
360360
public function updateTube(Tube $tube): Tube
361361
{
362-
$this->dispatch(new CommandEvent($this, ['tube' => $tube]), CommandEvent::UPDATE_TUBE);
362+
$this->dispatch(new CommandEvent($this, ['tube' => $tube])/*, CommandEvent::UPDATE_TUBE*/);
363363

364364
return $this->pheanstalk->updateTube($tube);
365365
}
@@ -369,14 +369,14 @@ public function updateTube(Tube $tube): Tube
369369
*/
370370
public function cancel(WorkflowInstance $workflowInstance)
371371
{
372-
$this->dispatch(new CommandEvent($this, ['workflowInstance' => $workflowInstance]), CommandEvent::CANCEL);
372+
$this->dispatch(new CommandEvent($this, ['workflowInstance' => $workflowInstance])/*, CommandEvent::CANCEL*/);
373373

374374
return $this->pheanstalk->cancel($workflowInstance);
375375
}
376376

377377
public function kill(WorkflowInstance $workflowInstance, TaskInstance $taskInstance)
378378
{
379-
$this->dispatch(new CommandEvent($this, ['workflowInstance' => $workflowInstance, 'taskInstance' => $taskInstance]), CommandEvent::CANCEL);
379+
$this->dispatch(new CommandEvent($this, ['workflowInstance' => $workflowInstance, 'taskInstance' => $taskInstance])/*, CommandEvent::CANCEL*/);
380380

381381
return $this->pheanstalk->kill($workflowInstance, $taskInstance);
382382
}
@@ -385,10 +385,10 @@ public function kill(WorkflowInstance $workflowInstance, TaskInstance $taskInsta
385385
* @param CommandEvent $commandEvent
386386
* @param string|null $eventName
387387
*/
388-
protected function dispatch(CommandEvent $commandEvent, string $eventName = null)
388+
protected function dispatch(CommandEvent $commandEvent/*, string $eventName = null*/)
389389
{
390390
if ($this->dispatcher) {
391-
$this->dispatcher->dispatch($commandEvent, $eventName);
391+
$this->dispatcher->dispatch($commandEvent/*, $eventName */);
392392
}
393393
}
394394
}

0 commit comments

Comments
 (0)