Passed
Push — master ( f68345...02e211 )
by Aimeos
04:32
created
src/MShop/Common/Manager/Decorator/Site.php 2 patches
Indentation   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -29,15 +29,15 @@  discard block
 block discarded – undo
29 29
 	 */
30 30
 	public function searchRefs( array $entries, array $ref ) : array
31 31
 	{
32
-        $entries = $this->getManager()->searchRefs( $entries, $ref );
32
+		$entries = $this->getManager()->searchRefs( $entries, $ref );
33 33
 
34 34
 		if( $this->hasRef( $ref, 'locale/site' ) && ( $key = $this->getKey( $entries  ) ) !== null )
35 35
 		{
36
-            $siteIds = array_column( $entries, $key );
37
-            $manager = \Aimeos\MShop::create( $this->context(), 'locale/site' );
36
+			$siteIds = array_column( $entries, $key );
37
+			$manager = \Aimeos\MShop::create( $this->context(), 'locale/site' );
38 38
 
39
-            $filter = $manager->filter( true )->add( ['locale.site.siteid' => $siteIds] )->slice( 0, 0x7fffffff );
40
-            $siteItems = $manager->search( $filter )->col( null, 'locale.site.siteid' );
39
+			$filter = $manager->filter( true )->add( ['locale.site.siteid' => $siteIds] )->slice( 0, 0x7fffffff );
40
+			$siteItems = $manager->search( $filter )->col( null, 'locale.site.siteid' );
41 41
 
42 42
 			foreach( $entries as $id => $entry ) {
43 43
 				$entries[$id]['.locale/site'] = $siteItems[$entry[$key]] ?? null;
@@ -48,21 +48,21 @@  discard block
 block discarded – undo
48 48
 	}
49 49
 
50 50
 
51
-    /**
52
-     * Returns the key used for the site ID
53
-     *
54
-     * @param array $entries List of associative list of property key/value pairs
55
-     * @return string|null Key used for the site ID or NULL if not found
56
-     */
57
-    protected function getKey( array $entries ) : ?string
58
-    {
59
-        foreach( current( $entries ) ?: [] as $key => $value )
60
-        {
61
-            if( !substr_compare( $key, 'siteid', -6 ) ) {
62
-                return $key;
63
-            }
64
-        }
51
+	/**
52
+	 * Returns the key used for the site ID
53
+	 *
54
+	 * @param array $entries List of associative list of property key/value pairs
55
+	 * @return string|null Key used for the site ID or NULL if not found
56
+	 */
57
+	protected function getKey( array $entries ) : ?string
58
+	{
59
+		foreach( current( $entries ) ?: [] as $key => $value )
60
+		{
61
+			if( !substr_compare( $key, 'siteid', -6 ) ) {
62
+				return $key;
63
+			}
64
+		}
65 65
 
66
-        return null;
67
-    }
66
+		return null;
67
+	}
68 68
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
 	{
32 32
         $entries = $this->getManager()->searchRefs( $entries, $ref );
33 33
 
34
-		if( $this->hasRef( $ref, 'locale/site' ) && ( $key = $this->getKey( $entries  ) ) !== null )
34
+		if( $this->hasRef( $ref, 'locale/site' ) && ( $key = $this->getKey( $entries ) ) !== null )
35 35
 		{
36 36
             $siteIds = array_column( $entries, $key );
37 37
             $manager = \Aimeos\MShop::create( $this->context(), 'locale/site' );
Please login to merge, or discard this patch.