Completed
Push — master ( 94be7a...bb81d5 )
by Aske
11s
created
Classes/MOC/SynchronizeUrl/Package.php 2 patches
Indentation   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -10,29 +10,29 @@
 block discarded – undo
10 10
 
11 11
 class Package extends BasePackage
12 12
 {
13
-    /**
14
-     * Invokes custom PHP code directly after the package manager has been initialized.
15
-     *
16
-     * @param Bootstrap $bootstrap The current bootstrap
17
-     * @return void
18
-     */
19
-    public function boot(Bootstrap $bootstrap)
20
-    {
21
-        $dispatcher = $bootstrap->getSignalSlotDispatcher();
22
-        $newUriPathSegment = null;
23
-        $dispatcher->connect(
24
-            Node::class,
25
-            'nodePropertyChanged',
26
-            function (Node $node, $propertyName, $oldValue, $newValue) use ($bootstrap, &$newUriPathSegment) {
27
-                if ($propertyName === 'title' && $node->getNodeType()->isOfType('Neos.Neos:Document')) {
28
-                    $nodeUriPathSegmentGenerator = $bootstrap->getObjectManager()->get(NodeUriPathSegmentGenerator::class);
29
-                    $newUriPathSegment = strtolower($nodeUriPathSegmentGenerator->generateUriPathSegment($node));
30
-                    $node->setProperty('uriPathSegment', $newUriPathSegment);
31
-                    $bootstrap->getObjectManager()->get(RouteCacheFlusher::class)->registerNodeChange($node);
32
-                } elseif ($propertyName === 'uriPathSegment' && $newUriPathSegment !== null && $newValue !== $newUriPathSegment) {
33
-                    $node->setProperty('uriPathSegment', $newUriPathSegment);
34
-                    $newUriPathSegment = null;
35
-                }
36
-            });
37
-    }
13
+	/**
14
+	 * Invokes custom PHP code directly after the package manager has been initialized.
15
+	 *
16
+	 * @param Bootstrap $bootstrap The current bootstrap
17
+	 * @return void
18
+	 */
19
+	public function boot(Bootstrap $bootstrap)
20
+	{
21
+		$dispatcher = $bootstrap->getSignalSlotDispatcher();
22
+		$newUriPathSegment = null;
23
+		$dispatcher->connect(
24
+			Node::class,
25
+			'nodePropertyChanged',
26
+			function (Node $node, $propertyName, $oldValue, $newValue) use ($bootstrap, &$newUriPathSegment) {
27
+				if ($propertyName === 'title' && $node->getNodeType()->isOfType('Neos.Neos:Document')) {
28
+					$nodeUriPathSegmentGenerator = $bootstrap->getObjectManager()->get(NodeUriPathSegmentGenerator::class);
29
+					$newUriPathSegment = strtolower($nodeUriPathSegmentGenerator->generateUriPathSegment($node));
30
+					$node->setProperty('uriPathSegment', $newUriPathSegment);
31
+					$bootstrap->getObjectManager()->get(RouteCacheFlusher::class)->registerNodeChange($node);
32
+				} elseif ($propertyName === 'uriPathSegment' && $newUriPathSegment !== null && $newValue !== $newUriPathSegment) {
33
+					$node->setProperty('uriPathSegment', $newUriPathSegment);
34
+					$newUriPathSegment = null;
35
+				}
36
+			});
37
+	}
38 38
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
         $dispatcher->connect(
24 24
             Node::class,
25 25
             'nodePropertyChanged',
26
-            function (Node $node, $propertyName, $oldValue, $newValue) use ($bootstrap, &$newUriPathSegment) {
26
+            function(Node $node, $propertyName, $oldValue, $newValue) use ($bootstrap, &$newUriPathSegment) {
27 27
                 if ($propertyName === 'title' && $node->getNodeType()->isOfType('Neos.Neos:Document')) {
28 28
                     $nodeUriPathSegmentGenerator = $bootstrap->getObjectManager()->get(NodeUriPathSegmentGenerator::class);
29 29
                     $newUriPathSegment = strtolower($nodeUriPathSegmentGenerator->generateUriPathSegment($node));
Please login to merge, or discard this patch.