Permalink
Browse files

Merge branch '#ZF2-151' of github.com:robertboloc/zf2 into #ZF2-151

  • Loading branch information...
2 parents 8680745 + 4cf730f commit 86e3975198e4abe33d892bcd7d352bc9d3996991 @robertboloc committed Oct 9, 2012
Showing with 647 additions and 390 deletions.
  1. +3 −1 .travis.yml
  2. +1 −1 demos/Zend/ProgressBar/Upload.php
  3. +1 −1 library/Zend/Authentication/Adapter/Ldap.php
  4. +0 −1 library/Zend/Cache/Pattern/CallbackCache.php
  5. +0 −1 library/Zend/Cache/Pattern/OutputCache.php
  6. +0 −1 library/Zend/Cache/Storage/Adapter/AbstractZendServer.php
  7. +0 −1 library/Zend/Cache/Storage/Adapter/Apc.php
  8. +6 −5 library/Zend/Cache/Storage/Adapter/Dba.php
  9. +3 −4 library/Zend/Cache/Storage/Adapter/Filesystem.php
  10. +1 −2 library/Zend/Cache/Storage/Adapter/Memcached.php
  11. +0 −1 library/Zend/Cache/Storage/Adapter/Memory.php
  12. +2 −2 library/Zend/Cache/Storage/Adapter/MemoryOptions.php
  13. +2 −3 library/Zend/Cache/Storage/Adapter/WinCache.php
  14. +0 −1 library/Zend/Cache/Storage/Adapter/WinCacheOptions.php
  15. +1 −2 library/Zend/Cache/Storage/Adapter/ZendServerDisk.php
  16. +1 −2 library/Zend/Cache/Storage/Adapter/ZendServerShm.php
  17. +0 −2 library/Zend/Cache/Storage/Plugin/ClearExpiredByFactor.php
  18. +0 −1 library/Zend/Cache/Storage/Plugin/ExceptionHandler.php
  19. +0 −1 library/Zend/Cache/Storage/Plugin/OptimizeByFactor.php
  20. +0 −1 library/Zend/Cache/Storage/Plugin/Serializer.php
  21. +1 −1 library/Zend/Cache/StorageFactory.php
  22. +0 −1 library/Zend/Captcha/ReCaptcha.php
  23. +1 −1 library/Zend/Code/Generator/BodyGenerator.php
  24. +0 −1 library/Zend/Code/Reflection/DocBlockReflection.php
  25. +0 −1 library/Zend/Code/Scanner/ClassScanner.php
  26. +0 −1 library/Zend/Config/Config.php
  27. +3 −3 library/Zend/Console/Adapter/Posix.php
  28. +1 −1 library/Zend/Console/Adapter/Windows.php
  29. +1 −1 library/Zend/Console/Prompt/Number.php
  30. +1 −2 library/Zend/Crypt/Password/Bcrypt.php
  31. +0 −2 library/Zend/Crypt/PublicKey/RsaOptions.php
  32. +0 −1 library/Zend/Db/Adapter/Driver/Pdo/Connection.php
  33. +0 −1 library/Zend/Db/Adapter/Driver/StatementInterface.php
  34. +0 −1 library/Zend/Db/Metadata/Metadata.php
  35. +0 −1 library/Zend/Db/Metadata/Source/MysqlMetadata.php
  36. +0 −1 library/Zend/Db/Metadata/Source/PostgresqlMetadata.php
  37. +0 −1 library/Zend/Db/Metadata/Source/SqlServerMetadata.php
  38. +0 −1 library/Zend/Db/Metadata/Source/SqliteMetadata.php
  39. +0 −1 library/Zend/Db/RowGateway/AbstractRowGateway.php
  40. +14 −7 library/Zend/Db/Sql/AbstractSql.php
  41. +3 −3 library/Zend/Db/Sql/Expression.php
  42. +4 −0 library/Zend/Db/Sql/ExpressionInterface.php
  43. +0 −3 library/Zend/Db/Sql/Having.php
  44. +1 −1 library/Zend/Db/Sql/Predicate/In.php
  45. +0 −3 library/Zend/Db/Sql/Where.php
  46. +135 −16 library/Zend/Db/TableGateway/Feature/EventFeature.php
  47. +1 −1 library/Zend/Db/TableGateway/Feature/EventFeature/TableGatewayEvent.php
  48. +0 −1 library/Zend/Dom/Query.php
  49. +4 −0 library/Zend/EventManager/EventManager.php
  50. +0 −1 library/Zend/EventManager/EventManagerInterface.php
  51. +0 −1 library/Zend/EventManager/GlobalEventManager.php
  52. +4 −0 library/Zend/EventManager/SharedEventManager.php
  53. +0 −1 library/Zend/EventManager/StaticEventManager.php
  54. +0 −1 library/Zend/Feed/Reader/Extension/DublinCore/Entry.php
  55. +0 −1 library/Zend/Feed/Reader/ExtensionManager.php
  56. +2 −2 library/Zend/Feed/Reader/Reader.php
  57. +1 −1 library/Zend/Feed/Writer/Entry.php
  58. +0 −1 library/Zend/Feed/Writer/ExtensionManager.php
  59. +0 −1 library/Zend/Feed/Writer/Feed.php
  60. +0 −1 library/Zend/Filter/AbstractFilter.php
  61. +0 −1 library/Zend/Filter/Null.php
  62. +0 −1 library/Zend/Filter/PregReplace.php
  63. +0 −1 library/Zend/Filter/StringTrim.php
  64. +0 −1 library/Zend/Form/Annotation/Object.php
  65. +3 −4 library/Zend/Form/Element/Checkbox.php
  66. +3 −4 library/Zend/Form/Element/Collection.php
  67. +0 −1 library/Zend/Form/Element/Date.php
  68. +0 −1 library/Zend/Form/Element/DateTime.php
  69. +0 −1 library/Zend/Form/Element/DateTimeLocal.php
  70. +0 −1 library/Zend/Form/Element/Month.php
  71. +0 −1 library/Zend/Form/Element/Time.php
  72. +0 −1 library/Zend/Form/Element/Week.php
  73. +0 −1 library/Zend/Form/Form.php
  74. +0 −1 library/Zend/Form/FormInterface.php
  75. +0 −1 library/Zend/Form/View/Helper/Captcha/AbstractWord.php
  76. +0 −1 library/Zend/Form/View/Helper/Captcha/ReCaptcha.php
  77. +0 −1 library/Zend/Form/View/Helper/FormCheckbox.php
  78. +1 −1 library/Zend/Form/View/Helper/FormCollection.php
  79. +0 −1 library/Zend/Form/View/Helper/FormMultiCheckbox.php
  80. +0 −1 library/Zend/Form/View/Helper/FormSelect.php
  81. +0 −1 library/Zend/Http/Header/Cookie.php
  82. +0 −1 library/Zend/Http/Header/Location.php
  83. +0 −1 library/Zend/I18n/Filter/Alnum.php
  84. +0 −1 library/Zend/I18n/Validator/Alpha.php
  85. +1 −1 library/Zend/Ldap/Collection/DefaultIterator.php
  86. +4 −4 library/Zend/Ldap/Dn.php
  87. +8 −8 library/Zend/Ldap/Ldap.php
  88. +1 −1 library/Zend/Ldap/Node/Schema/AttributeType/OpenLdap.php
  89. +0 −1 library/Zend/Log/Filter/SuppressFilter.php
  90. +0 −1 library/Zend/Log/Formatter/Base.php
  91. +0 −1 library/Zend/Log/Formatter/Db.php
  92. +0 −1 library/Zend/Log/Formatter/ErrorHandler.php
  93. +0 −1 library/Zend/Mail/Header/MessageId.php
  94. +8 −8 library/Zend/Mail/Protocol/Imap.php
  95. +4 −4 library/Zend/Mail/Protocol/Pop3.php
  96. +1 −1 library/Zend/Mail/Storage/Folder.php
  97. +2 −2 library/Zend/Mail/Storage/Folder/Maildir.php
  98. +2 −2 library/Zend/Mail/Storage/Folder/Mbox.php
  99. +2 −2 library/Zend/Mail/Storage/Imap.php
  100. +2 −2 library/Zend/Mail/Storage/Maildir.php
  101. +1 −1 library/Zend/Mail/Storage/Mbox.php
  102. +0 −1 library/Zend/Mail/Storage/Part/File.php
  103. +2 −2 library/Zend/Mail/Storage/Pop3.php
  104. +6 −6 library/Zend/Mail/Storage/Writable/Maildir.php
  105. +1 −1 library/Zend/Memory/MemoryManager.php
  106. +1 −1 library/Zend/Memory/Value.php
  107. +0 −1 library/Zend/ModuleManager/Listener/ConfigListener.php
  108. +0 −1 library/Zend/Mvc/Controller/AbstractRestfulController.php
  109. +0 −1 library/Zend/Mvc/Controller/Plugin/Redirect.php
  110. +0 −1 library/Zend/Mvc/DispatchListener.php
  111. +0 −1 library/Zend/Mvc/Router/Console/Catchall.php
  112. +0 −1 library/Zend/Mvc/Router/Console/SimpleRouteStack.php
  113. +0 −2 library/Zend/Mvc/Router/SimpleRouteStack.php
  114. +1 −1 library/Zend/Mvc/View/Console/ExceptionStrategy.php
  115. +0 −1 library/Zend/Mvc/View/Console/RouteNotFoundStrategy.php
  116. +0 −4 library/Zend/Mvc/View/Console/ViewManager.php
  117. +0 −1 library/Zend/Mvc/View/Http/InjectViewModelListener.php
  118. +0 −4 library/Zend/Mvc/View/Http/ViewManager.php
  119. +0 −1 library/Zend/Navigation/AbstractContainer.php
  120. +1 −1 library/Zend/Navigation/Page/AbstractPage.php
  121. +0 −1 library/Zend/Navigation/Page/Mvc.php
  122. +0 −1 library/Zend/Navigation/Service/AbstractNavigationFactory.php
  123. +2 −3 library/Zend/Paginator/Paginator.php
  124. +4 −4 library/Zend/Serializer/Adapter/PythonPickle.php
  125. +0 −1 library/Zend/Serializer/Adapter/WddxOptions.php
  126. +0 −1 library/Zend/Session/Config/SessionConfig.php
  127. +0 −1 library/Zend/Session/SaveHandler/DbTableGateway.php
  128. +2 −3 library/Zend/Soap/AutoDiscover.php
  129. +1 −1 library/Zend/Soap/Client.php
  130. +0 −1 library/Zend/Soap/Server/DocumentLiteralWrapper.php
  131. +0 −1 library/Zend/Text/Table/DecoratorManager.php
  132. +1 −1 library/Zend/Validator/DateStep.php
  133. +0 −1 library/Zend/Validator/File/Sha1.php
  134. +1 −2 library/Zend/Validator/Ip.php
  135. +0 −1 library/Zend/View/Helper/EscapeCss.php
  136. +0 −1 library/Zend/View/Helper/EscapeHtml.php
  137. +0 −1 library/Zend/View/Helper/EscapeHtmlAttr.php
  138. +0 −1 library/Zend/View/Helper/EscapeJs.php
  139. +0 −1 library/Zend/View/Helper/EscapeUrl.php
  140. +0 −1 library/Zend/View/Helper/Navigation/HelperInterface.php
  141. +0 −2 library/Zend/View/Model/ConsoleModel.php
  142. +0 −1 library/Zend/View/Resolver/AggregateResolver.php
  143. +0 −1 library/Zend/View/Strategy/FeedStrategy.php
  144. +0 −1 library/Zend/View/Strategy/JsonStrategy.php
  145. +0 −2 library/Zend/View/Strategy/PhpRendererStrategy.php
  146. +0 −1 library/Zend/View/View.php
  147. +1 −1 library/Zend/XmlRpc/Server.php
  148. +2 −2 library/Zend/XmlRpc/Value/Boolean.php
  149. +1 −1 library/Zend/XmlRpc/Value/DateTime.php
  150. +3 −3 library/Zend/XmlRpc/Value/Double.php
  151. +1 −1 library/Zend/XmlRpc/Value/Integer.php
  152. +2 −2 library/Zend/XmlRpc/Value/String.php
  153. +0 −1 tests/ZendTest/Authentication/Adapter/Http/AuthTest.php
  154. +0 −1 tests/ZendTest/Authentication/Adapter/Http/ProxyTest.php
  155. +1 −1 tests/ZendTest/Cache/Storage/Adapter/AbstractDbaTest.php
  156. +0 −1 tests/ZendTest/Cache/Storage/Adapter/AbstractZendServerTest.php
  157. +32 −1 tests/ZendTest/Cache/Storage/Adapter/CommonAdapterTest.php
  158. +0 −1 tests/ZendTest/Cache/Storage/Adapter/MemcachedTest.php
  159. +0 −3 tests/ZendTest/Cache/Storage/Plugin/IgnoreUserAbortTest.php
  160. +0 −1 tests/ZendTest/Captcha/FigletTest.php
  161. +0 −1 tests/ZendTest/Captcha/ImageTest.php
  162. +0 −1 tests/ZendTest/Code/Reflection/DocBlockReflectionTest.php
  163. +1 −0 tests/ZendTest/Code/Reflection/TestAsset/TestSampleClass8.php
  164. +2 −2 tests/ZendTest/Code/Scanner/ClassScannerTest.php
  165. +0 −1 tests/ZendTest/Code/Scanner/DerivedClassScannerTest.php
  166. +2 −2 tests/ZendTest/Code/Scanner/MethodScannerTest.php
  167. +0 −1 tests/ZendTest/Code/TestAsset/BarClass.php
  168. +0 −1 tests/ZendTest/Config/Reader/AbstractReaderTestCase.php
  169. +0 −1 tests/ZendTest/Console/GetoptTest.php
  170. +11 −0 tests/ZendTest/Db/Sql/AbstractSqlTest.php
  171. +1 −1 tests/ZendTest/Db/Sql/ExpressionTest.php
  172. +1 −1 tests/ZendTest/Db/Sql/Predicate/InTest.php
  173. +252 −0 tests/ZendTest/Db/TableGateway/Feature/EventFeatureTest.php
  174. +0 −1 tests/ZendTest/Di/Definition/RuntimeDefinitionTest.php
  175. +0 −1 tests/ZendTest/Di/DefinitionListTest.php
  176. +70 −0 tests/ZendTest/EventManager/StaticEventManagerTest.php
  177. +0 −1 tests/ZendTest/Filter/Compress/TarLoadArchiveTarTest.php
  178. +0 −1 tests/ZendTest/Filter/DecryptTest.php
  179. +0 −1 tests/ZendTest/Filter/EncryptTest.php
  180. +0 −1 tests/ZendTest/Form/Element/CollectionTest.php
  181. +0 −1 tests/ZendTest/Form/Element/ColorTest.php
  182. +0 −2 tests/ZendTest/Form/Element/CsrfTest.php
  183. +0 −1 tests/ZendTest/Form/Element/DateTest.php
  184. +0 −1 tests/ZendTest/Form/Element/DateTimeLocalTest.php
  185. +0 −1 tests/ZendTest/Form/Element/DateTimeTest.php
  186. +0 −2 tests/ZendTest/Form/Element/EmailTest.php
  187. +0 −1 tests/ZendTest/Form/Element/MonthTest.php
  188. +0 −1 tests/ZendTest/Form/Element/MultiCheckboxTest.php
  189. +0 −1 tests/ZendTest/Form/Element/NumberTest.php
  190. +0 −1 tests/ZendTest/Form/Element/RadioTest.php
  191. +0 −1 tests/ZendTest/Form/Element/RangeTest.php
  192. +0 −1 tests/ZendTest/Form/Element/SelectTest.php
  193. +0 −1 tests/ZendTest/Form/Element/TimeTest.php
  194. +0 −1 tests/ZendTest/Form/Element/UrlTest.php
  195. +0 −1 tests/ZendTest/Form/Element/WeekTest.php
  196. +0 −1 tests/ZendTest/Form/ElementTest.php
  197. +0 −1 tests/ZendTest/Form/FactoryTest.php
  198. +0 −1 tests/ZendTest/Form/TestAsset/HydratorStrategyEntityB.php
  199. +0 −1 tests/ZendTest/Form/View/Helper/Captcha/ReCaptchaTest.php
  200. +0 −1 tests/ZendTest/Form/View/Helper/FormButtonTest.php
  201. +0 −1 tests/ZendTest/Form/View/Helper/FormCaptchaTest.php
  202. +0 −1 tests/ZendTest/Form/View/Helper/FormCollectionTest.php
  203. +0 −1 tests/ZendTest/Form/View/Helper/FormLabelTest.php
  204. +0 −1 tests/ZendTest/Form/View/Helper/FormSelectTest.php
  205. +0 −1 tests/ZendTest/Form/View/Helper/FormTest.php
  206. +0 −1 tests/ZendTest/Http/Client/UseCaseTest.php
  207. +0 −1 tests/ZendTest/Http/Header/AcceptTest.php
  208. +0 −1 tests/ZendTest/Http/Header/ContentLocationTest.php
  209. +0 −1 tests/ZendTest/Http/Header/LocationTest.php
  210. +0 −1 tests/ZendTest/Http/Header/RefererTest.php
  211. +0 −3 tests/ZendTest/InputFilter/InputFilterTest.php
  212. +0 −1 tests/ZendTest/Log/Filter/MockTest.php
  213. +0 −1 tests/ZendTest/Log/Filter/PriorityTest.php
  214. +0 −2 tests/ZendTest/Log/Filter/RegexTest.php
  215. +0 −1 tests/ZendTest/Log/Filter/SuppressFilterTest.php
  216. +0 −1 tests/ZendTest/Log/Filter/ValidatorTest.php
  217. +0 −1 tests/ZendTest/Log/Formatter/DbTest.php
  218. +0 −2 tests/ZendTest/Log/Formatter/SimpleTest.php
  219. +0 −1 tests/ZendTest/Log/Writer/DbTest.php
  220. +0 −1 tests/ZendTest/Log/Writer/MailTest.php
  221. +0 −1 tests/ZendTest/Log/Writer/MockTest.php
  222. +0 −1 tests/ZendTest/Log/Writer/MongoDBTest.php
  223. +0 −1 tests/ZendTest/Log/Writer/NullTest.php
  224. +0 −1 tests/ZendTest/Log/Writer/StreamTest.php
  225. +0 −1 tests/ZendTest/Mail/Protocol/SmtpTest.php
  226. +0 −2 tests/ZendTest/Mail/Storage/ImapTest.php
  227. +0 −1 tests/ZendTest/Mail/Storage/MaildirWritableTest.php
  228. +0 −1 tests/ZendTest/Mail/Storage/MboxFolderTest.php
  229. +0 −1 tests/ZendTest/ModuleManager/Listener/AutoloaderListenerTest.php
  230. +0 −2 tests/ZendTest/ModuleManager/Listener/DefaultListenerAggregateTest.php
  231. +0 −1 tests/ZendTest/ModuleManager/Listener/ListenerOptionsTest.php
  232. +0 −3 tests/ZendTest/ModuleManager/Listener/OnBootstrapListenerTest.php
  233. +0 −1 tests/ZendTest/ModuleManager/ModuleManagerTest.php
  234. +0 −1 tests/ZendTest/ModuleManager/TestAsset/LoadOtherModule/Module.php
  235. +0 −1 tests/ZendTest/Mvc/ApplicationTest.php
  236. +0 −1 tests/ZendTest/Mvc/Router/Console/SimpleTest.php
  237. +0 −1 tests/ZendTest/Mvc/Router/SimpleRouteStackTest.php
  238. +0 −1 tests/ZendTest/Mvc/Service/DiStrictAbstractServiceFactoryTest.php
  239. +0 −8 tests/ZendTest/Mvc/View/DefaultRendereringStrategyTest.php
  240. +0 −1 tests/ZendTest/Mvc/View/ExceptionStrategyTest.php
  241. +0 −1 tests/ZendTest/Mvc/View/RouteNotFoundStrategyTest.php
  242. +0 −1 tests/ZendTest/Paginator/Adapter/DbSelectTest.php
  243. +0 −1 tests/ZendTest/Paginator/PaginatorTest.php
  244. +0 −1 tests/ZendTest/ServiceManager/Di/DiAbstractServiceFactoryTest.php
  245. +0 −2 tests/ZendTest/ServiceManager/Di/DiServiceFactoryTest.php
  246. +0 −1 tests/ZendTest/Session/SaveHandler/CacheTest.php
  247. +0 −3 tests/ZendTest/Session/TestAsset/TestManager.php
  248. +0 −1 tests/ZendTest/Soap/AutoDiscoverTest.php
  249. +0 −1 tests/ZendTest/Soap/ServerTest.php
  250. +0 −1 tests/ZendTest/Stdlib/OptionsTest.php
  251. +0 −1 tests/ZendTest/Stdlib/PriorityQueueTest.php
  252. +0 −1 tests/ZendTest/Stdlib/TestAsset/HydratorStrategyEntityB.php
  253. +0 −1 tests/ZendTest/Validator/DateStepTest.php
  254. +0 −3 tests/ZendTest/Validator/TestAsset/SessionManager.php
  255. +0 −1 tests/ZendTest/View/Helper/AbstractTest.php
  256. +0 −1 tests/ZendTest/View/Helper/RenderChildModelTest.php
  257. +0 −3 tests/ZendTest/View/Model/JsonModelTest.php
  258. +0 −1 tests/ZendTest/View/Renderer/FeedRendererTest.php
  259. +0 −1 tests/ZendTest/View/Resolver/AggregateResolverTest.php
  260. +0 −2 tests/ZendTest/View/Strategy/PhpRendererStrategyTest.php
  261. +0 −1 tests/ZendTest/View/TestAsset/Invokable.php
  262. +0 −1 tests/ZendTest/View/TestAsset/Uninvokable.php
  263. +0 −1 tests/ZendTest/XmlRpc/BigIntegerValueTest.php
  264. +0 −1 tests/ZendTest/XmlRpc/ClientTest.php
  265. +0 −1 tests/ZendTest/XmlRpc/ValueTest.php
View
@@ -12,7 +12,9 @@ before_install:
script:
- php ./tests/run-tests.php
- - output=$(php php-cs-fixer.phar fix -v --dry-run --level=psr2 .); if [[ $output ]]; then while read -r line; do echo -e "\e[00;31m$line\e[00m"; done <<< "$output"; false; fi;
+ - output=$(php php-cs-fixer.phar fix -v --dry-run --level=psr2 library); if [[ $output ]]; then while read -r line; do echo -e "\e[00;31m$line\e[00m"; done <<< "$output"; false; fi;
+ - output=$(php php-cs-fixer.phar fix -v --dry-run --level=psr2 tests); if [[ $output ]]; then while read -r line; do echo -e "\e[00;31m$line\e[00m"; done <<< "$output"; false; fi;
+ - output=$(php php-cs-fixer.phar fix -v --dry-run --level=psr2 bin); if [[ $output ]]; then while read -r line; do echo -e "\e[00;31m$line\e[00m"; done <<< "$output"; false; fi;
notifications:
irc: "irc.freenode.org#zftalk.dev"
@@ -116,7 +116,7 @@ function makeRequest(url)
if (httpRequest.overrideMimeType) {
httpRequest.overrideMimeType('text/xml');
}
- } elseif (window.ActiveXObject) {
+ } else if (window.ActiveXObject) {
try {
httpRequest = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
@@ -386,7 +386,7 @@ protected function prepareOptions(ZendLdap\Ldap $ldap, array $options)
unset($options[$key]);
switch ($key) {
case 'groupScope':
- $value = (int)$value;
+ $value = (int) $value;
if (in_array($value, array(ZendLdap\Ldap::SEARCH_SCOPE_BASE,
ZendLdap\Ldap::SEARCH_SCOPE_ONE, ZendLdap\Ldap::SEARCH_SCOPE_SUB), true)) {
$adapterOptions[$key] = $value;
@@ -11,7 +11,6 @@
namespace Zend\Cache\Pattern;
use Zend\Cache\Exception;
-use Zend\Cache\StorageFactory;
use Zend\Stdlib\ErrorHandler;
/**
@@ -11,7 +11,6 @@
namespace Zend\Cache\Pattern;
use Zend\Cache\Exception;
-use Zend\Cache\StorageFactory;
/**
* @category Zend
@@ -10,7 +10,6 @@
namespace Zend\Cache\Storage\Adapter;
-use ArrayObject;
use stdClass;
use Zend\Cache\Exception;
use Zend\Cache\Storage\Capabilities;
@@ -11,7 +11,6 @@
namespace Zend\Cache\Storage\Adapter;
use APCIterator as BaseApcIterator;
-use ArrayObject;
use stdClass;
use Traversable;
use Zend\Cache\Exception;
@@ -117,19 +117,20 @@ public function getOptions()
*/
public function getTotalSpace()
{
- if ($this->totalSpace !== null) {
+ if ($this->totalSpace === null) {
$pathname = $this->getOptions()->getPathname();
if ($pathname === '') {
throw new Exception\LogicException('No pathname to database file');
}
ErrorHandler::start();
- $total = disk_total_space($pathname);
+ $total = disk_total_space(dirname($pathname));
$error = ErrorHandler::stop();
if ($total === false) {
throw new Exception\RuntimeException("Can't detect total space of '{$pathname}'", 0, $error);
}
+ $this->totalSpace = $total;
// clean total space buffer on change pathname
$events = $this->getEventManager();
@@ -142,7 +143,7 @@ public function getTotalSpace()
$events->detach($handle);
}
};
- $handle = $events->attach($callback);
+ $handle = $events->attach('option', $callback);
}
return $this->totalSpace;
@@ -164,7 +165,7 @@ public function getAvailableSpace()
}
ErrorHandler::start();
- $avail = disk_free_space($pathname);
+ $avail = disk_free_space(dirname($pathname));
$error = ErrorHandler::stop();
if ($avail === false) {
throw new Exception\RuntimeException("Can't detect free space of '{$pathname}'", 0, $error);
@@ -516,7 +517,7 @@ protected function _open()
protected function _close()
{
if ($this->handle) {
- ErrorHandler::start(E_WARNING);
+ ErrorHandler::start(E_NOTICE);
dba_close($this->handle);
ErrorHandler::stop();
$this->handle = null;
@@ -10,7 +10,6 @@
namespace Zend\Cache\Storage\Adapter;
-use ArrayObject;
use Exception as BaseException;
use GlobIterator;
use stdClass;
@@ -24,7 +23,6 @@
use Zend\Cache\Storage\FlushableInterface;
use Zend\Cache\Storage\IterableInterface;
use Zend\Cache\Storage\OptimizableInterface;
-use Zend\Cache\Storage\StorageInterface;
use Zend\Cache\Storage\TaggableInterface;
use Zend\Cache\Storage\TotalSpaceCapableInterface;
use Zend\Stdlib\ErrorHandler;
@@ -385,7 +383,7 @@ public function optimize()
*/
public function getTotalSpace()
{
- if ($this->totalSpace !== null) {
+ if ($this->totalSpace === null) {
$path = $this->getOptions()->getCacheDir();
ErrorHandler::start();
@@ -394,6 +392,7 @@ public function getTotalSpace()
if ($total === false) {
throw new Exception\RuntimeException("Can't detect total space of '{$path}'", 0, $error);
}
+ $this->totalSpace = $total;
// clean total space buffer on change cache_dir
$events = $this->getEventManager();
@@ -406,7 +405,7 @@ public function getTotalSpace()
$events->detach($handle);
}
};
- $handle = $events->attach($callback);
+ $handle = $events->attach('option', $callback);
}
return $this->totalSpace;
@@ -10,7 +10,6 @@
namespace Zend\Cache\Storage\Adapter;
-use ArrayObject;
use Memcached as MemcachedResource;
use stdClass;
use Traversable;
@@ -476,7 +475,7 @@ protected function internalRemoveItems(array & $normalizedKeys)
*/
protected function internalIncrementItem(& $normalizedKey, & $value)
{
- $value = (int)$value;
+ $value = (int) $value;
$newValue = $this->memcached->increment($normalizedKey, $value);
if ($newValue === false) {
@@ -10,7 +10,6 @@
namespace Zend\Cache\Storage\Adapter;
-use ArrayObject;
use stdClass;
use Zend\Cache\Exception;
use Zend\Cache\Storage\AvailableSpaceCapableInterface;
@@ -66,7 +66,7 @@ public function getMemoryLimit()
// By default use half of PHP's memory limit if possible
$memoryLimit = $this->normalizeMemoryLimit(ini_get('memory_limit'));
if ($memoryLimit >= 0) {
- $this->memoryLimit = (int)($memoryLimit / 2);
+ $this->memoryLimit = (int) ($memoryLimit / 2);
} else {
// disable memory limit
$this->memoryLimit = 0;
@@ -86,7 +86,7 @@ public function getMemoryLimit()
protected function normalizeMemoryLimit($value)
{
if (is_numeric($value)) {
- return (int)$value;
+ return (int) $value;
}
if (!preg_match('/(\-?\d+)\s*(\w*)/', ini_get('memory_limit'), $matches)) {
@@ -10,7 +10,6 @@
namespace Zend\Cache\Storage\Adapter;
-use ArrayObject;
use stdClass;
use Traversable;
use Zend\Cache\Exception;
@@ -413,7 +412,7 @@ protected function internalIncrementItem(& $normalizedKey, & $value)
$options = $this->getOptions();
$prefix = $options->getNamespace() . $options->getNamespaceSeparator();
$internalKey = $prefix . $normalizedKey;
- return wincache_ucache_inc($internalKey, (int)$value);
+ return wincache_ucache_inc($internalKey, (int) $value);
}
/**
@@ -429,7 +428,7 @@ protected function internalDecrementItem(& $normalizedKey, & $value)
$options = $this->getOptions();
$prefix = $options->getNamespace() . $options->getNamespaceSeparator();
$internalKey = $prefix . $normalizedKey;
- return wincache_ucache_dec($internalKey, (int)$value);
+ return wincache_ucache_dec($internalKey, (int) $value);
}
/* status */
@@ -10,7 +10,6 @@
namespace Zend\Cache\Storage\Adapter;
-use Zend\Cache\Exception;
/**
* These are options specific to the APC adapter
@@ -10,7 +10,6 @@
namespace Zend\Cache\Storage\Adapter;
-use ArrayObject;
use Zend\Cache\Exception;
use Zend\Cache\Storage\AvailableSpaceCapableInterface;
use Zend\Cache\Storage\ClearByNamespaceInterface;
@@ -154,7 +153,7 @@ protected function zdcStore($internalKey, $value, $ttl)
*/
protected function zdcFetch($internalKey)
{
- return zend_disk_cache_fetch((string)$internalKey);
+ return zend_disk_cache_fetch((string) $internalKey);
}
/**
@@ -10,7 +10,6 @@
namespace Zend\Cache\Storage\Adapter;
-use ArrayObject;
use Zend\Cache\Exception;
use Zend\Cache\Storage\ClearByNamespaceInterface;
use Zend\Cache\Storage\FlushableInterface;
@@ -111,7 +110,7 @@ protected function zdcStore($internalKey, $value, $ttl)
*/
protected function zdcFetch($internalKey)
{
- return zend_shm_cache_fetch((string)$internalKey);
+ return zend_shm_cache_fetch((string) $internalKey);
}
/**
@@ -10,11 +10,9 @@
namespace Zend\Cache\Storage\Plugin;
-use Traversable;
use Zend\Cache\Exception;
use Zend\Cache\Storage\ClearExpiredInterface;
use Zend\Cache\Storage\PostEvent;
-use Zend\Cache\Storage\StorageInterface;
use Zend\EventManager\EventManagerInterface;
/**
@@ -10,7 +10,6 @@
namespace Zend\Cache\Storage\Plugin;
-use Traversable;
use Zend\Cache\Exception;
use Zend\Cache\Storage\ExceptionEvent;
use Zend\EventManager\EventManagerInterface;
@@ -10,7 +10,6 @@
namespace Zend\Cache\Storage\Plugin;
-use Traversable;
use Zend\Cache\Exception;
use Zend\Cache\Storage\OptimizableInterface;
use Zend\Cache\Storage\PostEvent;
@@ -11,7 +11,6 @@
namespace Zend\Cache\Storage\Plugin;
use stdClass;
-use Traversable;
use Zend\Cache\Exception;
use Zend\Cache\Storage\Capabilities;
use Zend\Cache\Storage\Event;
@@ -73,7 +73,7 @@ public static function factory($cfg)
$adapterOptions = array_merge($adapterOptions, $cfg['options']);
}
- $adapter = static::adapterFactory((string)$adapterName, $adapterOptions);
+ $adapter = static::adapterFactory((string) $adapterName, $adapterOptions);
// add plugins
if (isset($cfg['plugins'])) {
@@ -11,7 +11,6 @@
namespace Zend\Captcha;
use Traversable;
-use Zend\Form\Element;
use ZendService\ReCaptcha\ReCaptcha as ReCaptchaService;
/**
@@ -41,7 +41,7 @@ public function setContent($content)
*/
public function getContent()
{
- return (string)$this->content;
+ return (string) $this->content;
}
/**
@@ -11,7 +11,6 @@
namespace Zend\Code\Reflection;
use Reflector;
-use Zend\Code\Annotation\AnnotationManager;
use Zend\Code\Scanner\DocBlockScanner;
/**
@@ -10,7 +10,6 @@
namespace Zend\Code\Scanner;
-use Zend\Code\Annotation\AnnotationManager;
use Zend\Code\Exception;
use Zend\Code\NameInformation;
@@ -13,7 +13,6 @@
use ArrayAccess;
use Countable;
use Iterator;
-use Zend\Stdlib\ArrayUtils;
/**
* Provides a property based interface to an array.
@@ -111,15 +111,15 @@ public function getWidth()
* Try to read env variable
*/
if (($result = getenv('COLUMNS')) !== false) {
- return $width = (int)$result;
+ return $width = (int) $result;
}
/**
* Try to read console size from "tput" command
*/
$result = exec('tput cols', $output, $return);
if (!$return && is_numeric($result)) {
- return $width = (int)$result;
+ return $width = (int) $result;
}
return $width = parent::getWidth();
@@ -145,7 +145,7 @@ public function getHeight()
// Try to read console size from "tput" command
$result = exec('tput lines', $output, $return);
if (!$return && is_numeric($result)) {
- return $height = (int)$result;
+ return $height = (int) $result;
}
return $height = parent::getHeight();
@@ -85,7 +85,7 @@ public function getHeight()
}
if (count($this->probeResult) && (int) $this->probeResult[1]) {
- $height = (int)$this->probeResult[1];
+ $height = (int) $this->probeResult[1];
} else {
$height = parent::getheight();
}
@@ -110,7 +110,7 @@ public function show()
* Cast proper type
*/
if ($number !== null) {
- $number = $this->allowFloat ? (double)$number : (int)$number;
+ $number = $this->allowFloat ? (double) $number : (int) $number;
}
return $this->lastResponse = $number;
Oops, something went wrong.

0 comments on commit 86e3975

Please sign in to comment.