Passed
Push — master ( 45c7a2...54b5a7 )
by Aimeos
02:20
created
tests/MQueue/Queue/StandardTest.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -74,8 +74,7 @@
 block discarded – undo
74 74
 				SELECT * FROM mw_mqueue_test WHERE queue = ? AND cname = ? AND rtime = ?
75 75
 				ORDER BY id LIMIT 1
76 76
 			';
77
-		}
78
-		else
77
+		} else
79 78
 		{
80 79
 			$config['sql']['reserve'] = '
81 80
 				UPDATE mw_mqueue_test SET cname = ?, rtime = ? WHERE id IN (
Please login to merge, or discard this patch.
src/Process/Pcntl.php 1 patch
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -110,9 +110,12 @@
 block discarded – undo
110 110
 			throw new Exception( 'Unable to fork new process: ' . pcntl_strerror( pcntl_get_last_error() ) );
111 111
 		}
112 112
 
113
-		if( $pid === 0 ) // child process
113
+		if( $pid === 0 ) {
114
+			// child process
114 115
 		{
115
-			$this->list = []; // use own child process list
116
+			$this->list = [];
117
+		}
118
+		// use own child process list
116 119
 			exit( $this->exec( $fcn, $data ) );
117 120
 		}
118 121
 
Please login to merge, or discard this patch.
src/DB/Statement/PDO/Simple.php 1 patch
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -69,9 +69,12 @@
 block discarded – undo
69 69
 	 */
70 70
 	public function execute() : \Aimeos\Base\DB\Result\Iface
71 71
 	{
72
-		try {
72
+		try
73
+		{
73 74
 			$result = $this->exec();
74
-		} catch( \PDOException $e ) {
75
+		}
76
+		catch( \PDOException $e )
77
+		{
75 78
 			throw new \Aimeos\Base\DB\Exception( $e->getMessage() . ': ' . $this->sql, $e->getCode() );
76 79
 		}
77 80
 
Please login to merge, or discard this patch.
src/DB/Statement/PDO/Prepared.php 1 patch
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -71,9 +71,12 @@
 block discarded – undo
71 71
 	 */
72 72
 	public function execute() : \Aimeos\Base\DB\Result\Iface
73 73
 	{
74
-		try {
74
+		try
75
+		{
75 76
 			$stmt = $this->exec();
76
-		} catch( \PDOException $e ) {
77
+		}
78
+		catch( \PDOException $e )
79
+		{
77 80
 			throw new \Aimeos\Base\DB\Exception( $e->getMessage() . ': ' . $this->sql . json_encode( array_column( $this->binds, 0 ) ), $e->getCode(), $e->errorInfo );
78 81
 		}
79 82
 
Please login to merge, or discard this patch.
src/DB/Statement/DBAL/Simple.php 1 patch
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -69,9 +69,12 @@
 block discarded – undo
69 69
 	 */
70 70
 	public function execute() : \Aimeos\Base\DB\Result\Iface
71 71
 	{
72
-		try {
72
+		try
73
+		{
73 74
 			$result = $this->getConnection()->getRawObject()->getWrappedConnection()->query( $this->sql );
74
-		} catch( \Doctrine\DBAL\Driver\Exception $e ) {
75
+		}
76
+		catch( \Doctrine\DBAL\Driver\Exception $e )
77
+		{
75 78
 			throw new \Aimeos\Base\DB\Exception( $e->getMessage() . ': ' . $this->sql, $e->getCode() );
76 79
 		}
77 80
 
Please login to merge, or discard this patch.
src/DB/Statement/DBAL/Prepared.php 2 patches
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -71,9 +71,12 @@
 block discarded – undo
71 71
 	 */
72 72
 	public function execute() : \Aimeos\Base\DB\Result\Iface
73 73
 	{
74
-		try {
74
+		try
75
+		{
75 76
 			$result = $this->exec();
76
-		} catch( \Doctrine\DBAL\Driver\Exception $e ) {
77
+		}
78
+		catch( \Doctrine\DBAL\Driver\Exception $e )
79
+		{
77 80
 			throw new \Aimeos\Base\DB\Exception( $e->getMessage() . ': ' . $this->sql . json_encode( array_column( $this->binds, 0 ) ), $e->getCode() );
78 81
 		}
79 82
 
Please login to merge, or discard this patch.
Upper-Lower-Casing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
 		switch( $type )
118 118
 		{
119 119
 			case \Aimeos\Base\DB\Statement\Base::PARAM_NULL:
120
-				$dbaltype = \Doctrine\DBAL\ParameterType::NULL; break;
120
+				$dbaltype = \Doctrine\DBAL\ParameterType::null; break;
121 121
 			case \Aimeos\Base\DB\Statement\Base::PARAM_BOOL:
122 122
 				$dbaltype = \Doctrine\DBAL\ParameterType::BOOLEAN; break;
123 123
 			case \Aimeos\Base\DB\Statement\Base::PARAM_INT:
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
 		}
134 134
 
135 135
 		if( is_null( $value ) ) {
136
-			$dbaltype = \Doctrine\DBAL\ParameterType::NULL;
136
+			$dbaltype = \Doctrine\DBAL\ParameterType::null;
137 137
 		}
138 138
 
139 139
 		return $dbaltype;
Please login to merge, or discard this patch.
src/DB/Result/PDO.php 1 patch
Braces   +20 added lines, -8 removed lines patch added patch discarded remove patch
@@ -50,9 +50,12 @@  discard block
 block discarded – undo
50 50
 	 */
51 51
 	public function affectedRows() : int
52 52
 	{
53
-		try {
53
+		try
54
+		{
54 55
 			return $this->statement->rowCount();
55
-		} catch( \PDOException $e ) {
56
+		}
57
+		catch( \PDOException $e )
58
+		{
56 59
 			throw new \Aimeos\Base\DB\Exception( $e->getMessage(), $e->getCode(), $e->errorInfo );
57 60
 		}
58 61
 	}
@@ -67,9 +70,12 @@  discard block
 block discarded – undo
67 70
 	 */
68 71
 	public function fetch( int $style = \Aimeos\Base\DB\Result\Base::FETCH_ASSOC ) : ?array
69 72
 	{
70
-		try {
73
+		try
74
+		{
71 75
 			return $this->statement->fetch( $style ? \PDO::FETCH_ASSOC : \PDO::FETCH_NUM ) ?: null;
72
-		} catch( \PDOException $e ) {
76
+		}
77
+		catch( \PDOException $e )
78
+		{
73 79
 			throw new \Aimeos\Base\DB\Exception( $e->getMessage(), $e->getCode(), $e->errorInfo );
74 80
 		}
75 81
 	}
@@ -83,9 +89,12 @@  discard block
 block discarded – undo
83 89
 	 */
84 90
 	public function finish() : Iface
85 91
 	{
86
-		try {
92
+		try
93
+		{
87 94
 			$this->statement->closeCursor();
88
-		} catch( \PDOException $e ) {
95
+		}
96
+		catch( \PDOException $e )
97
+		{
89 98
 			throw new \Aimeos\Base\DB\Exception( $e->getMessage(), $e->getCode(), $e->errorInfo );
90 99
 		}
91 100
 
@@ -100,9 +109,12 @@  discard block
 block discarded – undo
100 109
 	 */
101 110
 	public function nextResult() : bool
102 111
 	{
103
-		try {
112
+		try
113
+		{
104 114
 			return $this->statement->nextRowset();
105
-		} catch( \PDOException $e ) {
115
+		}
116
+		catch( \PDOException $e )
117
+		{
106 118
 			return false;
107 119
 		}
108 120
 	}
Please login to merge, or discard this patch.
src/Config/Decorator/Memory.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -102,8 +102,7 @@
 block discarded – undo
102 102
 		{
103 103
 			$this->cache[$name] = $value;
104 104
 			unset( $this->negCache[$name] );
105
-		}
106
-		else
105
+		} else
107 106
 		{
108 107
 			$this->negCache[$name] = true;
109 108
 		}
Please login to merge, or discard this patch.
src/Str.php 1 patch
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -241,9 +241,12 @@
 block discarded – undo
241 241
 	{
242 242
 		if( self::$node === null )
243 243
 		{
244
-			try {
244
+			try
245
+			{
245 246
 				self::$node = random_bytes( 6 );
246
-			} catch( \Throwable $t ) {
247
+			}
248
+			catch( \Throwable $t )
249
+			{
247 250
 				if( function_exists( 'openssl_random_pseudo_bytes' ) ) {
248 251
 					self::$node = openssl_random_pseudo_bytes( 6 );
249 252
 				} else {
Please login to merge, or discard this patch.