src/SWP/Bundle/ContentBundle/Rule/Applicator/ArticleRuleApplicator.php 1 location
|
@@ 125-138 (lines=14) @@
|
| 122 |
|
$resolver->setDefined($this->supportedKeys[0]); |
| 123 |
|
} |
| 124 |
|
|
| 125 |
|
private function isAllowedType(RuleSubjectInterface $subject) |
| 126 |
|
{ |
| 127 |
|
if (!$subject instanceof ArticleInterface) { |
| 128 |
|
$this->logger->warning(sprintf( |
| 129 |
|
'"%s" is not supported by "%s" rule applicator!', |
| 130 |
|
is_object($subject) ? get_class($subject) : gettype($subject), |
| 131 |
|
get_class($this) |
| 132 |
|
)); |
| 133 |
|
|
| 134 |
|
return false; |
| 135 |
|
} |
| 136 |
|
|
| 137 |
|
return true; |
| 138 |
|
} |
| 139 |
|
} |
| 140 |
|
|
src/SWP/Bundle/CoreBundle/Rule/Applicator/PackageRuleApplicator.php 1 location
|
@@ 102-115 (lines=14) @@
|
| 99 |
|
/** |
| 100 |
|
* {@inheritdoc} |
| 101 |
|
*/ |
| 102 |
|
public function isSupported(RuleSubjectInterface $subject) |
| 103 |
|
{ |
| 104 |
|
if (!$subject instanceof PackageInterface && 'package' === $subject->getSubjectType()) { |
| 105 |
|
$this->logger->warning(sprintf( |
| 106 |
|
'"%s" is not supported by "%s" rule applicator!', |
| 107 |
|
is_object($subject) ? get_class($subject) : gettype($subject), |
| 108 |
|
get_class($this) |
| 109 |
|
)); |
| 110 |
|
|
| 111 |
|
return false; |
| 112 |
|
} |
| 113 |
|
|
| 114 |
|
return true; |
| 115 |
|
} |
| 116 |
|
|
| 117 |
|
private function validateDestinationConfig(array $config) |
| 118 |
|
{ |