@@ -30,7 +30,7 @@ |
||
30 | 30 | if (null === self::$handler) { |
31 | 31 | $cloner = new VarCloner(); |
32 | 32 | $dumper = 'cli' === PHP_SAPI ? new CliDumper() : new HtmlDumper(); |
33 | - self::$handler = function ($var) use ($cloner, $dumper) { |
|
33 | + self::$handler = function($var) use ($cloner, $dumper) { |
|
34 | 34 | $dumper->dump($cloner->cloneVar($var)); |
35 | 35 | }; |
36 | 36 | } |
@@ -25,21 +25,21 @@ discard block |
||
25 | 25 | protected function doClone($var) |
26 | 26 | { |
27 | 27 | $useExt = $this->useExt; |
28 | - $len = 1; // Length of $queue |
|
29 | - $pos = 0; // Number of cloned items past the first level |
|
30 | - $refsCounter = 0; // Hard references counter |
|
31 | - $queue = array(array($var)); // This breadth-first queue is the return value |
|
32 | - $arrayRefs = array(); // Map of queue indexes to stub array objects |
|
33 | - $hardRefs = array(); // Map of original zval hashes to stub objects |
|
34 | - $objRefs = array(); // Map of original object handles to their stub object couterpart |
|
35 | - $resRefs = array(); // Map of original resource handles to their stub object couterpart |
|
36 | - $values = array(); // Map of stub objects' hashes to original values |
|
28 | + $len = 1; // Length of $queue |
|
29 | + $pos = 0; // Number of cloned items past the first level |
|
30 | + $refsCounter = 0; // Hard references counter |
|
31 | + $queue = array(array($var)); // This breadth-first queue is the return value |
|
32 | + $arrayRefs = array(); // Map of queue indexes to stub array objects |
|
33 | + $hardRefs = array(); // Map of original zval hashes to stub objects |
|
34 | + $objRefs = array(); // Map of original object handles to their stub object couterpart |
|
35 | + $resRefs = array(); // Map of original resource handles to their stub object couterpart |
|
36 | + $values = array(); // Map of stub objects' hashes to original values |
|
37 | 37 | $maxItems = $this->maxItems; |
38 | 38 | $maxString = $this->maxString; |
39 | - $cookie = (object) array(); // Unique object used to detect hard references |
|
39 | + $cookie = (object) array(); // Unique object used to detect hard references |
|
40 | 40 | $gid = uniqid(mt_rand(), true); // Unique string used to detect the special $GLOBALS variable |
41 | - $a = null; // Array cast for nested structures |
|
42 | - $stub = null; // Stub capturing the main properties of an original item value |
|
41 | + $a = null; // Array cast for nested structures |
|
42 | + $stub = null; // Stub capturing the main properties of an original item value |
|
43 | 43 | // or null if the original value is used directly |
44 | 44 | $zval = array( // Main properties of the current value |
45 | 45 | 'type' => null, |
@@ -57,8 +57,8 @@ discard block |
||
57 | 57 | $hashOffset = self::$hashOffset; |
58 | 58 | |
59 | 59 | for ($i = 0; $i < $len; ++$i) { |
60 | - $indexed = true; // Whether the currently iterated array is numerically indexed or not |
|
61 | - $j = -1; // Position in the currently iterated array |
|
60 | + $indexed = true; // Whether the currently iterated array is numerically indexed or not |
|
61 | + $j = -1; // Position in the currently iterated array |
|
62 | 62 | $fromObjCast = array_keys($queue[$i]); |
63 | 63 | $fromObjCast = array_keys(array_flip($fromObjCast)) !== $fromObjCast; |
64 | 64 | $refs = $vals = $fromObjCast ? array_values($queue[$i]) : $queue[$i]; |
@@ -81,8 +81,8 @@ discard block |
||
81 | 81 | $zval['type'] = gettype($v); |
82 | 82 | } |
83 | 83 | if ($zval['zval_isref']) { |
84 | - $vals[$k] = &$stub; // Break hard references to make $queue completely |
|
85 | - unset($stub); // independent from the original structure |
|
84 | + $vals[$k] = &$stub; // Break hard references to make $queue completely |
|
85 | + unset($stub); // independent from the original structure |
|
86 | 86 | if (isset($hardRefs[$zval['zval_hash']])) { |
87 | 87 | $vals[$k] = $useExt ? ($v = $hardRefs[$zval['zval_hash']]) : ($refs[$k] = $v); |
88 | 88 | if ($v->value instanceof Stub && (Stub::TYPE_OBJECT === $v->value->type || Stub::TYPE_RESOURCE === $v->value->type)) { |
@@ -193,7 +193,7 @@ |
||
193 | 193 | */ |
194 | 194 | public function cloneVar($var, $filter = 0) |
195 | 195 | { |
196 | - $this->prevErrorHandler = set_error_handler(function ($type, $msg, $file, $line, $context) { |
|
196 | + $this->prevErrorHandler = set_error_handler(function($type, $msg, $file, $line, $context) { |
|
197 | 197 | if (E_RECOVERABLE_ERROR === $type || E_USER_ERROR === $type) { |
198 | 198 | // Cloner never dies |
199 | 199 | throw new \ErrorException($msg, 0, $type, $file, $line); |
@@ -17,6 +17,6 @@ |
||
17 | 17 | */ |
18 | 18 | |
19 | 19 | namespace Detection; |
20 | -require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'Mobile_Detect.php'; |
|
20 | +require_once dirname(__FILE__).DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'Mobile_Detect.php'; |
|
21 | 21 | |
22 | 22 | class MobileDetect extends \Mobile_Detect {} |
@@ -221,51 +221,51 @@ discard block |
||
221 | 221 | * |
222 | 222 | * @deprecated since version 2.6.9 |
223 | 223 | */ |
224 | - const DETECTION_TYPE_MOBILE = 'mobile'; |
|
224 | + const DETECTION_TYPE_MOBILE = 'mobile'; |
|
225 | 225 | |
226 | 226 | /** |
227 | 227 | * Extended detection type. |
228 | 228 | * |
229 | 229 | * @deprecated since version 2.6.9 |
230 | 230 | */ |
231 | - const DETECTION_TYPE_EXTENDED = 'extended'; |
|
231 | + const DETECTION_TYPE_EXTENDED = 'extended'; |
|
232 | 232 | |
233 | 233 | /** |
234 | 234 | * A frequently used regular expression to extract version #s. |
235 | 235 | * |
236 | 236 | * @deprecated since version 2.6.9 |
237 | 237 | */ |
238 | - const VER = '([\w._\+]+)'; |
|
238 | + const VER = '([\w._\+]+)'; |
|
239 | 239 | |
240 | 240 | /** |
241 | 241 | * Top-level device. |
242 | 242 | */ |
243 | - const MOBILE_GRADE_A = 'A'; |
|
243 | + const MOBILE_GRADE_A = 'A'; |
|
244 | 244 | |
245 | 245 | /** |
246 | 246 | * Mid-level device. |
247 | 247 | */ |
248 | - const MOBILE_GRADE_B = 'B'; |
|
248 | + const MOBILE_GRADE_B = 'B'; |
|
249 | 249 | |
250 | 250 | /** |
251 | 251 | * Low-level device. |
252 | 252 | */ |
253 | - const MOBILE_GRADE_C = 'C'; |
|
253 | + const MOBILE_GRADE_C = 'C'; |
|
254 | 254 | |
255 | 255 | /** |
256 | 256 | * Stores the version number of the current release. |
257 | 257 | */ |
258 | - const VERSION = '2.8.41'; |
|
258 | + const VERSION = '2.8.41'; |
|
259 | 259 | |
260 | 260 | /** |
261 | 261 | * A type for the version() method indicating a string return value. |
262 | 262 | */ |
263 | - const VERSION_TYPE_STRING = 'text'; |
|
263 | + const VERSION_TYPE_STRING = 'text'; |
|
264 | 264 | |
265 | 265 | /** |
266 | 266 | * A type for the version() method indicating a float return value. |
267 | 267 | */ |
268 | - const VERSION_TYPE_FLOAT = 'float'; |
|
268 | + const VERSION_TYPE_FLOAT = 'float'; |
|
269 | 269 | |
270 | 270 | /** |
271 | 271 | * A cache for resolved matches |
@@ -834,10 +834,10 @@ discard block |
||
834 | 834 | // http://en.wikipedia.org/wiki/NetFront |
835 | 835 | 'NetFront' => 'NetFront/[VER]', |
836 | 836 | 'NokiaBrowser' => 'NokiaBrowser/[VER]', |
837 | - 'Opera' => array( ' OPR/[VER]', 'Opera Mini/[VER]', 'Version/[VER]' ), |
|
837 | + 'Opera' => array(' OPR/[VER]', 'Opera Mini/[VER]', 'Version/[VER]'), |
|
838 | 838 | 'Opera Mini' => 'Opera Mini/[VER]', |
839 | 839 | 'Opera Mobi' => 'Version/[VER]', |
840 | - 'UCBrowser' => array( 'UCWEB[VER]', 'UC.*Browser/[VER]' ), |
|
840 | + 'UCBrowser' => array('UCWEB[VER]', 'UC.*Browser/[VER]'), |
|
841 | 841 | 'MQQBrowser' => 'MQQBrowser/[VER]', |
842 | 842 | 'MicroMessenger' => 'MicroMessenger/[VER]', |
843 | 843 | 'baiduboxapp' => 'baiduboxapp/[VER]', |
@@ -846,7 +846,7 @@ discard block |
||
846 | 846 | 'Iron' => 'Iron/[VER]', |
847 | 847 | // @note: Safari 7534.48.3 is actually Version 5.1. |
848 | 848 | // @note: On BlackBerry the Version is overwriten by the OS. |
849 | - 'Safari' => array( 'Version/[VER]', 'Safari/[VER]' ), |
|
849 | + 'Safari' => array('Version/[VER]', 'Safari/[VER]'), |
|
850 | 850 | 'Skyfire' => 'Skyfire/[VER]', |
851 | 851 | 'Tizen' => 'Tizen/[VER]', |
852 | 852 | 'Webkit' => 'webkit[ /][VER]', |
@@ -868,7 +868,7 @@ discard block |
||
868 | 868 | 'Java' => 'Java/[VER]', |
869 | 869 | // @reference: http://windowsteamblog.com/windows_phone/b/wpdev/archive/2011/08/29/introducing-the-ie9-on-windows-phone-mango-user-agent-string.aspx |
870 | 870 | // @reference: http://en.wikipedia.org/wiki/Windows_NT#Releases |
871 | - 'Windows Phone OS' => array( 'Windows Phone OS [VER]', 'Windows Phone [VER]'), |
|
871 | + 'Windows Phone OS' => array('Windows Phone OS [VER]', 'Windows Phone [VER]'), |
|
872 | 872 | 'Windows Phone' => 'Windows Phone [VER]', |
873 | 873 | 'Windows CE' => 'Windows CE/[VER]', |
874 | 874 | // http://social.msdn.microsoft.com/Forums/en-US/windowsdeveloperpreviewgeneral/thread/6be392da-4d2f-41b4-8354-8dcee20c85cd |
@@ -963,7 +963,7 @@ discard block |
||
963 | 963 | } |
964 | 964 | |
965 | 965 | // test the alternate, too |
966 | - $altHeader = 'HTTP_' . $header; |
|
966 | + $altHeader = 'HTTP_'.$header; |
|
967 | 967 | |
968 | 968 | //Test both the regular and the HTTP_ prefix |
969 | 969 | if (isset($this->httpHeaders[$header])) { |
@@ -1060,7 +1060,7 @@ discard block |
||
1060 | 1060 | $this->userAgent = null; |
1061 | 1061 | foreach ($this->getUaHttpHeaders() as $altHeader) { |
1062 | 1062 | if (false === empty($this->httpHeaders[$altHeader])) { // @todo: should use getHttpHeader(), but it would be slow. (Serban) |
1063 | - $this->userAgent .= $this->httpHeaders[$altHeader] . " "; |
|
1063 | + $this->userAgent .= $this->httpHeaders[$altHeader]." "; |
|
1064 | 1064 | } |
1065 | 1065 | } |
1066 | 1066 | |
@@ -1371,7 +1371,7 @@ discard block |
||
1371 | 1371 | // Check specifically for cloudfront headers if the useragent === 'Amazon CloudFront' |
1372 | 1372 | if ($this->getUserAgent() === 'Amazon CloudFront') { |
1373 | 1373 | $cfHeaders = $this->getCfHeaders(); |
1374 | - if(array_key_exists('HTTP_CLOUDFRONT_IS_MOBILE_VIEWER', $cfHeaders) && $cfHeaders['HTTP_CLOUDFRONT_IS_MOBILE_VIEWER'] === 'true') { |
|
1374 | + if (array_key_exists('HTTP_CLOUDFRONT_IS_MOBILE_VIEWER', $cfHeaders) && $cfHeaders['HTTP_CLOUDFRONT_IS_MOBILE_VIEWER'] === 'true') { |
|
1375 | 1375 | return true; |
1376 | 1376 | } |
1377 | 1377 | } |
@@ -1399,7 +1399,7 @@ discard block |
||
1399 | 1399 | // Check specifically for cloudfront headers if the useragent === 'Amazon CloudFront' |
1400 | 1400 | if ($this->getUserAgent() === 'Amazon CloudFront') { |
1401 | 1401 | $cfHeaders = $this->getCfHeaders(); |
1402 | - if(array_key_exists('HTTP_CLOUDFRONT_IS_TABLET_VIEWER', $cfHeaders) && $cfHeaders['HTTP_CLOUDFRONT_IS_TABLET_VIEWER'] === 'true') { |
|
1402 | + if (array_key_exists('HTTP_CLOUDFRONT_IS_TABLET_VIEWER', $cfHeaders) && $cfHeaders['HTTP_CLOUDFRONT_IS_TABLET_VIEWER'] === 'true') { |
|
1403 | 1403 | return true; |
1404 | 1404 | } |
1405 | 1405 | } |
@@ -1579,7 +1579,7 @@ discard block |
||
1579 | 1579 | // Android 3.1 (Honeycomb) - Tested on the Samsung Galaxy Tab 10.1 and Motorola XOOM |
1580 | 1580 | // Android 4.0 (ICS) - Tested on a Galaxy Nexus. Note: transition performance can be poor on upgraded devices |
1581 | 1581 | // Android 4.1 (Jelly Bean) - Tested on a Galaxy Nexus and Galaxy 7 |
1582 | - ( $this->version('Android', self::VERSION_TYPE_FLOAT)>2.1 && $this->is('Webkit') ) || |
|
1582 | + ($this->version('Android', self::VERSION_TYPE_FLOAT) > 2.1 && $this->is('Webkit')) || |
|
1583 | 1583 | |
1584 | 1584 | // Windows Phone 7.5-8 - Tested on the HTC Surround (7.5), HTC Trophy (7.5), LG-E900 (7.5), Nokia 800 (7.8), HTC Mazaa (7.8), Nokia Lumia 520 (8), Nokia Lumia 920 (8), HTC 8x (8) |
1585 | 1585 | $this->version('Windows Phone OS', self::VERSION_TYPE_FLOAT) >= 7.5 || |
@@ -1590,21 +1590,21 @@ discard block |
||
1590 | 1590 | $this->match('Playbook.*Tablet') || |
1591 | 1591 | |
1592 | 1592 | // Palm WebOS (1.4-3.0) - Tested on the Palm Pixi (1.4), Pre (1.4), Pre 2 (2.0), HP TouchPad (3.0) |
1593 | - ( $this->version('webOS', self::VERSION_TYPE_FLOAT) >= 1.4 && $this->match('Palm|Pre|Pixi') ) || |
|
1593 | + ($this->version('webOS', self::VERSION_TYPE_FLOAT) >= 1.4 && $this->match('Palm|Pre|Pixi')) || |
|
1594 | 1594 | // Palm WebOS 3.0 - Tested on HP TouchPad |
1595 | 1595 | $this->match('hp.*TouchPad') || |
1596 | 1596 | |
1597 | 1597 | // Firefox Mobile 18 - Tested on Android 2.3 and 4.1 devices |
1598 | - ( $this->is('Firefox') && $this->version('Firefox', self::VERSION_TYPE_FLOAT) >= 18 ) || |
|
1598 | + ($this->is('Firefox') && $this->version('Firefox', self::VERSION_TYPE_FLOAT) >= 18) || |
|
1599 | 1599 | |
1600 | 1600 | // Chrome for Android - Tested on Android 4.0, 4.1 device |
1601 | - ( $this->is('Chrome') && $this->is('AndroidOS') && $this->version('Android', self::VERSION_TYPE_FLOAT) >= 4.0 ) || |
|
1601 | + ($this->is('Chrome') && $this->is('AndroidOS') && $this->version('Android', self::VERSION_TYPE_FLOAT) >= 4.0) || |
|
1602 | 1602 | |
1603 | 1603 | // Skyfire 4.1 - Tested on Android 2.3 device |
1604 | - ( $this->is('Skyfire') && $this->version('Skyfire', self::VERSION_TYPE_FLOAT) >= 4.1 && $this->is('AndroidOS') && $this->version('Android', self::VERSION_TYPE_FLOAT) >= 2.3 ) || |
|
1604 | + ($this->is('Skyfire') && $this->version('Skyfire', self::VERSION_TYPE_FLOAT) >= 4.1 && $this->is('AndroidOS') && $this->version('Android', self::VERSION_TYPE_FLOAT) >= 2.3) || |
|
1605 | 1605 | |
1606 | 1606 | // Opera Mobile 11.5-12: Tested on Android 2.3 |
1607 | - ( $this->is('Opera') && $this->version('Opera Mobi', self::VERSION_TYPE_FLOAT) >= 11.5 && $this->is('AndroidOS') ) || |
|
1607 | + ($this->is('Opera') && $this->version('Opera Mobi', self::VERSION_TYPE_FLOAT) >= 11.5 && $this->is('AndroidOS')) || |
|
1608 | 1608 | |
1609 | 1609 | // Meego 1.2 - Tested on Nokia 950 and N9 |
1610 | 1610 | $this->is('MeeGoOS') || |
@@ -1620,11 +1620,11 @@ discard block |
||
1620 | 1620 | $this->is('Dolfin') && $this->version('Bada', self::VERSION_TYPE_FLOAT) >= 2.0 || |
1621 | 1621 | |
1622 | 1622 | // UC Browser - Tested on Android 2.3 device |
1623 | - ( ($this->is('UC Browser') || $this->is('Dolfin')) && $this->version('Android', self::VERSION_TYPE_FLOAT) >= 2.3 ) || |
|
1623 | + (($this->is('UC Browser') || $this->is('Dolfin')) && $this->version('Android', self::VERSION_TYPE_FLOAT) >= 2.3) || |
|
1624 | 1624 | |
1625 | 1625 | // Kindle 3 and Fire - Tested on the built-in WebKit browser for each |
1626 | - ( $this->match('Kindle Fire') || |
|
1627 | - $this->is('Kindle') && $this->version('Kindle', self::VERSION_TYPE_FLOAT) >= 3.0 ) || |
|
1626 | + ($this->match('Kindle Fire') || |
|
1627 | + $this->is('Kindle') && $this->version('Kindle', self::VERSION_TYPE_FLOAT) >= 3.0) || |
|
1628 | 1628 | |
1629 | 1629 | // Nook Color 1.4.1 - Tested on original Nook Color, not Nook Tablet |
1630 | 1630 | $this->is('AndroidOS') && $this->is('NookTablet') || |
@@ -1643,28 +1643,28 @@ discard block |
||
1643 | 1643 | |
1644 | 1644 | // Opera Desktop 10-12 - Tested on OS X 10.7 and Windows 7 |
1645 | 1645 | $this->version('Opera', self::VERSION_TYPE_FLOAT) >= 10 && !$isMobile |
1646 | - ){ |
|
1646 | + ) { |
|
1647 | 1647 | return self::MOBILE_GRADE_A; |
1648 | 1648 | } |
1649 | 1649 | |
1650 | 1650 | if ( |
1651 | - $this->is('iOS') && $this->version('iPad', self::VERSION_TYPE_FLOAT)<4.3 || |
|
1652 | - $this->is('iOS') && $this->version('iPhone', self::VERSION_TYPE_FLOAT)<4.3 || |
|
1653 | - $this->is('iOS') && $this->version('iPod', self::VERSION_TYPE_FLOAT)<4.3 || |
|
1651 | + $this->is('iOS') && $this->version('iPad', self::VERSION_TYPE_FLOAT) < 4.3 || |
|
1652 | + $this->is('iOS') && $this->version('iPhone', self::VERSION_TYPE_FLOAT) < 4.3 || |
|
1653 | + $this->is('iOS') && $this->version('iPod', self::VERSION_TYPE_FLOAT) < 4.3 || |
|
1654 | 1654 | |
1655 | 1655 | // Blackberry 5.0: Tested on the Storm 2 9550, Bold 9770 |
1656 | - $this->is('Blackberry') && $this->version('BlackBerry', self::VERSION_TYPE_FLOAT) >= 5 && $this->version('BlackBerry', self::VERSION_TYPE_FLOAT)<6 || |
|
1656 | + $this->is('Blackberry') && $this->version('BlackBerry', self::VERSION_TYPE_FLOAT) >= 5 && $this->version('BlackBerry', self::VERSION_TYPE_FLOAT) < 6 || |
|
1657 | 1657 | |
1658 | 1658 | //Opera Mini (5.0-6.5) - Tested on iOS 3.2/4.3 and Android 2.3 |
1659 | 1659 | ($this->version('Opera Mini', self::VERSION_TYPE_FLOAT) >= 5.0 && $this->version('Opera Mini', self::VERSION_TYPE_FLOAT) <= 7.0 && |
1660 | - ($this->version('Android', self::VERSION_TYPE_FLOAT) >= 2.3 || $this->is('iOS')) ) || |
|
1660 | + ($this->version('Android', self::VERSION_TYPE_FLOAT) >= 2.3 || $this->is('iOS'))) || |
|
1661 | 1661 | |
1662 | 1662 | // Nokia Symbian^3 - Tested on Nokia N8 (Symbian^3), C7 (Symbian^3), also works on N97 (Symbian^1) |
1663 | 1663 | $this->match('NokiaN8|NokiaC7|N97.*Series60|Symbian/3') || |
1664 | 1664 | |
1665 | 1665 | // @todo: report this (tested on Nokia N71) |
1666 | 1666 | $this->version('Opera Mobi', self::VERSION_TYPE_FLOAT) >= 11 && $this->is('SymbianOS') |
1667 | - ){ |
|
1667 | + ) { |
|
1668 | 1668 | return self::MOBILE_GRADE_B; |
1669 | 1669 | } |
1670 | 1670 | |
@@ -1681,7 +1681,7 @@ discard block |
||
1681 | 1681 | |
1682 | 1682 | // Internet Explorer 7 and older - Tested on Windows XP |
1683 | 1683 | $this->version('IE', self::VERSION_TYPE_FLOAT) <= 7.0 && !$isMobile |
1684 | - ){ |
|
1684 | + ) { |
|
1685 | 1685 | return self::MOBILE_GRADE_C; |
1686 | 1686 | } |
1687 | 1687 |
@@ -17,7 +17,7 @@ |
||
17 | 17 | |
18 | 18 | // Included nicejson function to beautify the result JSON file. |
19 | 19 | // This library is not mandatory. |
20 | -if( file_exists(dirname(__FILE__).'/nicejson/nicejson.php') ) { |
|
20 | +if (file_exists(dirname(__FILE__).'/nicejson/nicejson.php')) { |
|
21 | 21 | include_once dirname(__FILE__).'/nicejson/nicejson.php'; |
22 | 22 | } |
23 | 23 |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | |
94 | 94 | // Save settings |
95 | 95 | $this->tpl++; |
96 | - $tpl =& $this->tpls[$this->tpl]; |
|
96 | + $tpl = & $this->tpls[$this->tpl]; |
|
97 | 97 | $tpl = array( |
98 | 98 | 'o_x' => $this->x, |
99 | 99 | 'o_y' => $this->y, |
@@ -126,8 +126,8 @@ discard block |
||
126 | 126 | $this->SetRightMargin($this->w - $w + $this->rMargin); |
127 | 127 | |
128 | 128 | if ($this->CurrentFont) { |
129 | - $fontkey = $this->FontFamily . $this->FontStyle; |
|
130 | - $this->_res['tpl'][$this->tpl]['fonts'][$fontkey] =& $this->fonts[$fontkey]; |
|
129 | + $fontkey = $this->FontFamily.$this->FontStyle; |
|
130 | + $this->_res['tpl'][$this->tpl]['fonts'][$fontkey] = & $this->fonts[$fontkey]; |
|
131 | 131 | |
132 | 132 | $this->_out(sprintf('BT /F%d %.2f Tf ET', $this->CurrentFont['i'], $this->FontSizePt)); |
133 | 133 | } |
@@ -150,7 +150,7 @@ discard block |
||
150 | 150 | |
151 | 151 | if ($this->_intpl) { |
152 | 152 | $this->_intpl = false; |
153 | - $tpl =& $this->tpls[$this->tpl]; |
|
153 | + $tpl = & $this->tpls[$this->tpl]; |
|
154 | 154 | $this->SetXY($tpl['o_x'], $tpl['o_y']); |
155 | 155 | $this->tMargin = $tpl['o_tMargin']; |
156 | 156 | $this->lMargin = $tpl['o_lMargin']; |
@@ -164,9 +164,9 @@ discard block |
||
164 | 164 | $this->FontSizePt = $tpl['o_FontSizePt']; |
165 | 165 | $this->FontSize = $tpl['o_FontSize']; |
166 | 166 | |
167 | - $fontkey = $this->FontFamily . $this->FontStyle; |
|
167 | + $fontkey = $this->FontFamily.$this->FontStyle; |
|
168 | 168 | if ($fontkey) |
169 | - $this->CurrentFont =& $this->fonts[$fontkey]; |
|
169 | + $this->CurrentFont = & $this->fonts[$fontkey]; |
|
170 | 170 | |
171 | 171 | return $this->tpl; |
172 | 172 | } else { |
@@ -199,10 +199,10 @@ discard block |
||
199 | 199 | $this->error('Template does not exist!'); |
200 | 200 | |
201 | 201 | if ($this->_intpl) { |
202 | - $this->_res['tpl'][$this->tpl]['tpls'][$tplidx] =& $this->tpls[$tplidx]; |
|
202 | + $this->_res['tpl'][$this->tpl]['tpls'][$tplidx] = & $this->tpls[$tplidx]; |
|
203 | 203 | } |
204 | 204 | |
205 | - $tpl =& $this->tpls[$tplidx]; |
|
205 | + $tpl = & $this->tpls[$tplidx]; |
|
206 | 206 | $w = $tpl['w']; |
207 | 207 | $h = $tpl['h']; |
208 | 208 | |
@@ -252,7 +252,7 @@ discard block |
||
252 | 252 | if (!isset($this->tpls[$tplidx])) |
253 | 253 | return false; |
254 | 254 | |
255 | - $tpl =& $this->tpls[$tplidx]; |
|
255 | + $tpl = & $this->tpls[$tplidx]; |
|
256 | 256 | $w = $tpl['w']; |
257 | 257 | $h = $tpl['h']; |
258 | 258 | |
@@ -261,9 +261,9 @@ discard block |
||
261 | 261 | $_h = $h; |
262 | 262 | } |
263 | 263 | |
264 | - if($_w == 0) |
|
264 | + if ($_w == 0) |
|
265 | 265 | $_w = $_h * $w / $h; |
266 | - if($_h == 0) |
|
266 | + if ($_h == 0) |
|
267 | 267 | $_h = $_w * $h / $w; |
268 | 268 | |
269 | 269 | return array("w" => $_w, "h" => $_h); |
@@ -272,7 +272,7 @@ discard block |
||
272 | 272 | /** |
273 | 273 | * See FPDF/TCPDF-Documentation ;-) |
274 | 274 | */ |
275 | - public function SetFont($family, $style = '', $size = 0, $fontfile='', $subset='default', $out=true) { |
|
275 | + public function SetFont($family, $style = '', $size = 0, $fontfile = '', $subset = 'default', $out = true) { |
|
276 | 276 | if (is_subclass_of($this, 'TCPDF')) { |
277 | 277 | $args = func_get_args(); |
278 | 278 | return call_user_func_array(array($this, 'TCPDF::SetFont'), $args); |
@@ -280,12 +280,12 @@ discard block |
||
280 | 280 | |
281 | 281 | parent::SetFont($family, $style, $size); |
282 | 282 | |
283 | - $fontkey = $this->FontFamily . $this->FontStyle; |
|
283 | + $fontkey = $this->FontFamily.$this->FontStyle; |
|
284 | 284 | |
285 | 285 | if ($this->_intpl) { |
286 | - $this->_res['tpl'][$this->tpl]['fonts'][$fontkey] =& $this->fonts[$fontkey]; |
|
286 | + $this->_res['tpl'][$this->tpl]['fonts'][$fontkey] = & $this->fonts[$fontkey]; |
|
287 | 287 | } else { |
288 | - $this->_res['page'][$this->page]['fonts'][$fontkey] =& $this->fonts[$fontkey]; |
|
288 | + $this->_res['page'][$this->page]['fonts'][$fontkey] = & $this->fonts[$fontkey]; |
|
289 | 289 | } |
290 | 290 | } |
291 | 291 | |
@@ -304,9 +304,9 @@ discard block |
||
304 | 304 | |
305 | 305 | $ret = parent::Image($file, $x, $y, $w, $h, $type, $link); |
306 | 306 | if ($this->_intpl) { |
307 | - $this->_res['tpl'][$this->tpl]['images'][$file] =& $this->images[$file]; |
|
307 | + $this->_res['tpl'][$this->tpl]['images'][$file] = & $this->images[$file]; |
|
308 | 308 | } else { |
309 | - $this->_res['page'][$this->page]['images'][$file] =& $this->images[$file]; |
|
309 | + $this->_res['page'][$this->page]['images'][$file] = & $this->images[$file]; |
|
310 | 310 | } |
311 | 311 | |
312 | 312 | return $ret; |
@@ -370,11 +370,11 @@ discard block |
||
370 | 370 | * Private Method that writes the form xobjects |
371 | 371 | */ |
372 | 372 | function _putformxobjects() { |
373 | - $filter=($this->compress) ? '/Filter /FlateDecode ' : ''; |
|
373 | + $filter = ($this->compress) ? '/Filter /FlateDecode ' : ''; |
|
374 | 374 | reset($this->tpls); |
375 | - foreach($this->tpls AS $tplidx => $tpl) { |
|
375 | + foreach ($this->tpls AS $tplidx => $tpl) { |
|
376 | 376 | |
377 | - $p=($this->compress) ? gzcompress($tpl['buffer']) : $tpl['buffer']; |
|
377 | + $p = ($this->compress) ? gzcompress($tpl['buffer']) : $tpl['buffer']; |
|
378 | 378 | $this->_newobj(); |
379 | 379 | $this->tpls[$tplidx]['n'] = $this->n; |
380 | 380 | $this->_out('<<'.$filter.'/Type /XObject'); |
@@ -402,27 +402,27 @@ discard block |
||
402 | 402 | $this->_out('<</ProcSet [/PDF /Text /ImageB /ImageC /ImageI]'); |
403 | 403 | if (isset($this->_res['tpl'][$tplidx]['fonts']) && count($this->_res['tpl'][$tplidx]['fonts'])) { |
404 | 404 | $this->_out('/Font <<'); |
405 | - foreach($this->_res['tpl'][$tplidx]['fonts'] as $font) |
|
406 | - $this->_out('/F' . $font['i'] . ' ' . $font['n'] . ' 0 R'); |
|
405 | + foreach ($this->_res['tpl'][$tplidx]['fonts'] as $font) |
|
406 | + $this->_out('/F'.$font['i'].' '.$font['n'].' 0 R'); |
|
407 | 407 | $this->_out('>>'); |
408 | 408 | } |
409 | - if(isset($this->_res['tpl'][$tplidx]['images']) && count($this->_res['tpl'][$tplidx]['images']) || |
|
409 | + if (isset($this->_res['tpl'][$tplidx]['images']) && count($this->_res['tpl'][$tplidx]['images']) || |
|
410 | 410 | isset($this->_res['tpl'][$tplidx]['tpls']) && count($this->_res['tpl'][$tplidx]['tpls'])) |
411 | 411 | { |
412 | 412 | $this->_out('/XObject <<'); |
413 | 413 | if (isset($this->_res['tpl'][$tplidx]['images']) && count($this->_res['tpl'][$tplidx]['images'])) { |
414 | - foreach($this->_res['tpl'][$tplidx]['images'] as $image) |
|
415 | - $this->_out('/I' . $image['i'] . ' ' . $image['n'] . ' 0 R'); |
|
414 | + foreach ($this->_res['tpl'][$tplidx]['images'] as $image) |
|
415 | + $this->_out('/I'.$image['i'].' '.$image['n'].' 0 R'); |
|
416 | 416 | } |
417 | 417 | if (isset($this->_res['tpl'][$tplidx]['tpls']) && count($this->_res['tpl'][$tplidx]['tpls'])) { |
418 | - foreach($this->_res['tpl'][$tplidx]['tpls'] as $i => $tpl) |
|
419 | - $this->_out($this->tplprefix . $i . ' ' . $tpl['n'] . ' 0 R'); |
|
418 | + foreach ($this->_res['tpl'][$tplidx]['tpls'] as $i => $tpl) |
|
419 | + $this->_out($this->tplprefix.$i.' '.$tpl['n'].' 0 R'); |
|
420 | 420 | } |
421 | 421 | $this->_out('>>'); |
422 | 422 | } |
423 | 423 | $this->_out('>>'); |
424 | 424 | |
425 | - $this->_out('/Length ' . strlen($p) . ' >>'); |
|
425 | + $this->_out('/Length '.strlen($p).' >>'); |
|
426 | 426 | $this->_putstream($p); |
427 | 427 | $this->_out('endobj'); |
428 | 428 | } |
@@ -441,7 +441,7 @@ discard block |
||
441 | 441 | parent::_putxobjectdict(); |
442 | 442 | |
443 | 443 | if (count($this->tpls)) { |
444 | - foreach($this->tpls as $tplidx => $tpl) { |
|
444 | + foreach ($this->tpls as $tplidx => $tpl) { |
|
445 | 445 | $this->_out(sprintf('%s%d %d 0 R', $this->tplprefix, $tplidx, $tpl['n'])); |
446 | 446 | } |
447 | 447 | } |
@@ -452,7 +452,7 @@ discard block |
||
452 | 452 | */ |
453 | 453 | function _out($s) { |
454 | 454 | if ($this->state == 2 && $this->_intpl) { |
455 | - $this->tpls[$this->tpl]['buffer'] .= $s . "\n"; |
|
455 | + $this->tpls[$this->tpl]['buffer'] .= $s."\n"; |
|
456 | 456 | } else { |
457 | 457 | parent::_out($s); |
458 | 458 | } |
@@ -140,7 +140,7 @@ |
||
140 | 140 | */ |
141 | 141 | private static function getDefaultCABundlePath() |
142 | 142 | { |
143 | - return \realpath(__DIR__ . '/../data/ca-certificates.crt'); |
|
143 | + return \realpath(__DIR__.'/../data/ca-certificates.crt'); |
|
144 | 144 | } |
145 | 145 | |
146 | 146 | /** |
@@ -41,8 +41,8 @@ discard block |
||
41 | 41 | */ |
42 | 42 | public static function retrieve($_id, $_opts = null) |
43 | 43 | { |
44 | - $msg = 'Customer Cash Balance cannot be retrieved without a ' . |
|
45 | - 'customer ID. Retrieve a Customer Cash Balance using ' . |
|
44 | + $msg = 'Customer Cash Balance cannot be retrieved without a '. |
|
45 | + 'customer ID. Retrieve a Customer Cash Balance using '. |
|
46 | 46 | "`Customer::retrieveCashBalance('customer_id')`."; |
47 | 47 | |
48 | 48 | throw new Exception\BadMethodCallException($msg); |
@@ -57,8 +57,8 @@ discard block |
||
57 | 57 | */ |
58 | 58 | public static function update($_id, $_params = null, $_options = null) |
59 | 59 | { |
60 | - $msg = 'Customer Cash Balance cannot be updated without a ' . |
|
61 | - 'customer ID. Retrieve a Customer Cash Balance using ' . |
|
60 | + $msg = 'Customer Cash Balance cannot be updated without a '. |
|
61 | + 'customer ID. Retrieve a Customer Cash Balance using '. |
|
62 | 62 | "`Customer::updateCashBalance('customer_id')`."; |
63 | 63 | |
64 | 64 | throw new Exception\BadMethodCallException($msg); |