Completed
Pull Request — master (#5)
by
unknown
14:52
created
Classes/MOC/SynchronizeUrl/Package.php 2 patches
Indentation   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -10,33 +10,33 @@
 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
-                    if (method_exists(NodeUriPathSegmentGenerator::class, 'generateUriPathSegment')) {
29
-                        $nodeUriPathSegmentGenerator = $bootstrap->getObjectManager()->get(NodeUriPathSegmentGenerator::class);
30
-                        $newUriPathSegment = strtolower($nodeUriPathSegmentGenerator->generateUriPathSegment($node));
31
-                    } else {
32
-                        $newUriPathSegment = strtolower(Utility::renderValidNodeName($node->getProperty('title') ?: $node->getName()));
33
-                    }
34
-                    $node->setProperty('uriPathSegment', $newUriPathSegment);
35
-                    $bootstrap->getObjectManager()->get(RouteCacheFlusher::class)->registerNodeChange($node);
36
-                } elseif ($propertyName === 'uriPathSegment' && $newUriPathSegment !== null && $newValue !== $newUriPathSegment) {
37
-                    $node->setProperty('uriPathSegment', $newUriPathSegment);
38
-                    $newUriPathSegment = null;
39
-                }
40
-            });
41
-    }
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
+					if (method_exists(NodeUriPathSegmentGenerator::class, 'generateUriPathSegment')) {
29
+						$nodeUriPathSegmentGenerator = $bootstrap->getObjectManager()->get(NodeUriPathSegmentGenerator::class);
30
+						$newUriPathSegment = strtolower($nodeUriPathSegmentGenerator->generateUriPathSegment($node));
31
+					} else {
32
+						$newUriPathSegment = strtolower(Utility::renderValidNodeName($node->getProperty('title') ?: $node->getName()));
33
+					}
34
+					$node->setProperty('uriPathSegment', $newUriPathSegment);
35
+					$bootstrap->getObjectManager()->get(RouteCacheFlusher::class)->registerNodeChange($node);
36
+				} elseif ($propertyName === 'uriPathSegment' && $newUriPathSegment !== null && $newValue !== $newUriPathSegment) {
37
+					$node->setProperty('uriPathSegment', $newUriPathSegment);
38
+					$newUriPathSegment = null;
39
+				}
40
+			});
41
+	}
42 42
 }
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
                     if (method_exists(NodeUriPathSegmentGenerator::class, 'generateUriPathSegment')) {
29 29
                         $nodeUriPathSegmentGenerator = $bootstrap->getObjectManager()->get(NodeUriPathSegmentGenerator::class);
Please login to merge, or discard this patch.