What's the right way to do it?


On 13 April 2014 17:42, José Lorenzo Rodríguez <notifications@github.com>wrote:

> In src/Cache/Cache.php:
>
> > + *
> > + * @param array $data An array of data to be stored in the cache
> > + * @param string $config Optional string configuration name to write to. Defaults to 'default'
> > + * @return array of bools for each key provided, indicated true for success or false for fail
> > + * @throws \Cake\Error\Exception
> > + */
> > +	public static function writeMany($data, $config = 'default') {
> > +		$engine = static::engine($config);
> > +		if (!$engine) {
> > +			return false;
> > +		}
> > +
> > +		$return = $engine->writeMany($data);
> > +		foreach ($return as $key => $success) {
> > +			if ($success === false && !empty($data[$key])) {
> > +				throw new Error\Exception(sprintf('%s cache was unable to write \'%s\' to %s cache', $config, $key, get_class($engine)));
>
> This line looks way too long, could you please shorten it a bit? Putting
> function arguments in different lines could work
>
> --
> Reply to this email directly or view it on GitHub<https://github.com/cakephp/cakephp/pull/3278/files#r11565745>
> .
>