mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge pull request #10463 from creative-commoners/pulls/4/rescue-master-static-analysis
Rescue Master Branch PR: ENH Various changes via static analysis tooling
This commit is contained in:
commit
f14c60ceb2
@ -563,7 +563,7 @@ class ClassManifest
|
|||||||
'ignore_files' => ['index.php', 'cli-script.php'],
|
'ignore_files' => ['index.php', 'cli-script.php'],
|
||||||
'ignore_tests' => !$includeTests,
|
'ignore_tests' => !$includeTests,
|
||||||
'ignored_ci_configs' => $ignoredCIConfigs,
|
'ignored_ci_configs' => $ignoredCIConfigs,
|
||||||
'file_callback' => function ($basename, $pathname, $depth) use ($includeTests, $finder) {
|
'file_callback' => function ($basename, $pathname, $depth) use ($includeTests) {
|
||||||
$this->handleFile($basename, $pathname, $includeTests);
|
$this->handleFile($basename, $pathname, $includeTests);
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
@ -123,7 +123,7 @@ class ConfirmedPasswordField extends FormField
|
|||||||
* @param string $name
|
* @param string $name
|
||||||
* @param string $title
|
* @param string $title
|
||||||
* @param mixed $value
|
* @param mixed $value
|
||||||
* @param Form $form
|
* @param Form $form Ignored for ConfirmedPasswordField.
|
||||||
* @param boolean $showOnClick
|
* @param boolean $showOnClick
|
||||||
* @param string $titleConfirmField Alternate title (not localizeable)
|
* @param string $titleConfirmField Alternate title (not localizeable)
|
||||||
*/
|
*/
|
||||||
|
@ -589,7 +589,7 @@ class FormField extends RequestHandler
|
|||||||
//
|
//
|
||||||
// CSS class needs to be different from the one rendered through {@link FieldHolder()}.
|
// CSS class needs to be different from the one rendered through {@link FieldHolder()}.
|
||||||
if ($this->getMessage()) {
|
if ($this->getMessage()) {
|
||||||
$classes[] .= 'holder-' . $this->getMessageType();
|
$classes[] = 'holder-' . $this->getMessageType();
|
||||||
}
|
}
|
||||||
|
|
||||||
return implode(' ', $classes);
|
return implode(' ', $classes);
|
||||||
|
@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
namespace SilverStripe\Forms\GridField;
|
namespace SilverStripe\Forms\GridField;
|
||||||
|
|
||||||
|
use SilverStripe\ORM\DataObject;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Allows GridField_ActionMenuItem to act as a link
|
* Allows GridField_ActionMenuItem to act as a link
|
||||||
*/
|
*/
|
||||||
|
@ -169,7 +169,7 @@ class NullableField extends FormField
|
|||||||
public function debug()
|
public function debug()
|
||||||
{
|
{
|
||||||
$result = sprintf(
|
$result = sprintf(
|
||||||
'%s (%s: $s : <span style="color: red">%s</span>) = ',
|
'%s (%s: %s : <span style="color: red">%s</span>) = ',
|
||||||
static::class,
|
static::class,
|
||||||
$this->name,
|
$this->name,
|
||||||
$this->title,
|
$this->title,
|
||||||
|
@ -6,6 +6,7 @@ use SilverStripe\Assets\File;
|
|||||||
use SilverStripe\CMS\Model\SiteTree;
|
use SilverStripe\CMS\Model\SiteTree;
|
||||||
use SilverStripe\Core\Config\Configurable;
|
use SilverStripe\Core\Config\Configurable;
|
||||||
use SilverStripe\Core\Convert;
|
use SilverStripe\Core\Convert;
|
||||||
|
use SilverStripe\Dev\Deprecation;
|
||||||
use SilverStripe\ORM\PaginatedList;
|
use SilverStripe\ORM\PaginatedList;
|
||||||
use SilverStripe\ORM\DataList;
|
use SilverStripe\ORM\DataList;
|
||||||
use SilverStripe\ORM\ArrayList;
|
use SilverStripe\ORM\ArrayList;
|
||||||
|
@ -78,23 +78,23 @@ class MySQLSchemaManager extends DBSchemaManager
|
|||||||
|
|
||||||
if ($newFields) {
|
if ($newFields) {
|
||||||
foreach ($newFields as $k => $v) {
|
foreach ($newFields as $k => $v) {
|
||||||
$alterList[] .= "ADD \"$k\" $v";
|
$alterList[] = "ADD \"$k\" $v";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($newIndexes) {
|
if ($newIndexes) {
|
||||||
foreach ($newIndexes as $k => $v) {
|
foreach ($newIndexes as $k => $v) {
|
||||||
$alterList[] .= "ADD " . $this->getIndexSqlDefinition($k, $v);
|
$alterList[] = "ADD " . $this->getIndexSqlDefinition($k, $v);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($alteredFields) {
|
if ($alteredFields) {
|
||||||
foreach ($alteredFields as $k => $v) {
|
foreach ($alteredFields as $k => $v) {
|
||||||
$alterList[] .= "CHANGE \"$k\" \"$k\" $v";
|
$alterList[] = "CHANGE \"$k\" \"$k\" $v";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($alteredIndexes) {
|
if ($alteredIndexes) {
|
||||||
foreach ($alteredIndexes as $k => $v) {
|
foreach ($alteredIndexes as $k => $v) {
|
||||||
$alterList[] .= "DROP INDEX \"$k\"";
|
$alterList[] = "DROP INDEX \"$k\"";
|
||||||
$alterList[] .= "ADD " . $this->getIndexSqlDefinition($k, $v);
|
$alterList[] = "ADD " . $this->getIndexSqlDefinition($k, $v);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -12,7 +12,6 @@ use SilverStripe\Core\Injector\Injector;
|
|||||||
use SilverStripe\Core\Manifest\ClassLoader;
|
use SilverStripe\Core\Manifest\ClassLoader;
|
||||||
use SilverStripe\Dev\Deprecation;
|
use SilverStripe\Dev\Deprecation;
|
||||||
use SilverStripe\Dev\DevelopmentAdmin;
|
use SilverStripe\Dev\DevelopmentAdmin;
|
||||||
use SilverStripe\Dev\TestOnly;
|
|
||||||
use SilverStripe\ORM\Connect\DatabaseException;
|
use SilverStripe\ORM\Connect\DatabaseException;
|
||||||
use SilverStripe\ORM\Connect\TableBuilder;
|
use SilverStripe\ORM\Connect\TableBuilder;
|
||||||
use SilverStripe\ORM\FieldType\DBClassName;
|
use SilverStripe\ORM\FieldType\DBClassName;
|
||||||
|
@ -99,7 +99,7 @@ class ShortcodeParser
|
|||||||
* - An associative array of extra information about the shortcode being parsed.
|
* - An associative array of extra information about the shortcode being parsed.
|
||||||
*
|
*
|
||||||
* @param string $shortcode The shortcode tag to map to the callback - normally in lowercase_underscore format.
|
* @param string $shortcode The shortcode tag to map to the callback - normally in lowercase_underscore format.
|
||||||
* @param callback $callback The callback to replace the shortcode with.
|
* @param callable $callback The callback to replace the shortcode with.
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function register($shortcode, $callback)
|
public function register($shortcode, $callback)
|
||||||
|
@ -124,7 +124,7 @@ class ThemeManifest implements ThemeList
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return \string[]
|
* @return string[]
|
||||||
*/
|
*/
|
||||||
public function getThemes()
|
public function getThemes()
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user