Skip to content

Commit

Permalink
- Removed the @codingStandardsIgnoreFile in every php file in the fra…
Browse files Browse the repository at this point in the history
…mework.

- Made a couple of changes to some files already
- This will probably break the build. Let's see if I can fix all the issues
  • Loading branch information
dverkade committed Oct 20, 2016
1 parent 0c6227d commit 7d7c327
Show file tree
Hide file tree
Showing 136 changed files with 195 additions and 362 deletions.
12 changes: 7 additions & 5 deletions lib/internal/Magento/Framework/Acl/AclResource/Provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
* See COPYING.txt for license details.
*/

// @codingStandardsIgnoreFile

namespace Magento\Framework\Acl\AclResource;

class Provider implements ProviderInterface
Expand All @@ -24,8 +22,10 @@ class Provider implements ProviderInterface
* @param \Magento\Framework\Config\ReaderInterface $configReader
* @param TreeBuilder $resourceTreeBuilder
*/
public function __construct(\Magento\Framework\Config\ReaderInterface $configReader, TreeBuilder $resourceTreeBuilder)
{
public function __construct(
\Magento\Framework\Config\ReaderInterface $configReader,
TreeBuilder $resourceTreeBuilder
) {
$this->_configReader = $configReader;
$this->_resourceTreeBuilder = $resourceTreeBuilder;
}
Expand All @@ -37,7 +37,9 @@ public function getAclResources()
{
$aclResourceConfig = $this->_configReader->read();
if (!empty($aclResourceConfig['config']['acl']['resources'])) {
return $this->_resourceTreeBuilder->build($aclResourceConfig['config']['acl']['resources']);
return $this->_resourceTreeBuilder->build(
$aclResourceConfig['config']['acl']['resources']
);
}
return [];
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
* See COPYING.txt for license details.
*/

// @codingStandardsIgnoreFile

namespace Magento\Framework\Api\Test\Unit\Api;

/**
Expand All @@ -26,8 +24,8 @@ class ImageContentValidatorTest extends \PHPUnit_Framework_TestCase
protected function setUp()
{
$this->objectManager = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this);
$this->imageContentValidator = $this->objectManager->getObject(
\Magento\Framework\Api\ImageContentValidator::class
$this->imageContentValidator = $this->objectManager->getObject(
\Magento\Framework\Api\ImageContentValidator::class
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
* See COPYING.txt for license details.
*/

// @codingStandardsIgnoreFile

namespace Magento\Framework\Api\Test\Unit\Api;

/**
Expand Down Expand Up @@ -57,7 +55,7 @@ protected function setUp()
{
$this->objectManager = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this);

$this->directoryWriteMock = $this->getMockForAbstractClass(
$this->directoryWriteMock = $this->getMockForAbstractClass(
\Magento\Framework\Filesystem\Directory\WriteInterface::class
);
$this->fileSystemMock = $this->getMockBuilder(\Magento\Framework\Filesystem::class)
Expand All @@ -66,7 +64,7 @@ protected function setUp()
$this->fileSystemMock->expects($this->any())
->method('getDirectoryWrite')
->willReturn($this->directoryWriteMock);
$this->contentValidatorMock = $this->getMockBuilder(
$this->contentValidatorMock = $this->getMockBuilder(
\Magento\Framework\Api\ImageContentValidatorInterface::class)
->disableOriginalConstructor()
->getMock();
Expand All @@ -90,7 +88,7 @@ protected function setUp()
->disableOriginalConstructor()
->getMock();

$this->imageProcessor = $this->objectManager->getObject(
$this->imageProcessor = $this->objectManager->getObject(
\Magento\Framework\Api\ImageProcessor::class,
[
'fileSystem' => $this->fileSystemMock,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Copyright © 2016 Magento. All rights reserved.
* See COPYING.txt for license details.
*/
// @codingStandardsIgnoreFile

namespace Magento\Framework\Api\Test\Unit\Code\Generator;

use Magento\Framework\Api\ExtensionAttribute\Config\Converter;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Copyright © 2016 Magento. All rights reserved.
* See COPYING.txt for license details.
*/
// @codingStandardsIgnoreFile

namespace Magento\Framework\Api\Test\Unit\Code\Generator;

use Magento\Framework\Api\ExtensionAttribute\Config\Converter;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
* See COPYING.txt for license details.
*/

// @codingStandardsIgnoreFile

namespace Magento\Framework\Api\Test\Unit;

use Magento\Framework\Api\CustomAttributesDataInterface;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
* See COPYING.txt for license details.
*/

// @codingStandardsIgnoreFile

namespace Magento\Framework\App\Test\Unit\Action;

use \Magento\Framework\App\Action\Action;
Expand Down
2 changes: 0 additions & 2 deletions lib/internal/Magento/Framework/App/Test/Unit/AreaListTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
* See COPYING.txt for license details.
*/

// @codingStandardsIgnoreFile

namespace Magento\Framework\App\Test\Unit;

use \Magento\Framework\App\AreaList;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
* See COPYING.txt for license details.
*/

// @codingStandardsIgnoreFile

namespace Magento\Framework\App\Test\Unit;

use \Magento\Framework\App\Bootstrap;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
* See COPYING.txt for license details.
*/

// @codingStandardsIgnoreFile

namespace Magento\Framework\App\Test\Unit\ObjectManager;

class ConfigLoaderTest extends \PHPUnit_Framework_TestCase
Expand All @@ -32,15 +30,15 @@ class ConfigLoaderTest extends \PHPUnit_Framework_TestCase

protected function setUp()
{
$this->_readerMock = $this->getMock(
$this->_readerMock = $this->getMock(
\Magento\Framework\ObjectManager\Config\Reader\Dom::class,
[],
[],
'',
false
);

$this->_readerFactoryMock = $this->getMock(
$this->_readerFactoryMock = $this->getMock(
\Magento\Framework\ObjectManager\Config\Reader\DomFactory::class,
['create'],
[],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
* See COPYING.txt for license details.
*/

// @codingStandardsIgnoreFile

namespace Magento\Framework\App\Test\Unit;

class ReinitableConfigTest extends \PHPUnit_Framework_TestCase
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
* See COPYING.txt for license details.
*/

// @codingStandardsIgnoreFile

namespace Magento\Framework\App\Test\Unit\Request;

use Magento\Framework\App\Config\ScopeConfigInterface;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
* See COPYING.txt for license details.
*/

// @codingStandardsIgnoreFile

namespace Magento\Framework\App\Test\Unit\Response;

use \Magento\Framework\App\Response\Http;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
* See COPYING.txt for license details.
*/

// @codingStandardsIgnoreFile

namespace Magento\Framework\App\Test\Unit\Router;

class NoRouteHandlerListTest extends \PHPUnit_Framework_TestCase
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
* See COPYING.txt for license details.
*/

// @codingStandardsIgnoreFile

namespace Magento\Framework\App\Test\Unit\Router;

class NoRouteHandlerTest extends \Magento\Framework\TestFramework\Unit\BaseTestCase
Expand Down
2 changes: 0 additions & 2 deletions lib/internal/Magento/Framework/App/Test/Unit/StateTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
* See COPYING.txt for license details.
*/

// @codingStandardsIgnoreFile

namespace Magento\Framework\App\Test\Unit;

use \Magento\Framework\App\Area;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
* See COPYING.txt for license details.
*/

// @codingStandardsIgnoreFile

namespace Magento\Framework\App\Test\Unit;

use Magento\Framework\App\Bootstrap;
Expand Down
15 changes: 10 additions & 5 deletions lib/internal/Magento/Framework/Archive/Helper/File.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
* See COPYING.txt for license details.
*/

// @codingStandardsIgnoreFile

/**
* Helper class that simplifies files stream reading and writing
*/
Expand Down Expand Up @@ -98,7 +96,10 @@ public function open($mode = 'w+', $chmod = null)
if ($this->_isInWriteMode) {
if (!is_writable($this->_fileLocation)) {
throw new LocalizedException(
new \Magento\Framework\Phrase('Permission denied to write to %1', [$this->_fileLocation])
new \Magento\Framework\Phrase(
'Permission denied to write to %1',
[$this->_fileLocation]
)
);
}

Expand Down Expand Up @@ -199,7 +200,9 @@ protected function _open($mode)
$this->_fileHandler = @fopen($this->_filePath, $mode);

if (false === $this->_fileHandler) {
throw new LocalizedException(new \Magento\Framework\Phrase('Failed to open file %1', [$this->_filePath]));
throw new LocalizedException(
new \Magento\Framework\Phrase('Failed to open file %1', [$this->_filePath])
);
}
}

Expand All @@ -215,7 +218,9 @@ protected function _write($data)
$result = @fwrite($this->_fileHandler, $data);

if (false === $result) {
throw new LocalizedException(new \Magento\Framework\Phrase('Failed to write data to %1', [$this->_filePath]));
throw new LocalizedException(
new \Magento\Framework\Phrase('Failed to write data to %1', [$this->_filePath])
);
}
}

Expand Down
2 changes: 0 additions & 2 deletions lib/internal/Magento/Framework/Archive/Helper/File/Gz.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
* See COPYING.txt for license details.
*/

// @codingStandardsIgnoreFile

/**
* Helper class that simplifies gz files stream reading and writing
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
* See COPYING.txt for license details.
*/

// @codingStandardsIgnoreFile

namespace Magento\Framework\Autoload\Test\Unit;

use Composer\Autoload\ClassLoader;
Expand Down
7 changes: 4 additions & 3 deletions lib/internal/Magento/Framework/Backup/Archive/Tar.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
* See COPYING.txt for license details.
*/

// @codingStandardsIgnoreFile

/**
* Extended version of \Magento\Framework\Archive\Tar that supports filtering
*
Expand Down Expand Up @@ -41,7 +39,10 @@ protected function _createTar($skipRoot = false, $finalize = false)
\RecursiveIteratorIterator::SELF_FIRST
);

$iterator = new \Magento\Framework\Backup\Filesystem\Iterator\Filter($filesystemIterator, $this->_skipFiles);
$iterator = new \Magento\Framework\Backup\Filesystem\Iterator\Filter(
$filesystemIterator,
$this->_skipFiles
);

foreach ($iterator as $item) {
$this->_setCurrentFile($item->getPathname());
Expand Down
9 changes: 5 additions & 4 deletions lib/internal/Magento/Framework/Backup/Db/BackupFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
* See COPYING.txt for license details.
*/

// @codingStandardsIgnoreFile

namespace Magento\Framework\Backup\Db;

class BackupFactory
Expand All @@ -32,8 +30,11 @@ class BackupFactory
* @param string $backupInstanceName
* @param string $backupDbInstanceName
*/
public function __construct(\Magento\Framework\ObjectManagerInterface $objectManager, $backupInstanceName, $backupDbInstanceName)
{
public function __construct(
\Magento\Framework\ObjectManagerInterface $objectManager,
$backupInstanceName,
$backupDbInstanceName
) {
$this->_objectManager = $objectManager;
$this->_backupInstanceName = $backupInstanceName;
$this->_backupDbInstanceName = $backupDbInstanceName;
Expand Down
2 changes: 0 additions & 2 deletions lib/internal/Magento/Framework/Backup/Factory.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
* See COPYING.txt for license details.
*/

// @codingStandardsIgnoreFile

namespace Magento\Framework\Backup;

class Factory
Expand Down
2 changes: 0 additions & 2 deletions lib/internal/Magento/Framework/Backup/Filesystem.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
* See COPYING.txt for license details.
*/

// @codingStandardsIgnoreFile

namespace Magento\Framework\Backup;

use Magento\Framework\App\ObjectManager;
Expand Down
7 changes: 4 additions & 3 deletions lib/internal/Magento/Framework/Cache/Backend/Database.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
* See COPYING.txt for license details.
*/

// @codingStandardsIgnoreFile

/**
Tables declaration:
Expand Down Expand Up @@ -148,7 +146,10 @@ public function load($id, $doNotTestCacheValidity = false)
{
if ($this->_options['store_data'] && !$this->_options['infinite_loop_flag']) {
$this->_options['infinite_loop_flag'] = true;
$select = $this->_getConnection()->select()->from($this->_getDataTable(), 'data')->where('id=:cache_id');
$select = $this->_getConnection()->select()->from(
$this->_getDataTable(),
'data'
)->where('id=:cache_id');

if (!$doNotTestCacheValidity) {
$select->where('expire_time=0 OR expire_time>?', time());
Expand Down
2 changes: 0 additions & 2 deletions lib/internal/Magento/Framework/Cache/Backend/Eaccelerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
* See COPYING.txt for license details.
*/

// @codingStandardsIgnoreFile

namespace Magento\Framework\Cache\Backend;

class Eaccelerator extends \Zend_Cache_Backend implements \Zend_Cache_Backend_ExtendedInterface
Expand Down
2 changes: 0 additions & 2 deletions lib/internal/Magento/Framework/Cache/Test/Unit/CoreTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
* See COPYING.txt for license details.
*/

// @codingStandardsIgnoreFile

/**
* \Magento\Framework\Cache\Core test case
*/
Expand Down
Loading

0 comments on commit 7d7c327

Please sign in to comment.