| Conditions | 1 |
| Paths | 1 |
| Total Lines | 167 |
| Code Lines | 125 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
Small methods make your code easier to understand, in particular if combined with a good name. Besides, if your method is small, finding a good name is usually much easier.
For example, if you find yourself adding comments to a method's body, this is usually a good sign to extract the commented part to a new method, and use the comment as a starting point when coming up with a good name for this new method.
Commonly applied refactorings include:
If many parameters/temporary variables are present:
| 1 | <?php |
||
| 7 | public static function get(): array |
||
| 8 | { |
||
| 9 | return [ |
||
| 10 | 'OutputGroups' => [ |
||
| 11 | [ |
||
| 12 | 'CustomName' => 'Thumbnails', |
||
| 13 | 'Name' => 'File Group', |
||
| 14 | 'Outputs' => [ |
||
| 15 | [ |
||
| 16 | 'ContainerSettings' => [ |
||
| 17 | 'Container' => 'RAW', |
||
| 18 | ], |
||
| 19 | 'VideoDescription' => [ |
||
| 20 | 'ScalingBehavior' => 'DEFAULT', |
||
| 21 | 'TimecodeInsertion' => 'DISABLED', |
||
| 22 | 'AntiAlias' => 'ENABLED', |
||
| 23 | 'Sharpness' => 50, |
||
| 24 | 'CodecSettings' => [ |
||
| 25 | 'Codec' => 'FRAME_CAPTURE', |
||
| 26 | 'FrameCaptureSettings' => [ |
||
| 27 | 'FramerateNumerator' => null, // to be set dynamically |
||
| 28 | 'FramerateDenominator' => null, // to be set dynamically |
||
| 29 | 'MaxCaptures' => null, // to be set dynamically |
||
| 30 | 'Quality' => null, // to be set dynamically |
||
| 31 | ], |
||
| 32 | ], |
||
| 33 | 'AfdSignaling' => 'NONE', |
||
| 34 | 'DropFrameTimecode' => 'ENABLED', |
||
| 35 | 'RespondToAfd' => 'NONE', |
||
| 36 | 'ColorMetadata' => 'INSERT', |
||
| 37 | 'Width' => null, // to be set dynamically |
||
| 38 | ], |
||
| 39 | 'NameModifier' => null, // to be set dynamically |
||
| 40 | ], |
||
| 41 | ], |
||
| 42 | 'OutputGroupSettings' => [ |
||
| 43 | 'Type' => 'FILE_GROUP_SETTINGS', |
||
| 44 | 'FileGroupSettings' => [ |
||
| 45 | 'Destination' => null, // to be set dynamically |
||
| 46 | 'DestinationSettings' => [ |
||
| 47 | 'S3Settings' => [ |
||
| 48 | 'AccessControl' => [ |
||
| 49 | 'CannedAcl' => 'PUBLIC_READ', |
||
| 50 | ], |
||
| 51 | ], |
||
| 52 | ], |
||
| 53 | ], |
||
| 54 | ], |
||
| 55 | ], |
||
| 56 | [ |
||
| 57 | 'CustomName' => 'MP4', |
||
| 58 | 'Name' => 'File Group', |
||
| 59 | 'Outputs' => [ |
||
| 60 | [ |
||
| 61 | 'ContainerSettings' => [ |
||
| 62 | 'Container' => 'MP4', |
||
| 63 | 'Mp4Settings' => [ |
||
| 64 | 'CslgAtom' => 'INCLUDE', |
||
| 65 | 'FreeSpaceBox' => 'EXCLUDE', |
||
| 66 | 'MoovPlacement' => 'PROGRESSIVE_DOWNLOAD', |
||
| 67 | ], |
||
| 68 | ], |
||
| 69 | 'VideoDescription' => [ |
||
| 70 | 'ScalingBehavior' => 'DEFAULT', |
||
| 71 | 'TimecodeInsertion' => 'DISABLED', |
||
| 72 | 'AntiAlias' => 'ENABLED', |
||
| 73 | 'Sharpness' => 50, |
||
| 74 | 'CodecSettings' => [ |
||
| 75 | 'Codec' => 'H_264', |
||
| 76 | 'H264Settings' => [ |
||
| 77 | 'InterlaceMode' => 'PROGRESSIVE', |
||
| 78 | 'NumberReferenceFrames' => 3, |
||
| 79 | 'Syntax' => 'DEFAULT', |
||
| 80 | 'Softness' => 0, |
||
| 81 | 'GopClosedCadence' => 1, |
||
| 82 | 'GopSize' => 90, |
||
| 83 | 'Slices' => 1, |
||
| 84 | 'GopBReference' => 'DISABLED', |
||
| 85 | 'MaxBitrate' => 8000000, |
||
| 86 | 'SlowPal' => 'DISABLED', |
||
| 87 | 'SpatialAdaptiveQuantization' => 'ENABLED', |
||
| 88 | 'TemporalAdaptiveQuantization' => 'ENABLED', |
||
| 89 | 'FlickerAdaptiveQuantization' => 'DISABLED', |
||
| 90 | 'EntropyEncoding' => 'CABAC', |
||
| 91 | 'FramerateControl' => 'INITIALIZE_FROM_SOURCE', |
||
| 92 | 'RateControlMode' => 'QVBR', |
||
| 93 | 'QvbrSettings' => [ |
||
| 94 | 'QvbrQualityLevel' => 7, |
||
| 95 | 'QvbrQualityLevelFineTune' => 0, |
||
| 96 | ], |
||
| 97 | 'CodecProfile' => 'MAIN', |
||
| 98 | 'Telecine' => 'NONE', |
||
| 99 | 'MinIInterval' => 0, |
||
| 100 | 'AdaptiveQuantization' => 'HIGH', |
||
| 101 | 'CodecLevel' => 'AUTO', |
||
| 102 | 'FieldEncoding' => 'PAFF', |
||
| 103 | 'SceneChangeDetect' => 'ENABLED', |
||
| 104 | 'QualityTuningLevel' => 'SINGLE_PASS', |
||
| 105 | 'FramerateConversionAlgorithm' => 'DUPLICATE_DROP', |
||
| 106 | 'UnregisteredSeiTimecode' => 'DISABLED', |
||
| 107 | 'GopSizeUnits' => 'FRAMES', |
||
| 108 | 'ParControl' => 'INITIALIZE_FROM_SOURCE', |
||
| 109 | 'NumberBFramesBetweenReferenceFrames' => 2, |
||
| 110 | 'RepeatPps' => 'DISABLED', |
||
| 111 | ], |
||
| 112 | ], |
||
| 113 | 'AfdSignaling' => 'NONE', |
||
| 114 | 'DropFrameTimecode' => 'ENABLED', |
||
| 115 | 'RespondToAfd' => 'NONE', |
||
| 116 | 'ColorMetadata' => 'INSERT', |
||
| 117 | ], |
||
| 118 | 'AudioDescriptions' => [ |
||
| 119 | [ |
||
| 120 | 'AudioTypeControl' => 'FOLLOW_INPUT', |
||
| 121 | 'CodecSettings' => [ |
||
| 122 | 'Codec' => 'AAC', |
||
| 123 | 'AacSettings' => [ |
||
| 124 | 'AudioDescriptionBroadcasterMix' => 'NORMAL', |
||
| 125 | 'Bitrate' => 96000, |
||
| 126 | 'RateControlMode' => 'CBR', |
||
| 127 | 'CodecProfile' => 'LC', |
||
| 128 | 'CodingMode' => 'CODING_MODE_2_0', |
||
| 129 | 'RawFormat' => 'NONE', |
||
| 130 | 'SampleRate' => 48000, |
||
| 131 | 'Specification' => 'MPEG4', |
||
| 132 | ], |
||
| 133 | ], |
||
| 134 | 'LanguageCodeControl' => 'FOLLOW_INPUT', |
||
| 135 | ], |
||
| 136 | ], |
||
| 137 | ], |
||
| 138 | ], |
||
| 139 | 'OutputGroupSettings' => [ |
||
| 140 | 'Type' => 'FILE_GROUP_SETTINGS', |
||
| 141 | 'FileGroupSettings' => [ |
||
| 142 | 'Destination' => null, // to be set dynamically |
||
| 143 | 'DestinationSettings' => [ |
||
| 144 | 'S3Settings' => [ |
||
| 145 | 'AccessControl' => [ |
||
| 146 | 'CannedAcl' => 'PUBLIC_READ', |
||
| 147 | ], |
||
| 148 | ], |
||
| 149 | ], |
||
| 150 | ], |
||
| 151 | ], |
||
| 152 | ], |
||
| 153 | ], |
||
| 154 | 'AdAvailOffset' => 0, |
||
| 155 | 'Inputs' => [ |
||
| 156 | [ |
||
| 157 | 'AudioSelectors' => [ |
||
| 158 | 'Audio Selector 1' => [ |
||
| 159 | 'Offset' => 0, |
||
| 160 | 'DefaultSelection' => 'DEFAULT', |
||
| 161 | 'ProgramSelection' => 1, |
||
| 162 | ], |
||
| 163 | ], |
||
| 164 | 'VideoSelector' => [ |
||
| 165 | 'ColorSpace' => 'FOLLOW', |
||
| 166 | ], |
||
| 167 | 'FilterEnable' => 'AUTO', |
||
| 168 | 'PsiControl' => 'USE_PSI', |
||
| 169 | 'FilterStrength' => 0, |
||
| 170 | 'DeblockFilter' => 'DISABLED', |
||
| 171 | 'DenoiseFilter' => 'DISABLED', |
||
| 172 | 'TimecodeSource' => 'EMBEDDED', |
||
| 173 | 'FileInput' => null, // to be set dynamically |
||
| 174 | ], |
||
| 179 |