diff --git a/src/Core/Manifest/ClassManifest.php b/src/Core/Manifest/ClassManifest.php
index 1849b5d550c..7ebdc0dfe95 100644
--- a/src/Core/Manifest/ClassManifest.php
+++ b/src/Core/Manifest/ClassManifest.php
@@ -563,7 +563,7 @@ public function regenerate($includeTests, array $ignoredCIConfigs = [])
'ignore_files' => ['index.php', 'cli-script.php'],
'ignore_tests' => !$includeTests,
'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);
},
]);
diff --git a/src/Forms/ConfirmedPasswordField.php b/src/Forms/ConfirmedPasswordField.php
index feb954dda82..479c89d597a 100644
--- a/src/Forms/ConfirmedPasswordField.php
+++ b/src/Forms/ConfirmedPasswordField.php
@@ -123,7 +123,7 @@ class ConfirmedPasswordField extends FormField
* @param string $name
* @param string $title
* @param mixed $value
- * @param Form $form
+ * @param Form $form Ignored for ConfirmedPasswordField.
* @param boolean $showOnClick
* @param string $titleConfirmField Alternate title (not localizeable)
*/
diff --git a/src/Forms/FormField.php b/src/Forms/FormField.php
index cbbe4a1be04..8632cfedf48 100644
--- a/src/Forms/FormField.php
+++ b/src/Forms/FormField.php
@@ -589,7 +589,7 @@ public function extraClass()
//
// CSS class needs to be different from the one rendered through {@link FieldHolder()}.
if ($this->getMessage()) {
- $classes[] .= 'holder-' . $this->getMessageType();
+ $classes[] = 'holder-' . $this->getMessageType();
}
return implode(' ', $classes);
diff --git a/src/Forms/GridField/GridField_ActionMenuLink.php b/src/Forms/GridField/GridField_ActionMenuLink.php
index 6baa05e1a87..d8727c84067 100644
--- a/src/Forms/GridField/GridField_ActionMenuLink.php
+++ b/src/Forms/GridField/GridField_ActionMenuLink.php
@@ -2,6 +2,8 @@
namespace SilverStripe\Forms\GridField;
+use SilverStripe\ORM\DataObject;
+
/**
* Allows GridField_ActionMenuItem to act as a link
*/
diff --git a/src/Forms/NullableField.php b/src/Forms/NullableField.php
index 5130d58b6df..e2c35101a19 100644
--- a/src/Forms/NullableField.php
+++ b/src/Forms/NullableField.php
@@ -169,7 +169,7 @@ public function setName($name)
public function debug()
{
$result = sprintf(
- '%s (%s: $s : %s) = ',
+ '%s (%s: %s : %s) = ',
static::class,
$this->name,
$this->title,
diff --git a/src/ORM/Connect/MySQLDatabase.php b/src/ORM/Connect/MySQLDatabase.php
index 555091049e6..9200f3a8cc7 100644
--- a/src/ORM/Connect/MySQLDatabase.php
+++ b/src/ORM/Connect/MySQLDatabase.php
@@ -6,6 +6,7 @@
use SilverStripe\CMS\Model\SiteTree;
use SilverStripe\Core\Config\Configurable;
use SilverStripe\Core\Convert;
+use SilverStripe\Dev\Deprecation;
use SilverStripe\ORM\PaginatedList;
use SilverStripe\ORM\DataList;
use SilverStripe\ORM\ArrayList;
diff --git a/src/ORM/Connect/MySQLSchemaManager.php b/src/ORM/Connect/MySQLSchemaManager.php
index 0b195d02bb3..1933dc37dba 100644
--- a/src/ORM/Connect/MySQLSchemaManager.php
+++ b/src/ORM/Connect/MySQLSchemaManager.php
@@ -78,23 +78,23 @@ public function alterTable(
if ($newFields) {
foreach ($newFields as $k => $v) {
- $alterList[] .= "ADD \"$k\" $v";
+ $alterList[] = "ADD \"$k\" $v";
}
}
if ($newIndexes) {
foreach ($newIndexes as $k => $v) {
- $alterList[] .= "ADD " . $this->getIndexSqlDefinition($k, $v);
+ $alterList[] = "ADD " . $this->getIndexSqlDefinition($k, $v);
}
}
if ($alteredFields) {
foreach ($alteredFields as $k => $v) {
- $alterList[] .= "CHANGE \"$k\" \"$k\" $v";
+ $alterList[] = "CHANGE \"$k\" \"$k\" $v";
}
}
if ($alteredIndexes) {
foreach ($alteredIndexes as $k => $v) {
- $alterList[] .= "DROP INDEX \"$k\"";
- $alterList[] .= "ADD " . $this->getIndexSqlDefinition($k, $v);
+ $alterList[] = "DROP INDEX \"$k\"";
+ $alterList[] = "ADD " . $this->getIndexSqlDefinition($k, $v);
}
}
diff --git a/src/ORM/DatabaseAdmin.php b/src/ORM/DatabaseAdmin.php
index c10ef679b45..c1bf74b8d84 100644
--- a/src/ORM/DatabaseAdmin.php
+++ b/src/ORM/DatabaseAdmin.php
@@ -12,7 +12,6 @@
use SilverStripe\Core\Manifest\ClassLoader;
use SilverStripe\Dev\Deprecation;
use SilverStripe\Dev\DevelopmentAdmin;
-use SilverStripe\Dev\TestOnly;
use SilverStripe\ORM\Connect\DatabaseException;
use SilverStripe\ORM\Connect\TableBuilder;
use SilverStripe\ORM\FieldType\DBClassName;
diff --git a/src/View/Parsers/ShortcodeParser.php b/src/View/Parsers/ShortcodeParser.php
index 5c7824790a0..41caf4c5293 100644
--- a/src/View/Parsers/ShortcodeParser.php
+++ b/src/View/Parsers/ShortcodeParser.php
@@ -99,7 +99,7 @@ public static function set_active($identifier)
* - 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 callback $callback The callback to replace the shortcode with.
+ * @param callable $callback The callback to replace the shortcode with.
* @return $this
*/
public function register($shortcode, $callback)
diff --git a/src/View/ThemeManifest.php b/src/View/ThemeManifest.php
index 32573acc340..bb573d47b79 100644
--- a/src/View/ThemeManifest.php
+++ b/src/View/ThemeManifest.php
@@ -124,7 +124,7 @@ public function getCacheKey($includeTests = false)
}
/**
- * @return \string[]
+ * @return string[]
*/
public function getThemes()
{