"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "public_html/lists/base/vendor/symfony/symfony/src/Symfony/Component/Workflow/Registry.php" between
phplist-3.4.5.tgz and phplist-3.4.6.tgz

About: phpList is a one-way email announcement delivery system for newsletters, publicity lists, notifications, and many other uses (requires PHP and MySQL).

Registry.php  (phplist-3.4.5.tgz):Registry.php  (phplist-3.4.6.tgz)
skipping to change at line 27 skipping to change at line 27
/** /**
* @author Fabien Potencier <fabien@symfony.com> * @author Fabien Potencier <fabien@symfony.com>
* @author Grégoire Pineau <lyrixx@lyrixx.info> * @author Grégoire Pineau <lyrixx@lyrixx.info>
*/ */
class Registry class Registry
{ {
private $workflows = []; private $workflows = [];
/** /**
* @param Workflow $workflow
* @param string|SupportStrategyInterface $supportStrategy * @param string|SupportStrategyInterface $supportStrategy
*/ */
public function add(Workflow $workflow, $supportStrategy) public function add(Workflow $workflow, $supportStrategy)
{ {
if (!$supportStrategy instanceof SupportStrategyInterface) { if (!$supportStrategy instanceof SupportStrategyInterface) {
@trigger_error('Support of class name string was deprecated after ve rsion 3.2 and won\'t work anymore in 4.0.', E_USER_DEPRECATED); @trigger_error('Support of class name string was deprecated after ve rsion 3.2 and won\'t work anymore in 4.0.', E_USER_DEPRECATED);
$supportStrategy = new ClassInstanceSupportStrategy($supportStrategy ); $supportStrategy = new ClassInstanceSupportStrategy($supportStrategy );
} }
skipping to change at line 67 skipping to change at line 66
} }
} }
if (!$matched) { if (!$matched) {
throw new InvalidArgumentException(sprintf('Unable to find a workflo w for class "%s".', \get_class($subject))); throw new InvalidArgumentException(sprintf('Unable to find a workflo w for class "%s".', \get_class($subject)));
} }
return $matched; return $matched;
} }
/**
* @param SupportStrategyInterface $supportStrategy
* @param object $subject
* @param string|null $workflowName
*
* @return bool
*/
private function supports(Workflow $workflow, $supportStrategy, $subject, $w orkflowName) private function supports(Workflow $workflow, $supportStrategy, $subject, $w orkflowName)
{ {
if (null !== $workflowName && $workflowName !== $workflow->getName()) { if (null !== $workflowName && $workflowName !== $workflow->getName()) {
return false; return false;
} }
return $supportStrategy->supports($workflow, $subject); return $supportStrategy->supports($workflow, $subject);
} }
} }
 End of changes. 2 change blocks. 
1 lines changed or deleted 7 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)