Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "",
"type": "bitrix-d7-module",
"require": {
"squizlabs/php_codesniffer": "3.6"
"squizlabs/php_codesniffer": "3.7.2"
},
"autoload" : {
"files": ["./vendor/squizlabs/php_codesniffer/autoload.php"]
Expand Down
2 changes: 1 addition & 1 deletion vendor/autoload.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@

require_once __DIR__ . '/composer/autoload_real.php';

return ComposerAutoloaderInit087501d35256718afd57a326e98e2cf2::getLoader();
return ComposerAutoloaderInit41c4a817d788db8b07afa066797a1139::getLoader();
14 changes: 7 additions & 7 deletions vendor/composer/autoload_real.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

// autoload_real.php @generated by Composer

class ComposerAutoloaderInit087501d35256718afd57a326e98e2cf2
class ComposerAutoloaderInit41c4a817d788db8b07afa066797a1139
{
private static $loader;

Expand All @@ -24,18 +24,18 @@ public static function getLoader()

require __DIR__ . '/platform_check.php';

spl_autoload_register(array('ComposerAutoloaderInit087501d35256718afd57a326e98e2cf2', 'loadClassLoader'), true, true);
spl_autoload_register(array('ComposerAutoloaderInit41c4a817d788db8b07afa066797a1139', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
spl_autoload_unregister(array('ComposerAutoloaderInit087501d35256718afd57a326e98e2cf2', 'loadClassLoader'));
spl_autoload_unregister(array('ComposerAutoloaderInit41c4a817d788db8b07afa066797a1139', 'loadClassLoader'));

require __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInit087501d35256718afd57a326e98e2cf2::getInitializer($loader));
call_user_func(\Composer\Autoload\ComposerStaticInit41c4a817d788db8b07afa066797a1139::getInitializer($loader));

$loader->register(true);

$includeFiles = \Composer\Autoload\ComposerStaticInit087501d35256718afd57a326e98e2cf2::$files;
$includeFiles = \Composer\Autoload\ComposerStaticInit41c4a817d788db8b07afa066797a1139::$files;
foreach ($includeFiles as $fileIdentifier => $file) {
composerRequire087501d35256718afd57a326e98e2cf2($fileIdentifier, $file);
composerRequire41c4a817d788db8b07afa066797a1139($fileIdentifier, $file);
}

return $loader;
Expand All @@ -47,7 +47,7 @@ public static function getLoader()
* @param string $file
* @return void
*/
function composerRequire087501d35256718afd57a326e98e2cf2($fileIdentifier, $file)
function composerRequire41c4a817d788db8b07afa066797a1139($fileIdentifier, $file)
{
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
Expand Down
4 changes: 2 additions & 2 deletions vendor/composer/autoload_static.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Composer\Autoload;

class ComposerStaticInit087501d35256718afd57a326e98e2cf2
class ComposerStaticInit41c4a817d788db8b07afa066797a1139
{
public static $files = array (
'a059625496c8f9f5b18f05115c70e8d0' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/autoload.php',
Expand All @@ -17,7 +17,7 @@ class ComposerStaticInit087501d35256718afd57a326e98e2cf2
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->classMap = ComposerStaticInit087501d35256718afd57a326e98e2cf2::$classMap;
$loader->classMap = ComposerStaticInit41c4a817d788db8b07afa066797a1139::$classMap;

}, null, ClassLoader::class);
}
Expand Down
15 changes: 8 additions & 7 deletions vendor/composer/installed.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
"packages": [
{
"name": "squizlabs/php_codesniffer",
"version": "3.6.0",
"version_normalized": "3.6.0.0",
"version": "3.7.2",
"version_normalized": "3.7.2.0",
"source": {
"type": "git",
"url": "https://github.com/squizlabs/PHP_CodeSniffer.git",
"reference": "ffced0d2c8fa8e6cdc4d695a743271fab6c38625"
"reference": "ed8e00df0a83aa96acf703f8c2979ff33341f879"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/ffced0d2c8fa8e6cdc4d695a743271fab6c38625",
"reference": "ffced0d2c8fa8e6cdc4d695a743271fab6c38625",
"url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/ed8e00df0a83aa96acf703f8c2979ff33341f879",
"reference": "ed8e00df0a83aa96acf703f8c2979ff33341f879",
"shasum": ""
},
"require": {
Expand All @@ -24,7 +24,7 @@
"require-dev": {
"phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0"
},
"time": "2021-04-09T00:54:41+00:00",
"time": "2023-02-22T23:07:41+00:00",
"bin": [
"bin/phpcs",
"bin/phpcbf"
Expand All @@ -50,7 +50,8 @@
"homepage": "https://github.com/squizlabs/PHP_CodeSniffer",
"keywords": [
"phpcs",
"standards"
"standards",
"static analysis"
],
"support": {
"issues": "https://github.com/squizlabs/PHP_CodeSniffer/issues",
Expand Down
18 changes: 9 additions & 9 deletions vendor/composer/installed.php
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
<?php return array(
'root' => array(
'name' => 'intervolga/edu',
'pretty_version' => '1.0.0+no-version-set',
'version' => '1.0.0.0',
'reference' => NULL,
'pretty_version' => 'dev-master',
'version' => 'dev-master',
'reference' => 'cdb2a0bc17c20a959f88161c6a096e353525534e',
'type' => 'bitrix-d7-module',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
'dev' => true,
),
'versions' => array(
'intervolga/edu' => array(
'pretty_version' => '1.0.0+no-version-set',
'version' => '1.0.0.0',
'reference' => NULL,
'pretty_version' => 'dev-master',
'version' => 'dev-master',
'reference' => 'cdb2a0bc17c20a959f88161c6a096e353525534e',
'type' => 'bitrix-d7-module',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
'dev_requirement' => false,
),
'squizlabs/php_codesniffer' => array(
'pretty_version' => '3.6.0',
'version' => '3.6.0.0',
'reference' => 'ffced0d2c8fa8e6cdc4d695a743271fab6c38625',
'pretty_version' => '3.7.2',
'version' => '3.7.2.0',
'reference' => 'ed8e00df0a83aa96acf703f8c2979ff33341f879',
'type' => 'library',
'install_path' => __DIR__ . '/../squizlabs/php_codesniffer',
'aliases' => array(),
Expand Down
2 changes: 1 addition & 1 deletion vendor/squizlabs/php_codesniffer/CodeSniffer.conf.dist
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
'show_warnings' => '0',
'show_progress' => '1',
'report_width' => '120',
)
);
?>
65 changes: 33 additions & 32 deletions vendor/squizlabs/php_codesniffer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ php phpcbf.phar -h

### Composer
If you use Composer, you can install PHP_CodeSniffer system-wide with the following command:

composer global require "squizlabs/php_codesniffer=*"

```bash
composer global require "squizlabs/php_codesniffer=*"
```
Make sure you have the composer bin dir in your PATH. The default value is `~/.composer/vendor/bin/`, but you can check the value that you need to use by running `composer global config bin-dir --absolute`.

Or alternatively, include a dependency for `squizlabs/php_codesniffer` in your `composer.json` file. For example:
Expand All @@ -49,47 +49,48 @@ Or alternatively, include a dependency for `squizlabs/php_codesniffer` in your `
```

You will then be able to run PHP_CodeSniffer from the vendor bin directory:

./vendor/bin/phpcs -h
./vendor/bin/phpcbf -h

```bash
./vendor/bin/phpcs -h
./vendor/bin/phpcbf -h
```
### Phive
If you use Phive, you can install PHP_CodeSniffer as a project tool using the following commands:

phive install phpcs
phive install phpcbf

```bash
phive install phpcs
phive install phpcbf
```
You will then be able to run PHP_CodeSniffer from the tools directory:

./tools/phpcs -h
./tools/phpcbf -h

```bash
./tools/phpcs -h
./tools/phpcbf -h
```
### PEAR
If you use PEAR, you can install PHP_CodeSniffer using the PEAR installer. This will make the `phpcs` and `phpcbf` commands immediately available for use. To install PHP_CodeSniffer using the PEAR installer, first ensure you have [installed PEAR](http://pear.php.net/manual/en/installation.getting.php) and then run the following command:

pear install PHP_CodeSniffer

```bash
pear install PHP_CodeSniffer
```
### Git Clone
You can also download the PHP_CodeSniffer source and run the `phpcs` and `phpcbf` commands directly from the Git clone:

git clone https://github.com/squizlabs/PHP_CodeSniffer.git
cd PHP_CodeSniffer
php bin/phpcs -h
php bin/phpcbf -h

```bash
git clone https://github.com/squizlabs/PHP_CodeSniffer.git
cd PHP_CodeSniffer
php bin/phpcs -h
php bin/phpcbf -h
```
## Getting Started

The default coding standard used by PHP_CodeSniffer is the PEAR coding standard. To check a file against the PEAR coding standard, simply specify the file's location:

$ phpcs /path/to/code/myfile.php

```bash
phpcs /path/to/code/myfile.php
```
Or if you wish to check an entire directory you can specify the directory location instead of a file.

$ phpcs /path/to/code-directory

```bash
phpcs /path/to/code-directory
```
If you wish to check your code against the PSR-12 coding standard, use the `--standard` command line argument:

$ phpcs --standard=PSR12 /path/to/code-directory
```bash
phpcs --standard=PSR12 /path/to/code-directory
```

If PHP_CodeSniffer finds any coding standard errors, a report will be shown after running the command.

Expand Down
3 changes: 2 additions & 1 deletion vendor/squizlabs/php_codesniffer/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"type": "library",
"keywords": [
"phpcs",
"standards"
"standards",
"static analysis"
],
"homepage": "https://github.com/squizlabs/PHP_CodeSniffer",
"license": "BSD-3-Clause",
Expand Down
2 changes: 1 addition & 1 deletion vendor/squizlabs/php_codesniffer/licence.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ modification, are permitted provided that the following conditions are met:
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of Squiz Pty Ltd nor the
* Neither the name of the copyright holder nor the
names of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission.

Expand Down
15 changes: 8 additions & 7 deletions vendor/squizlabs/php_codesniffer/src/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

use PHP_CodeSniffer\Exceptions\DeepExitException;
use PHP_CodeSniffer\Exceptions\RuntimeException;
use PHP_CodeSniffer\Util\Common;

/**
* Stores the configuration used to run PHPCS and PHPCBF.
Expand Down Expand Up @@ -79,7 +80,7 @@ class Config
*
* @var string
*/
const VERSION = '3.6.0';
const VERSION = '3.7.2';

/**
* Package stability; either stable, beta or alpha.
Expand Down Expand Up @@ -363,11 +364,11 @@ public function __construct(array $cliArgs=[], $dieOnUnknownArg=true)

$lastDir = $currentDir;
$currentDir = dirname($currentDir);
} while ($currentDir !== '.' && $currentDir !== $lastDir && @is_readable($currentDir) === true);
} while ($currentDir !== '.' && $currentDir !== $lastDir && Common::isReadable($currentDir) === true);
}//end if

if (defined('STDIN') === false
|| strtoupper(substr(PHP_OS, 0, 3)) === 'WIN'
|| stripos(PHP_OS, 'WIN') === 0
) {
return;
}
Expand Down Expand Up @@ -459,7 +460,7 @@ public function setCommandLineValues($args)
/**
* Restore default values for all possible command line arguments.
*
* @return array
* @return void
*/
public function restoreDefaults()
{
Expand Down Expand Up @@ -1516,7 +1517,7 @@ public static function getExecutablePath($name)
return self::$executablePaths[$name];
}

if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
if (stripos(PHP_OS, 'WIN') === 0) {
$cmd = 'where '.escapeshellarg($name).' 2> nul';
} else {
$cmd = 'which '.escapeshellarg($name).' 2> /dev/null';
Expand Down Expand Up @@ -1596,7 +1597,7 @@ public static function setConfigData($key, $value, $temp=false)
if ($temp === false) {
$output = '<'.'?php'."\n".' $phpCodeSnifferConfig = ';
$output .= var_export($phpCodeSnifferConfig, true);
$output .= "\n?".'>';
$output .= ";\n?".'>';

if (file_put_contents($configFile, $output) === false) {
$error = 'ERROR: Config file '.$configFile.' could not be written'.PHP_EOL.PHP_EOL;
Expand Down Expand Up @@ -1656,7 +1657,7 @@ public static function getAllConfigData()
return [];
}

if (is_readable($configFile) === false) {
if (Common::isReadable($configFile) === false) {
$error = 'ERROR: Config file '.$configFile.' is not readable'.PHP_EOL.PHP_EOL;
throw new DeepExitException($error, 3);
}
Expand Down
2 changes: 1 addition & 1 deletion vendor/squizlabs/php_codesniffer/src/Files/DummyFile.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public function __construct($content, Ruleset $ruleset, Config $config)
// This is done by including: phpcs_input_file: [file path]
// as the first line of content.
$path = 'STDIN';
if ($content !== null) {
if ($content !== '') {
if (substr($content, 0, 17) === 'phpcs_input_file:') {
$eolPos = strpos($content, $this->eolChar);
$filename = trim(substr($content, 17, ($eolPos - 17)));
Expand Down
Loading