@@ -53,18 +53,18 @@ discard block |
||
| 53 | 53 | ]; |
| 54 | 54 | |
| 55 | 55 | protected const reverseTagMap = [ |
| 56 | - self::tagsMap[ self::xml ] => self::xml, |
|
| 57 | - self::tagsMap[ self::percent_double_curly ] => self::percent_double_curly, |
|
| 58 | - self::tagsMap[ self::twig ] => self::twig, |
|
| 59 | - self::tagsMap[ self::ruby_on_rails ] => self::ruby_on_rails, |
|
| 60 | - self::tagsMap[ self::double_snail ] => self::double_snail, |
|
| 61 | - self::tagsMap[ self::double_square ] => self::double_square, |
|
| 62 | - self::tagsMap[ self::dollar_curly ] => self::dollar_curly, |
|
| 63 | - self::tagsMap[ self::single_curly ] => self::single_curly, |
|
| 64 | - self::tagsMap[ self::objective_c_ns ] => self::objective_c_ns, |
|
| 65 | - self::tagsMap[ self::double_percent ] => self::double_percent, |
|
| 66 | - self::tagsMap[ self::square_sprintf ] => self::square_sprintf, |
|
| 67 | - self::tagsMap[ self::sprintf ] => self::sprintf, |
|
| 56 | + self::tagsMap[self::xml] => self::xml, |
|
| 57 | + self::tagsMap[self::percent_double_curly] => self::percent_double_curly, |
|
| 58 | + self::tagsMap[self::twig] => self::twig, |
|
| 59 | + self::tagsMap[self::ruby_on_rails] => self::ruby_on_rails, |
|
| 60 | + self::tagsMap[self::double_snail] => self::double_snail, |
|
| 61 | + self::tagsMap[self::double_square] => self::double_square, |
|
| 62 | + self::tagsMap[self::dollar_curly] => self::dollar_curly, |
|
| 63 | + self::tagsMap[self::single_curly] => self::single_curly, |
|
| 64 | + self::tagsMap[self::objective_c_ns] => self::objective_c_ns, |
|
| 65 | + self::tagsMap[self::double_percent] => self::double_percent, |
|
| 66 | + self::tagsMap[self::square_sprintf] => self::square_sprintf, |
|
| 67 | + self::tagsMap[self::sprintf] => self::sprintf, |
|
| 68 | 68 | ]; |
| 69 | 69 | |
| 70 | 70 | /** |
@@ -72,8 +72,8 @@ discard block |
||
| 72 | 72 | * |
| 73 | 73 | * @return string|null |
| 74 | 74 | */ |
| 75 | - public static function classForTagName( ?string $name ): ?string { |
|
| 76 | - return self::tagsMap[ $name ] ?? null; |
|
| 75 | + public static function classForTagName(?string $name): ?string { |
|
| 76 | + return self::tagsMap[$name] ?? null; |
|
| 77 | 77 | } |
| 78 | 78 | |
| 79 | 79 | /** |
@@ -85,18 +85,18 @@ discard block |
||
| 85 | 85 | * @return array|null An array of handler class names corresponding to the provided tag names, |
| 86 | 86 | * or null if the input is null. |
| 87 | 87 | */ |
| 88 | - public static function classesForArrayTagNames( ?array $tagNames = [] ): ?array { |
|
| 88 | + public static function classesForArrayTagNames(?array $tagNames = []): ?array { |
|
| 89 | 89 | |
| 90 | - if ( $tagNames === null ) { |
|
| 90 | + if ($tagNames === null) { |
|
| 91 | 91 | return null; |
| 92 | 92 | } |
| 93 | 93 | |
| 94 | 94 | // Map tags to handler class names using the enum |
| 95 | 95 | return array_values( |
| 96 | 96 | array_filter( |
| 97 | - array_map( static function ( string $tag ) { |
|
| 98 | - return self::classForTagName( $tag ); |
|
| 99 | - }, $tagNames ) |
|
| 97 | + array_map(static function(string $tag) { |
|
| 98 | + return self::classForTagName($tag); |
|
| 99 | + }, $tagNames) |
|
| 100 | 100 | ) |
| 101 | 101 | ); |
| 102 | 102 | } |
@@ -107,7 +107,7 @@ discard block |
||
| 107 | 107 | * @return array An array of tag keys. |
| 108 | 108 | */ |
| 109 | 109 | public static function getTags(): array { |
| 110 | - return array_keys( self::tagsMap ); |
|
| 110 | + return array_keys(self::tagsMap); |
|
| 111 | 111 | } |
| 112 | 112 | |
| 113 | 113 | |
@@ -118,8 +118,8 @@ discard block |
||
| 118 | 118 | * |
| 119 | 119 | * @return string|null The class name associated with the provided tag, or null if no association exists. |
| 120 | 120 | */ |
| 121 | - public static function tagForClassName( string $tag ): ?string { |
|
| 122 | - return self::reverseTagMap[ $tag ] ?? null; |
|
| 121 | + public static function tagForClassName(string $tag): ?string { |
|
| 122 | + return self::reverseTagMap[$tag] ?? null; |
|
| 123 | 123 | } |
| 124 | 124 | |
| 125 | 125 | /** |
@@ -130,17 +130,17 @@ discard block |
||
| 130 | 130 | * |
| 131 | 131 | * @return array|null An array of tag names or null if the input is null. |
| 132 | 132 | */ |
| 133 | - public static function tagNamesForArrayClasses( ?array $classNames = [] ): ?array { |
|
| 133 | + public static function tagNamesForArrayClasses(?array $classNames = []): ?array { |
|
| 134 | 134 | |
| 135 | - if ( $classNames === null ) { |
|
| 135 | + if ($classNames === null) { |
|
| 136 | 136 | return null; |
| 137 | 137 | } |
| 138 | 138 | |
| 139 | 139 | return array_values( |
| 140 | 140 | array_filter( |
| 141 | - array_map( static function ( string $className ) { |
|
| 142 | - return self::tagForClassName( $className ); |
|
| 143 | - }, $classNames ) |
|
| 141 | + array_map(static function(string $className) { |
|
| 142 | + return self::tagForClassName($className); |
|
| 143 | + }, $classNames) |
|
| 144 | 144 | ) |
| 145 | 145 | ); |
| 146 | 146 | } |
@@ -40,18 +40,18 @@ discard block |
||
| 40 | 40 | * @var array[] A map of handler class names to their integer priority and whether they are enabled by default. |
| 41 | 41 | */ |
| 42 | 42 | protected const injectableHandlersOrder = [ |
| 43 | - XmlToPh::class => [ 'position' => 0, 'default_enabled' => true ], |
|
| 44 | - PercentDoubleCurlyBrackets::class => [ 'position' => 1, 'default_enabled' => true ], |
|
| 45 | - TwigToPh::class => [ 'position' => 2, 'default_enabled' => true ], |
|
| 46 | - RubyOnRailsI18n::class => [ 'position' => 3, 'default_enabled' => true ], |
|
| 47 | - Snails::class => [ 'position' => 4, 'default_enabled' => true ], |
|
| 48 | - DoubleSquareBrackets::class => [ 'position' => 5, 'default_enabled' => true ], |
|
| 49 | - DollarCurlyBrackets::class => [ 'position' => 6, 'default_enabled' => true ], |
|
| 50 | - SingleCurlyBracketsToPh::class => [ 'position' => 7, 'default_enabled' => false ], // Disabled by default because it may conflict with other curly braces handlers |
|
| 51 | - ObjectiveCNSString::class => [ 'position' => 8, 'default_enabled' => true ], |
|
| 52 | - DoublePercentages::class => [ 'position' => 9, 'default_enabled' => true ], |
|
| 53 | - SquareSprintf::class => [ 'position' => 10, 'default_enabled' => true ], |
|
| 54 | - SprintfToPH::class => [ 'position' => 11, 'default_enabled' => true ], |
|
| 43 | + XmlToPh::class => ['position' => 0, 'default_enabled' => true], |
|
| 44 | + PercentDoubleCurlyBrackets::class => ['position' => 1, 'default_enabled' => true], |
|
| 45 | + TwigToPh::class => ['position' => 2, 'default_enabled' => true], |
|
| 46 | + RubyOnRailsI18n::class => ['position' => 3, 'default_enabled' => true], |
|
| 47 | + Snails::class => ['position' => 4, 'default_enabled' => true], |
|
| 48 | + DoubleSquareBrackets::class => ['position' => 5, 'default_enabled' => true], |
|
| 49 | + DollarCurlyBrackets::class => ['position' => 6, 'default_enabled' => true], |
|
| 50 | + SingleCurlyBracketsToPh::class => ['position' => 7, 'default_enabled' => false], // Disabled by default because it may conflict with other curly braces handlers |
|
| 51 | + ObjectiveCNSString::class => ['position' => 8, 'default_enabled' => true], |
|
| 52 | + DoublePercentages::class => ['position' => 9, 'default_enabled' => true], |
|
| 53 | + SquareSprintf::class => ['position' => 10, 'default_enabled' => true], |
|
| 54 | + SprintfToPH::class => ['position' => 11, 'default_enabled' => true], |
|
| 55 | 55 | ]; |
| 56 | 56 | |
| 57 | 57 | /** |
@@ -60,8 +60,8 @@ discard block |
||
| 60 | 60 | * @return array The array of handlers that are enabled by default. |
| 61 | 61 | */ |
| 62 | 62 | public static function getDefaultInjectedHandlers(): array { |
| 63 | - return array_filter( self::injectableHandlersOrder, function ( $settings ) { |
|
| 64 | - return $settings[ 'default_enabled' ]; |
|
| 63 | + return array_filter(self::injectableHandlersOrder, function($settings) { |
|
| 64 | + return $settings['default_enabled']; |
|
| 65 | 65 | } ); |
| 66 | 66 | } |
| 67 | 67 | |
@@ -84,13 +84,13 @@ discard block |
||
| 84 | 84 | * |
| 85 | 85 | * @param class-string[] $injectedHandlers An array of handler class names to be sorted. |
| 86 | 86 | */ |
| 87 | - public function __construct( array $injectedHandlers = [] ) { |
|
| 87 | + public function __construct(array $injectedHandlers = []) { |
|
| 88 | 88 | |
| 89 | 89 | // Start with the default order of handlers. |
| 90 | 90 | $this->defaultInjectedHandlers = self::injectableHandlersOrder; |
| 91 | 91 | |
| 92 | 92 | // Sort the final list of handlers according to their predefined execution order. |
| 93 | - $this->injectedHandlers = $this->quickSort( $injectedHandlers ); |
|
| 93 | + $this->injectedHandlers = $this->quickSort($injectedHandlers); |
|
| 94 | 94 | |
| 95 | 95 | } |
| 96 | 96 | |
@@ -105,16 +105,16 @@ discard block |
||
| 105 | 105 | * |
| 106 | 106 | * @return string[] The sorted list of handler class names based on their priorities. |
| 107 | 107 | */ |
| 108 | - private function quickSort( array $handlersList ): array { |
|
| 108 | + private function quickSort(array $handlersList): array { |
|
| 109 | 109 | // Filter the list to include only valid handlers. |
| 110 | - $filteredHandlers = array_filter( $handlersList, function ( $handler ) { |
|
| 111 | - return array_key_exists( $handler, $this->defaultInjectedHandlers ); |
|
| 110 | + $filteredHandlers = array_filter($handlersList, function($handler) { |
|
| 111 | + return array_key_exists($handler, $this->defaultInjectedHandlers); |
|
| 112 | 112 | } ); |
| 113 | 113 | |
| 114 | 114 | // Sort the handlers based on their priority using a custom comparison function. |
| 115 | - usort( $filteredHandlers, function ( $a, $b ) { |
|
| 115 | + usort($filteredHandlers, function($a, $b) { |
|
| 116 | 116 | // The spaceship operator (<=>) returns -1, 0, or 1, which is what usort expects. |
| 117 | - return $this->defaultInjectedHandlers[ $a ] <=> $this->defaultInjectedHandlers[ $b ]; |
|
| 117 | + return $this->defaultInjectedHandlers[$a] <=> $this->defaultInjectedHandlers[$b]; |
|
| 118 | 118 | } ); |
| 119 | 119 | |
| 120 | 120 | return $filteredHandlers; |
@@ -90,7 +90,7 @@ discard block |
||
| 90 | 90 | * |
| 91 | 91 | * @return T The configured instance of the filter. |
| 92 | 92 | */ |
| 93 | - public static function getInstance( FeatureSetInterface $featureSet, ?string $source = null, ?string $target = null, ?array $dataRefMap = [], ?array $handlerTagNamesForLayer0ToLayer1Transition = [] ): ?AbstractFilter { |
|
| 93 | + public static function getInstance(FeatureSetInterface $featureSet, ?string $source = null, ?string $target = null, ?array $dataRefMap = [], ?array $handlerTagNamesForLayer0ToLayer1Transition = []): ?AbstractFilter { |
|
| 94 | 94 | // Create a new instance of the specific filter class (e.g., MateCatFilter). |
| 95 | 95 | $newInstance = new static(); |
| 96 | 96 | |
@@ -101,20 +101,20 @@ discard block |
||
| 101 | 101 | // Use the null coalescing operator to default to an empty array if $dataRefMap is null. |
| 102 | 102 | $newInstance->dataRefMap = $dataRefMap ?? []; |
| 103 | 103 | |
| 104 | - $handlerClassNamesForLayer0ToLayer1Transition = FiltersTagsEnum::classesForArrayTagNames( $handlerTagNamesForLayer0ToLayer1Transition ); |
|
| 104 | + $handlerClassNamesForLayer0ToLayer1Transition = FiltersTagsEnum::classesForArrayTagNames($handlerTagNamesForLayer0ToLayer1Transition); |
|
| 105 | 105 | |
| 106 | 106 | // Determine which handlers to use for the Layer 0 to Layer 1 transition. |
| 107 | - if ( is_array( $handlerClassNamesForLayer0ToLayer1Transition ) && empty( $handlerClassNamesForLayer0ToLayer1Transition ) ) { |
|
| 107 | + if (is_array($handlerClassNamesForLayer0ToLayer1Transition) && empty($handlerClassNamesForLayer0ToLayer1Transition)) { |
|
| 108 | 108 | // If an empty array is passed, load the default set of handlers from the sorter. |
| 109 | - $handlerClassNamesForLayer0ToLayer1Transition = array_keys( HandlersSorter::getDefaultInjectedHandlers() ); |
|
| 110 | - } elseif ( is_null( $handlerClassNamesForLayer0ToLayer1Transition ) ) { |
|
| 109 | + $handlerClassNamesForLayer0ToLayer1Transition = array_keys(HandlersSorter::getDefaultInjectedHandlers()); |
|
| 110 | + } elseif (is_null($handlerClassNamesForLayer0ToLayer1Transition)) { |
|
| 111 | 111 | // If null is passed, use no handlers. |
| 112 | 112 | $handlerClassNamesForLayer0ToLayer1Transition = []; |
| 113 | 113 | } |
| 114 | 114 | // Otherwise, use the custom list of handlers provided. |
| 115 | 115 | |
| 116 | 116 | // Sort the dynamic feature-based handlers. |
| 117 | - $sorter = new HandlersSorter( $handlerClassNamesForLayer0ToLayer1Transition ); |
|
| 117 | + $sorter = new HandlersSorter($handlerClassNamesForLayer0ToLayer1Transition); |
|
| 118 | 118 | $newInstance->orderedHandlersForLayer0ToLayer1Transition = $sorter->getOrderedHandlersClassNames(); |
| 119 | 119 | |
| 120 | 120 | // Return the fully configured filter instance. |
@@ -132,26 +132,26 @@ discard block |
||
| 132 | 132 | * @return string The transformed segment in Layer 0 format. |
| 133 | 133 | * @throws Exception If any handler in the pipeline fails. |
| 134 | 134 | */ |
| 135 | - public function fromLayer1ToLayer0( string $segment ): string { |
|
| 135 | + public function fromLayer1ToLayer0(string $segment): string { |
|
| 136 | 136 | // Initialize a new pipeline for this transformation. |
| 137 | - $channel = new Pipeline( $this->source, $this->target, $this->dataRefMap ); |
|
| 137 | + $channel = new Pipeline($this->source, $this->target, $this->dataRefMap); |
|
| 138 | 138 | |
| 139 | 139 | // Add handlers to reverse the sub-filtering process. |
| 140 | - $channel->addLast( MateCatCustomPHToOriginalValue::class ); // Restore original PH values |
|
| 141 | - $channel->addLast( PlaceHoldXliffTags::class ); // Isolate XLIFF tags |
|
| 142 | - $channel->addLast( EncodeToRawXML::class ); // Encode for raw XML storage |
|
| 143 | - $channel->addLast( LtGtEncode::class ); // Encode '<' and '>' |
|
| 144 | - $channel->addLast( RestoreXliffTagsContent::class ); // Restore original XLIFF content |
|
| 145 | - $channel->addLast( RestorePlaceHoldersToXLIFFLtGt::class ); // Restore placeholders for '<' and '>' |
|
| 146 | - $channel->addLast( SplitPlaceholder::class ); // Handle split placeholders |
|
| 147 | - $channel->addLast( RestoreEquivText::class ); // Restore equiv-text content |
|
| 140 | + $channel->addLast(MateCatCustomPHToOriginalValue::class); // Restore original PH values |
|
| 141 | + $channel->addLast(PlaceHoldXliffTags::class); // Isolate XLIFF tags |
|
| 142 | + $channel->addLast(EncodeToRawXML::class); // Encode for raw XML storage |
|
| 143 | + $channel->addLast(LtGtEncode::class); // Encode '<' and '>' |
|
| 144 | + $channel->addLast(RestoreXliffTagsContent::class); // Restore original XLIFF content |
|
| 145 | + $channel->addLast(RestorePlaceHoldersToXLIFFLtGt::class); // Restore placeholders for '<' and '>' |
|
| 146 | + $channel->addLast(SplitPlaceholder::class); // Handle split placeholders |
|
| 147 | + $channel->addLast(RestoreEquivText::class); // Restore equiv-text content |
|
| 148 | 148 | |
| 149 | 149 | // Allow the current feature set to modify the pipeline (e.g., add or remove handlers). |
| 150 | 150 | /** @var $channel Pipeline */ |
| 151 | - $channel = $this->featureSet->filter( 'fromLayer1ToLayer0', $channel ); |
|
| 151 | + $channel = $this->featureSet->filter('fromLayer1ToLayer0', $channel); |
|
| 152 | 152 | |
| 153 | 153 | // Process the segment through the pipeline and return the result. |
| 154 | - return $channel->transform( $segment ); |
|
| 154 | + return $channel->transform($segment); |
|
| 155 | 155 | } |
| 156 | 156 | |
| 157 | 157 | |
@@ -167,7 +167,7 @@ discard block |
||
| 167 | 167 | * |
| 168 | 168 | * @return string The transformed segment after processing from Layer 0 to Layer 1. |
| 169 | 169 | */ |
| 170 | - public abstract function fromLayer0ToLayer1( string $segment, ?string $cid = null ): string; |
|
| 170 | + public abstract function fromLayer0ToLayer1(string $segment, ?string $cid = null): string; |
|
| 171 | 171 | |
| 172 | 172 | /** |
| 173 | 173 | * Configures the pipeline for transforming content from Layer 0 to Layer 1. |
@@ -182,22 +182,22 @@ discard block |
||
| 182 | 182 | * @param Pipeline $channel |
| 183 | 183 | * @param string|null $cid |
| 184 | 184 | */ |
| 185 | - protected function configureFromLayer0ToLayer1Pipeline( Pipeline $channel, ?string $cid = null ): void { |
|
| 185 | + protected function configureFromLayer0ToLayer1Pipeline(Pipeline $channel, ?string $cid = null): void { |
|
| 186 | 186 | |
| 187 | 187 | // Add initial handlers for standard XLIFF and placeholder normalization. |
| 188 | - $channel->addLast( StandardPHToMateCatCustomPH::class ); |
|
| 189 | - $channel->addLast( StandardXEquivTextToMateCatCustomPH::class ); |
|
| 190 | - $channel->addLast( PlaceHoldXliffTags::class ); |
|
| 188 | + $channel->addLast(StandardPHToMateCatCustomPH::class); |
|
| 189 | + $channel->addLast(StandardXEquivTextToMateCatCustomPH::class); |
|
| 190 | + $channel->addLast(PlaceHoldXliffTags::class); |
|
| 191 | 191 | |
| 192 | 192 | // Add the dynamic feature-based handlers. |
| 193 | - foreach ( $this->orderedHandlersForLayer0ToLayer1Transition as $handler ) { |
|
| 194 | - $channel->addLast( $handler ); |
|
| 193 | + foreach ($this->orderedHandlersForLayer0ToLayer1Transition as $handler) { |
|
| 194 | + $channel->addLast($handler); |
|
| 195 | 195 | } |
| 196 | 196 | |
| 197 | 197 | // Add final handlers to restore XLIFF content and encode for the target layer. |
| 198 | - $channel->addLast( RestoreXliffTagsContent::class ); |
|
| 199 | - $channel->addLast( RestorePlaceHoldersToXLIFFLtGt::class ); |
|
| 200 | - $channel->addLast( EquivTextToBase64::class ); |
|
| 198 | + $channel->addLast(RestoreXliffTagsContent::class); |
|
| 199 | + $channel->addLast(RestorePlaceHoldersToXLIFFLtGt::class); |
|
| 200 | + $channel->addLast(EquivTextToBase64::class); |
|
| 201 | 201 | |
| 202 | 202 | } |
| 203 | 203 | |
@@ -36,14 +36,14 @@ discard block |
||
| 36 | 36 | * |
| 37 | 37 | * @return string The transformed segment in Layer 1 format. |
| 38 | 38 | */ |
| 39 | - public function fromLayer0ToLayer1( string $segment, ?string $cid = null ): string { |
|
| 39 | + public function fromLayer0ToLayer1(string $segment, ?string $cid = null): string { |
|
| 40 | 40 | |
| 41 | - $channel = new Pipeline( $this->source, $this->target, $this->dataRefMap ); |
|
| 41 | + $channel = new Pipeline($this->source, $this->target, $this->dataRefMap); |
|
| 42 | 42 | |
| 43 | - $this->configureFromLayer0ToLayer1Pipeline( $channel, $cid ); |
|
| 43 | + $this->configureFromLayer0ToLayer1Pipeline($channel, $cid); |
|
| 44 | 44 | |
| 45 | 45 | // Process the segment and return the result. |
| 46 | - return $channel->transform( $segment ); |
|
| 46 | + return $channel->transform($segment); |
|
| 47 | 47 | |
| 48 | 48 | } |
| 49 | 49 | |
@@ -61,33 +61,33 @@ discard block |
||
| 61 | 61 | * - 'familysearch': Removes `TwigToPh` and adds `SingleCurlyBracketsToPh`. |
| 62 | 62 | * |
| 63 | 63 | */ |
| 64 | - protected function configureFromLayer0ToLayer1Pipeline( Pipeline $channel, ?string $cid = null ): void { |
|
| 64 | + protected function configureFromLayer0ToLayer1Pipeline(Pipeline $channel, ?string $cid = null): void { |
|
| 65 | 65 | |
| 66 | - parent::configureFromLayer0ToLayer1Pipeline( $channel ); |
|
| 66 | + parent::configureFromLayer0ToLayer1Pipeline($channel); |
|
| 67 | 67 | |
| 68 | - switch ( $cid ) { |
|
| 68 | + switch ($cid) { |
|
| 69 | 69 | case 'airbnb': |
| 70 | 70 | // For Airbnb, add the SmartCounts handler to process specific variable syntax |
| 71 | 71 | // that looks like `%{smart_count}`. |
| 72 | - if ( !$channel->contains( SmartCounts::class ) ) { |
|
| 73 | - $channel->addAfter( PercentDoubleCurlyBrackets::class, SmartCounts::class ); |
|
| 72 | + if (!$channel->contains(SmartCounts::class)) { |
|
| 73 | + $channel->addAfter(PercentDoubleCurlyBrackets::class, SmartCounts::class); |
|
| 74 | 74 | } |
| 75 | 75 | break; |
| 76 | 76 | |
| 77 | 77 | case 'roblox': |
| 78 | 78 | // For Roblox, add a handler to convert single curly bracket placeholders |
| 79 | 79 | // (e.g., `{placeholder}`) into standard <ph> tags. |
| 80 | - if ( !$channel->contains( SingleCurlyBracketsToPh::class ) ) { |
|
| 81 | - $channel->addAfter( DollarCurlyBrackets::class, SingleCurlyBracketsToPh::class ); |
|
| 80 | + if (!$channel->contains(SingleCurlyBracketsToPh::class)) { |
|
| 81 | + $channel->addAfter(DollarCurlyBrackets::class, SingleCurlyBracketsToPh::class); |
|
| 82 | 82 | } |
| 83 | 83 | break; |
| 84 | 84 | |
| 85 | 85 | case 'familysearch': |
| 86 | 86 | // For FamilySearch, customize the pipeline by removing Twig support and adding |
| 87 | 87 | // support for single curly bracket placeholders. |
| 88 | - if ( !$channel->contains( SingleCurlyBracketsToPh::class ) ) { |
|
| 89 | - $channel->remove( TwigToPh::class ); |
|
| 90 | - $channel->addAfter( DollarCurlyBrackets::class, SingleCurlyBracketsToPh::class ); |
|
| 88 | + if (!$channel->contains(SingleCurlyBracketsToPh::class)) { |
|
| 89 | + $channel->remove(TwigToPh::class); |
|
| 90 | + $channel->addAfter(DollarCurlyBrackets::class, SingleCurlyBracketsToPh::class); |
|
| 91 | 91 | } |
| 92 | 92 | break; |
| 93 | 93 | } |