Passed
Branch php-cs-fixer (b9836a)
by Fabio
15:02
created
framework/Util/TLogger.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
 				$ctl = null;
77 77
 		} else
78 78
 			$ctl = null;
79
-		$this->_logs[] = [$message,$level,$category,microtime(true),memory_get_usage(),$ctl];
79
+		$this->_logs[] = [$message, $level, $category, microtime(true), memory_get_usage(), $ctl];
80 80
 	}
81 81
 
82 82
 	/**
@@ -122,13 +122,13 @@  discard block
 block discarded – undo
122 122
 			return $this->_logs;
123 123
 		$logs = $this->_logs;
124 124
 		if(!empty($levels))
125
-			$logs = array_values(array_filter(array_filter($logs, [$this,'filterByLevels'])));
125
+			$logs = array_values(array_filter(array_filter($logs, [$this, 'filterByLevels'])));
126 126
 		if(!empty($categories))
127
-			$logs = array_values(array_filter(array_filter($logs, [$this,'filterByCategories'])));
127
+			$logs = array_values(array_filter(array_filter($logs, [$this, 'filterByCategories'])));
128 128
 		if(!empty($controls))
129
-			$logs = array_values(array_filter(array_filter($logs, [$this,'filterByControl'])));
129
+			$logs = array_values(array_filter(array_filter($logs, [$this, 'filterByControl'])));
130 130
 		if(null !== $timestamp)
131
-			$logs = array_values(array_filter(array_filter($logs, [$this,'filterByTimeStamp'])));
131
+			$logs = array_values(array_filter(array_filter($logs, [$this, 'filterByTimeStamp'])));
132 132
 		return $logs;
133 133
 	}
134 134
 
@@ -169,13 +169,13 @@  discard block
 block discarded – undo
169 169
 		}
170 170
 		$logs = $this->_logs;
171 171
 		if(!empty($levels))
172
-			$logs = array_filter(array_filter($logs, [$this,'filterByLevels']));
172
+			$logs = array_filter(array_filter($logs, [$this, 'filterByLevels']));
173 173
 		if(!empty($categories))
174
-			$logs = array_filter(array_filter($logs, [$this,'filterByCategories']));
174
+			$logs = array_filter(array_filter($logs, [$this, 'filterByCategories']));
175 175
 		if(!empty($controls))
176
-			$logs = array_filter(array_filter($logs, [$this,'filterByControl']));
176
+			$logs = array_filter(array_filter($logs, [$this, 'filterByControl']));
177 177
 		if(null !== $timestamp)
178
-			$logs = array_filter(array_filter($logs, [$this,'filterByTimeStamp']));
178
+			$logs = array_filter(array_filter($logs, [$this, 'filterByTimeStamp']));
179 179
 		$this->_logs = array_values(array_diff_key($this->_logs, $logs));
180 180
 	}
181 181
 
Please login to merge, or discard this patch.
framework/Util/TVarDumper.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
 		switch(gettype($var))
63 63
 		{
64 64
 			case 'boolean':
65
-				self::$_output .= $var?'true':'false';
65
+				self::$_output .= $var ? 'true' : 'false';
66 66
 				break;
67 67
 			case 'integer':
68 68
 				self::$_output .= "$var";
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
 				{
110 110
 					$id = array_push(self::$_objects, $var);
111 111
 					$className = get_class($var);
112
-					$members = (array)$var;
112
+					$members = (array) $var;
113 113
 					$keys = array_keys($members);
114 114
 					$spaces = str_repeat(' ', $level * 4);
115 115
 					self::$_output .= "$className#$id\n" . $spaces . '(';
Please login to merge, or discard this patch.
framework/Util/TFileLogRoute.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -143,7 +143,7 @@
 block discarded – undo
143 143
 	protected function rotateFiles()
144 144
 	{
145 145
 		$file = $this->getLogPath() . DIRECTORY_SEPARATOR . $this->getLogFile();
146
-		for($i = $this->_maxLogFiles;$i > 0;--$i)
146
+		for($i = $this->_maxLogFiles; $i > 0; --$i)
147 147
 		{
148 148
 			$rotateFile = $file . '.' . $i;
149 149
 			if(is_file($rotateFile))
Please login to merge, or discard this patch.
framework/Util/TParameterModule.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -110,8 +110,8 @@  discard block
 block discarded – undo
110 110
 			{
111 111
 				if(is_array($parameter) && isset($parameter['class']))
112 112
 				{
113
-					$properties = isset($parameter['properties'])?$parameter['properties']:[];
114
-					$parameters[$id] = [$parameter['class'],$properties];
113
+					$properties = isset($parameter['properties']) ? $parameter['properties'] : [];
114
+					$parameters[$id] = [$parameter['class'], $properties];
115 115
 				}
116 116
 				else
117 117
 				{
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
 						$parameters[$id] = $value;
135 135
 				}
136 136
 				else
137
-					$parameters[$id] = [$type,$properties->toArray()];
137
+					$parameters[$id] = [$type, $properties->toArray()];
138 138
 			}
139 139
 		}
140 140
 
Please login to merge, or discard this patch.
framework/Util/TDbLogRoute.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -88,7 +88,7 @@
 block discarded – undo
88 88
 		{
89 89
 			$db->createCommand($sql)->query()->close();
90 90
 		}
91
-		catch(Exception $e)
91
+		catch (Exception $e)
92 92
 		{
93 93
 			// DB table not exists
94 94
 			if($this->_autoCreate)
Please login to merge, or discard this patch.
framework/Util/TBrowserLogRoute.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -37,9 +37,9 @@
 block discarded – undo
37 37
 		$even = true;
38 38
 		$response = $this->getApplication()->getResponse();
39 39
 		$response->write($this->renderHeader());
40
-		for($i = 0,$n = count($logs);$i < $n;++$i)
40
+		for($i = 0, $n = count($logs); $i < $n; ++$i)
41 41
 		{
42
-			if ($i < $n - 1)
42
+			if($i < $n - 1)
43 43
 			{
44 44
 				$timing['delta'] = $logs[$i + 1][3] - $logs[$i][3];
45 45
 				$timing['total'] = $logs[$i + 1][3] - $first;
Please login to merge, or discard this patch.
framework/Util/TLogRoute.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
 	 */
139 139
 	protected function getLevelName($level)
140 140
 	{
141
-		return isset(self::$_levelNames[$level])?self::$_levelNames[$level]:'Unknown';
141
+		return isset(self::$_levelNames[$level]) ?self::$_levelNames[$level] : 'Unknown';
142 142
 	}
143 143
 
144 144
 	/**
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
 	 */
148 148
 	protected function getLevelValue($level)
149 149
 	{
150
-		return isset(self::$_levelValues[$level])?self::$_levelValues[$level]:0;
150
+		return isset(self::$_levelValues[$level]) ?self::$_levelValues[$level] : 0;
151 151
 	}
152 152
 
153 153
 	/**
Please login to merge, or discard this patch.
framework/Security/TAuthManager.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -102,9 +102,9 @@
 block discarded – undo
102 102
 				throw new TConfigurationException('authmanager_usermanager_invalid', $this->_userManager);
103 103
 			$this->_userManager = $users;
104 104
 		}
105
-		$application->attachEventHandler('OnAuthentication', [$this,'doAuthentication']);
106
-		$application->attachEventHandler('OnEndRequest', [$this,'leave']);
107
-		$application->attachEventHandler('OnAuthorization', [$this,'doAuthorization']);
105
+		$application->attachEventHandler('OnAuthentication', [$this, 'doAuthentication']);
106
+		$application->attachEventHandler('OnEndRequest', [$this, 'leave']);
107
+		$application->attachEventHandler('OnAuthorization', [$this, 'doAuthorization']);
108 108
 		$this->_initialized = true;
109 109
 	}
110 110
 
Please login to merge, or discard this patch.
framework/Security/TUserManager.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -150,10 +150,10 @@  discard block
 block discarded – undo
150 150
 		{
151 151
 			foreach($config['users'] as $user)
152 152
 			{
153
-				$name = trim(strtolower(isset($user['name'])?$user['name']:''));
154
-				$password = isset($user['password'])?$user['password']:'';
153
+				$name = trim(strtolower(isset($user['name']) ? $user['name'] : ''));
154
+				$password = isset($user['password']) ? $user['password'] : '';
155 155
 				$this->_users[$name] = $password;
156
-				$roles = isset($user['roles'])?$user['roles']:'';
156
+				$roles = isset($user['roles']) ? $user['roles'] : '';
157 157
 				if($roles !== '')
158 158
 				{
159 159
 					foreach(explode(',', $roles) as $role)
@@ -168,8 +168,8 @@  discard block
 block discarded – undo
168 168
 		{
169 169
 			foreach($config['roles'] as $role)
170 170
 			{
171
-				$name = isset($role['name'])?$role['name']:'';
172
-				$users = isset($role['users'])?$role['users']:'';
171
+				$name = isset($role['name']) ? $role['name'] : '';
172
+				$users = isset($role['users']) ? $role['users'] : '';
173 173
 				foreach(explode(',', $users) as $user)
174 174
 				{
175 175
 					if(($user = trim($user)) !== '')
@@ -364,7 +364,7 @@  discard block
 block discarded – undo
364 364
 		$username = strtolower($user->getName());
365 365
 		if(isset($this->_users[$username]))
366 366
 		{
367
-			$data = [$username,md5($username . $this->_users[$username])];
367
+			$data = [$username, md5($username . $this->_users[$username])];
368 368
 			$cookie->setValue(serialize($data));
369 369
 		}
370 370
 	}
Please login to merge, or discard this patch.