wa0x6e / Cake-Resque

Resque plugin for CakePHP : for creating background jobs that can be processed offline later
MIT License
159 stars 56 forks source link

Avoid call_user_func_array() calls. #39

Closed bar closed 10 years ago

bar commented 10 years ago

Is there a reason for doing this:

$result = call_user_func_array(
  self::$cakeResque . '::enqueue',
array($this->args[0], $this->args[1], explode(',', $this->args[2]))
);

instead of:

$result = cakeResque::enqueue($this->args[0], $this->args[1], explode(',', $this->args[2]));
wa0x6e commented 10 years ago

For mocking the cakeresque class in the tests

bar commented 10 years ago

Is it safe to change all the CakeResqueShell::$cakeResque to self::$cakeResque then?

wa0x6e commented 10 years ago

Where ?

bar commented 10 years ago

Inside CakeResqueShell.

wa0x6e commented 10 years ago

Yeah

bar commented 10 years ago

It seems all PHP 5.3 will fail ;( https://travis-ci.org/bar/Cake-Resque/builds/13653348

wa0x6e commented 10 years ago

Probably that's why I didn't do that

bar commented 10 years ago

The thing is... there were some of them there, maybe they had no associated tests.