Issues (10)

src/Extension/SocialMediaSourcesExtension.php (10 issues)

1
<?php
2
3
namespace Suilven\SocialMediaSources\Extension;
4
5
use SilverStripe\AssetAdmin\Forms\UploadField;
0 ignored issues
show
The type SilverStripe\AssetAdmin\Forms\UploadField was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
6
use SilverStripe\Forms\CheckboxField;
0 ignored issues
show
The type SilverStripe\Forms\CheckboxField was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
7
use SilverStripe\Forms\DropdownField;
0 ignored issues
show
The type SilverStripe\Forms\DropdownField was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
8
use SilverStripe\Forms\FieldList;
0 ignored issues
show
The type SilverStripe\Forms\FieldList was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
9
use SilverStripe\Forms\HTMLEditor\HTMLEditorField;
0 ignored issues
show
The type SilverStripe\Forms\HTMLEditor\HTMLEditorField was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
10
use SilverStripe\Forms\NumericField;
0 ignored issues
show
The type SilverStripe\Forms\NumericField was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
11
use SilverStripe\Forms\TextareaField;
0 ignored issues
show
The type SilverStripe\Forms\TextareaField was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
12
use SilverStripe\Forms\TextField;
0 ignored issues
show
The type SilverStripe\Forms\TextField was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
13
14
class SocialMediaSourcesExtension extends \SilverStripe\ORM\DataExtension
0 ignored issues
show
The type SilverStripe\ORM\DataExtension was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
15
{
16
    /** @var array account names for varoius social media services */
17
    private static $db = [
0 ignored issues
show
The private property $db is not used, and could be removed.
Loading history...
18
        'Facebook' => 'Varchar(255)',
19
        'Twitter' => 'Varchar(255)',
20
        'LinkedIn' => 'Varchar(255)',
21
        'Instagram' => 'Varchar(255)',
22
        'GooglePlus' => 'Varchar(255)',
23
        'YouTube' => 'Varchar(255)'
24
    ];
25
26
    public function updateCMSFields(FieldList $fields)
27
    {
28
        $services = ['Facebook', 'Twitter', 'LinkedIn', 'Instagram', 'GooglePlus', 'YouTube'];
29
        foreach($services as $service) {
30
            $fields->addFieldToTab("Root.SocialMedia",
31
                new TextField("$service", "$service Account")
32
            );
33
        }
34
35
    }
36
37
}
38